Nathanael-L / osmi-water

Read openstreetmap data and extract waterobjects, indicate logical and tagging errors. Output is sqlite. Designed for OSM Inspector.
1 stars 3 forks source link

save time at geos contains #6

Open Nathanael-L opened 9 years ago

Nathanael-L commented 9 years ago

indicate false positives in pass 4 takes a lot of time in some cases (e.g. canada). it is to be assumed, this is because of huge polygons. approach: if more than ~5 possible errors are found in the error tree by comparing with the bounding box of a polygon, create a prepared geometry (geos::geom::prep::PreparedGeometryFactory). this speed up the contains query.

Nathanael-L commented 9 years ago

implemented another solution: instead of storing the error nodes in a tree the polygons (prepared polygons) are stored in a strtree. in the pass 4 it iterates through the error nodes and check if they are containing in a polygon. this way turns the error detecting in most cases faster - in some cases many times faster.