[geos-devel] [Fwd: [mapguide-trac] #172: Bug in Selection polygon
from PostGiS (PostgreSql)]
Mateusz Loskot
mateusz at loskot.net
Mon Jun 11 12:09:46 EDT 2007
Hi,
I'm forwarding Ticket reported to the MapGuide Trac system:
http://trac.osgeo.org/mapguide/ticket/172#comment:6
It's also related to GEOS and may be interesting.
Shortly, one of datasource supported by MapGuide is OGR.
OGR uses GEOS, so MapGuide indirectly uses GEOS capabilities
for various geometric operations.
I believe it's worth to check the whole ticket, but below
I pasted most interesting comment:
############################################################################
#172: Bug in Selection polygon from PostGiS (PostgreSql)
------------------------------------------+---------------------------------
Reporter: maciej.skorczewski at procad.pl | Owner:
Type: defect | Status: new
Priority: high | Milestone:
Component: General | Version: 1.2.0
Severity: major | Resolution:
Keywords: | External_id: 939561
------------------------------------------+---------------------------------
Comment (by ksgeograf):
I have been examining the problem, using a custom build of the OGR
provider.
It is true that without GEOS support in OGR, the Intersect only does a
BBOX check.
However, merely enabling GEOS will not work, as the viewer sends a square
that is orthogonal to the axes (like a BBOX). The GEOS library will
interpret this as another BBOX, and only perform the BBOX check anyway.
When I change the polgyon sent from the viewer to a triangle, it takes 22
seconds to calculate the Intersects result with a polygon with 8000
linesegments. I have a 2+ GHz machine.
It seems that GEOS always builds a full intersection matrix, before
returning the result. This is obviously not optimal for a simple hit test.
Even with this knowledge, I still don't see how it can take 22 seconds to
calculate 8000 * 3 intersections.
Can someone explain this, or how to fix it?
############################################################################
Cheers
--
Mateusz Loskot
http://mateusz.loskot.net
More information about the geos-devel
mailing list