Swig and contructor overloading...
steve.lime at DNR.STATE.MN.US
Wed Nov 2 22:50:28 EST 2005
Hi all: Frank and I added some WKT support to MapServer 4.7/8 this past weekend. I updated the Swig interface file for the shapeObj (shape.i) and added a second parameter to the shapeObj constructor. It now looks like:
shapeObj(int type=MS_SHAPE_NULL, char *wkt=NULL)
Ideally you'd be able to create a shape with one or the other. Sean tells me this will be problematic for Java and C# based Swig modules because they don't handle default values. This change will break scripts then. Does anyone know if this is still true in the newest version of Swig? I know they did some work to standardize things across all languages recently. If this will be problem, then we have to address it. We could just tackle it with documentation since those bindings are not yet as popular. We could move creation from WKT into a seperate method. Or?
Note that WKT reading/writing requires either OGR or GEOS support.
More information about the mapserver-dev