MapScript lineObj to create a Point?

Tyler Mitchell tylermitchell at SHAW.CA
Tue Feb 1 00:13:08 EST 2005


Am I reading the docs right?

I want to create a point shapefile, but need to first create a lineObj
and .add() to it.  Then .add() that lineObj to my ShapeObj...then .add() that
to my shapefileObj?

This is the best I can come up with as an example.  Can I shortcut this at
all?

myPoints = mapscript.pointObj(-121, 54)
myShapes = mapscript.shapeObj(0)
myLine = mapscript.lineObj()
myLine.add(myPoints)
myShapes.add(myLine)
myShapefile = mapscript.shapefileObj("myshapefile.shp",1)
myShapefile.add(myShapes)



More information about the mapserver-users mailing list