[mapguide-trac] #172: Bug in Selection polygon from PostGiS (PostgreSql)

MapGuide Open Source trac_mapguide at osgeo.org
Mon Jun 11 18:40:34 EDT 2007


#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):

 You are right. I have traced it for a few hours.

 OGR sends WKT data to GEOS.

 Spending some time, I've found the source of the problem...
 The GEOS WKT reader works by using the StringTokenizer, which is issuing
 statements like:
 str=str.substr(1);

 Which, of course, will make a copy of the entire string, minus the first
 character.
 Then the unused memory will be release. It should of use a pointer to the
 current character instead. It is easy to fix, but there may be other parts
 of GEOS that depend on this functionality. If GEOS is patched, then the
 OGR provider will be depending on a patched version of GEOS.

 A better fix would be to modify GDAL/OGR to use WKB (assuming that the WKB
 Reader is better implemented in GEOS). The OGR provider will then depend
 on a patched GDAL/OGR.

 Still, this does not change the fact that GDAL/OGR assumes that a
 rectangular spatial filter should perform BBOX overlap tests.

 What is the prefered way of solving this?

-- 
Ticket URL: <http://trac.osgeo.org/mapguide/ticket/172#comment:8>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals


More information about the mapguide-trac mailing list