Opened 19 years ago
Closed 19 years ago
#1160 closed enhancement (wontfix)
initialize a shapeObj from WKB data, export shapeObj as WKB
Reported by: | Owned by: | sdlime | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | MapScript-SWIG | Version: | 4.5 |
Severity: | minor | Keywords: | |
Cc: |
Description
Building up a shapeObj from pointObjs and lineObjs using the mapscript API is too expensive to be useful for large numbers of features. I propose to create msShapeFromWKB and msShapeToWKB functions in mapprimitive.c and expose them through mapscript as shapeObj.toWKB() shapeObj.fromWKB() new shapeObj(type, wkb) # a second, optional argument The new msShape* functions could also be used by code in mappostgis.c and mapmygis.c where we currently have two independent (cut and pasted) implementations.
Change History (7)
comment:2 by , 19 years ago
Cc: | added |
---|
I like the idea, but isn't WKB a "binary" encoding? How would that fit in a mapfile? You would encode it in HEX? And how would you generate the WKB for your features? Wouldn't we be better with WKT (or both)? I seem to remember that there was a WKT as well but I could be wrong. Adding Frank to CC since I think he is familiar with that.
comment:4 by , 19 years ago
I would agree that a WKT <-> shapeObj geometries would be useful. I'm not so sure of the value of the WKB <-> shapeObj converter. Sean, where you thinking of doing this because it might be faster than WKT parsing? I would certainly have no objection to having both implemented. Note that the PostGIS driver apparently already does WKB to shapeObj. The mapogr.cpp code also already does OGC data model to shapeObj though using the OGR geometry functions. I am not aware of any code going from shapeObj to OGC simple feature style geometries but if you are "doing this right" I would like to see that as well. Of course shapeObj geometries are not really a 1:1 mapping with OGC simple features so conversion of some types of geometry will not be lossless.
comment:5 by , 19 years ago
I meant WKT, sorry, I assumed that's what Sean was refering too. WKT would be useful via MapScript too. Steve
comment:7 by , 19 years ago
Component: | MapScript → MapScript-SWIG |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
Nevermind, am withdrawing this enhancement proposal.
Note:
See TracTickets
for help on using tickets.