[geos-devel] [GEOS] #621: geos_c api string handling improvements

GEOS geos-trac at osgeo.org
Tue Mar 5 06:10:45 PST 2013

#621: geos_c api string handling improvements
 Reporter:  danielzeitlin  |       Owner:  geos-devel@…              
     Type:  enhancement    |      Status:  new                       
 Priority:  major          |   Milestone:  3.3.x                     
Component:  Default        |     Version:  3.3.7                     
 Severity:  Significant    |    Keywords:                            
 GEOSWKBReader_read_r() method copies the given WKB string two times
 instead of directly access it without any copy[[BR]]
 first copy --> std::string wkbstring(wkb, size);[[BR]]
 second copy --> is.str(wkbstring);[[BR]]

 similar one copy occurs in GEOSWKBWriter_write_r() method.

 These two methods are very important since are main entry points for
 geometry de/serialization between libraries using GEOS (GDAL uses them

 I fixed these methods and attached a short patch file.
 Consider to fix WKT read/write too.

Ticket URL: <http://trac.osgeo.org/geos/ticket/621>
GEOS <http://geos.refractions.net/>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).

More information about the geos-devel mailing list