Opened 11 years ago
Closed 11 years ago
#621 closed enhancement (fixed)
geos_c api string handling improvements
Reported by: | danielzeitlin | Owned by: | strk |
---|---|---|---|
Priority: | major | Milestone: | 3.3.9 |
Component: | C API | Version: | 3.3.7 |
Severity: | Significant | Keywords: | |
Cc: | danielzeitlin |
Description
GEOSWKBReader_read_r() method copies the given WKB string two times instead of directly access it without any copy
first copy --> std::string wkbstring(wkb, size);
second copy --> is.str(wkbstring);
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 two).
I fixed these methods and attached a short patch file. Consider to fix WKT read/write too.
Attachments (1)
Change History (4)
by , 11 years ago
Attachment: | geos_ts_c.cpp.patch added |
---|
comment:1 by , 11 years ago
Cc: | added |
---|---|
Component: | Default → C API |
Owner: | changed from | to
comment:2 by , 11 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:3 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
r3779 for trunk / r3780 for 3.3 branch. If you send a patch for WKT read/write it'll be applied.