[geos-devel] Building Multipolygons from Rings

Frederik Ramm frederik at remote.org
Tue Jun 21 19:07:10 EDT 2011


Sandro,

Sandro Santilli wrote:
>> Is there a way how I can somehow pre-process my 100k node polygon to
>> make the "contains" queries go faster? I have the impression that
>> "contains" must do some preprocessing internally, and that maybe the
>> same preprocessing is repeated unnecessarily if I do 10,000
>> "contains" checks for the same polygon?
> 
> Take a look at the Prepared geometry interfaces.

Switched to a PreparedPolygon and its "containsProperly" method, and 
processing time for my complex test case is now down from > 2 hours to 
10 seconds. Thanks a lot!

Bye
Frederik

-- 
Frederik Ramm  ##  eMail frederik at remote.org  ##  N49°00'09" E008°23'33"


More information about the geos-devel mailing list