[geos-devel] Any sneaky tricks for speeding up operations with complex geometries?

Nyall Dawson nyall.dawson at gmail.com
Mon Aug 26 19:50:00 PDT 2019


Hey GEOS community!

I'm wondering if anyone has any sneaky/brilliant approaches on
speeding up GEOS operations with complex input geometries. Right now
I'm looking for a way to speed up a unary union operation with the
order of 100 input polygons, each of which is quite complex. I'm
currently throwing these all into GEOSUnaryUnion and relying on GEOS
to internally do things the best way, but I suspect there IS some
optimisations I could do to pre-process the geometries in order to
speed up the actual union operation.

Has anyone any tips here?

The other operation I'd like to optimise somehow is detecting whether
gaps exist between a set of features. Currently the code is unioning
all the input goemetries, then differencing it against the area of
interest and checking if the result is empty. I suspect there's a much
smarter way of doing this which would avoid the expense of the
differencing operation, so I'd love to hear if anyone has any
optimised approaches for handling this...

Nyall


More information about the geos-devel mailing list