[mapguide-users] OGR / GEOS selection problem

Traian Stanev traian.stanev at autodesk.com
Tue Jun 12 10:49:55 EDT 2007


 

I just tried it on my Australia states data set which has polygons with
16000+ vertices. It works fine and it is not slow (less than 1 second
from mouse click to the selected polygon being highlighted in the AJAX
viewer). May be it is a problem in your configuration. FWIW my data came
from a SHP file.

 

 

Traian

 

 

 

From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Kenneth,
GEOGRAF A/S
Sent: Tuesday, June 12, 2007 10:36 AM
To: MapGuide Users Mail List
Subject: Re: [mapguide-users] OGR / GEOS selection problem

 

Yes, I have tried doing the selection with a triangle, and it also
works, but there is another bug in GEOS, that makes it EXTREMELY slow
for any geometries with +2000 points.

I have posted some info on trac about it:
http://trac.osgeo.org/mapguide/ticket/172

So, the original problem is "fixed", but it opens another problem, which
may have more to do with GEOS than with the provider.
I think the related speed problem makes the provider more useless with
the fix than without.

I can build a new provider, but I don't have the setup for Oracle and
PostGIS.




Regards, Kenneth, GEOGRAF A/S
 



Traian Stanev skrev: 

 

Hi.

 

I checked in a temporary fix to this problem. I simply warped one of the
coordinates of the input polygon by 10^-10. This is sufficient to make
OGR call GEOS to compute the exact intersection. Selection should work
correctly now in the AJAX viewer.

 

I have not posted a compiled DLL yet, so Kenneth feel free to do so, (-:

 

 

 

 

Traian

 

 

From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Traian
Stanev
Sent: Thursday, June 07, 2007 3:46 PM
To: MapGuide Users Mail List; MapGuide Users Mail List
Subject: RE: [mapguide-users] OGR / GEOS selection problem

 

Hi Kenneth,

 

Thanks for tracking this down. I would try to fix this by bypassing
Geos. FDO has utility code that can check for an intersection. We could
take the BBOX result and pass that through a real intersection check on
the provider side. This way the intersection check would be performed
only on geometries that are close enough to the query polygon so the
overhead should not be too bad.

 

 

Traian

 

	-----Original Message----- 
	From: mapguide-users-bounces at lists.osgeo.org on behalf of
Kenneth, GEOGRAF A/S 
	Sent: Thu 6/7/2007 2:54 AM 
	To: MapGuide Users Mail List 
	Cc: 
	Subject: [mapguide-users] OGR / GEOS selection problem

	Maciej previously reported problems with the OGR provider using
PostGIS.
	
	The problem is with the OGR provider.
	Se the Trac ticket for details:
	http://trac.osgeo.org/mapguide/ticket/172
	
	I have posted some follow up on the issue, but in hope someone
knows a
	lot about GEOS, I'm also posting it here:
	
	
	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?
	
	
	
	--
	Regards, Kenneth, GEOGRAF A/S
	
	
	_______________________________________________
	mapguide-users mailing list
	mapguide-users at lists.osgeo.org
	http://lists.osgeo.org/mailman/listinfo/mapguide-users

 


  _____  



 
_______________________________________________
mapguide-users mailing list
mapguide-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20070612/cfcdc2a0/attachment.html


More information about the mapguide-users mailing list