[gdal-dev] Dissolve large amount of geometries

Paul Meems bontepaarden at gmail.com
Thu Jun 28 03:53:27 PDT 2018


Hi list,

I've been working on this for months (off and on) and still no satisfying
outcome.
Either the process takes too long (multiple hours) or the result has
invalid geometries.

I want to try a different angle now. Instead of asking technical questions
I want to explain what I try to do. Hopefully, somebody has a
suggestion/hint which gives me some new insights.

I have a high-resolution geotiff (drone image). And I need to create a
taskmap in shapefile format.
This taskmap is used in the tractor (precision farming) for variable
spraying crop protection agents or variable fertilization using GPS, etc.

The user starts by giving the precision (width and height) of the taskmap.
I then create a fishnet over the tiff using the given width and height.
Typical values can 1 by 1 meter or less. This results in a dataset with a
lot of square/rectangles (1.5 - 2 million). Next step is to rotate the
fishnet to align with the tractor path and clip with the field border. Then
for each geometry, I get the pixel values from the tiff inside the
geometry. I calculate the average and add this value as 'Rating' to the
geometry.
This process is fast enough, about 20-30 seconds.

Next step is the slow part.
I need to merge the adjacent geometries with the same rating. Multipolygons
are not needed. If created I will break them apart later.

Of course, I tried using GDAL+GEOS and the result seems OK, but it takes
hours to finish.

Reading my long description, how would you handle this challenge?
I'm open to any suggestion.

Thanks.

Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20180628/511041c6/attachment.html>


More information about the gdal-dev mailing list