My problem is as follows:
As I have described before I am using LAStools for all the initial
processing of public Norwegian lidar data (from
https://hoydedata.no/ )
in order to generate our free topographic map of the entire country:
https://mapant.no/
(It should be obvious that LAStools is really crucial for making this
possible, with the LAZ format itself the key enabler: I have 25 TB
currently which would have required over 200 TB as LAS, i.e. out of the
question for a free/hobby/non-commercial project.)
The Norwegian mapping authority provides only very low-level access to
all the individual scanning projects and no combined/cleaned up version
using only the best data for each tile, so this is the step that I use
LAStools for.
Originally I just combined all the relevant projects (up to 7 or more
for a given spot), then thinned the resulting huge set down to 4
points/square meter using lasthin with step = 0.5
This worked fine as long as all the projects had high quality, but in
some parts of the country the only data we have is badly
height-calibrated to that it would end up 50-200 cm offset in height
from the good data, and this caused the ground surface (where good and
bad overlaps) to look like a huge boulder field with the same 50-200 cm
jumps up & down all over the place!
My next try was to use lasground_new on the combined data, this did give
us an OK ground surface, but now all the bad data turned up as very
dense vegetation, so I finally decided I had to use the project shape
files to clip all the data in priority order:
Starting with the oldest/worst project I would tile (200x200m tiles) the
input data, then clip it against the next (better) project.
In the next round the tiling process would take both the next input
project and the data that survived the previous clipping stage to make
the new input, then clip the combination, etc. until I got to the
final/best project which would be used exclusively wherever it was defined.
This works and is the current pipeline, but with up to 20+ projects in a
single 10x10km work area, the bottom layers will be re-tiled and
re-clipped over and over again, so I would much rather combine the shape
files!
I.e. project 0 (top/best) is just used as-is, project 1 is clipped
against project 0's shape file, then project 2 is clipped against the
combination of projects 0 & 1 shape files, and this is where it all
breaks down!
WARNING: polygon 2 has duplicate point at count 1625
ERROR: crossing constraint segments
ERROR: constraining 61 (590505.93/6648340.77) to 62 (590604.21/6648659.27)
of polygon 2 with 1069 points
I used GDAL with the ogr2ogr program to do shape file merging, this
results in a new single-layer shape file containing multiple overlapping
polygons, and this is rejected by lasclip, so my far faster workflow
doesn't currently work at all. :-(
I have not been able to find any command-line tool which can do the
merging and flatten the result down to a single set of non-overlapping
polygons. :-(
Any ideas?
Terje
--
- <
Terje.M...@tmsw.no>
"almost all programming can be viewed as an exercise in caching"