[Mapserver-users] Creating dynamic shapefiles with Python Mapscript

Michael Schulz mschulz at webgis.de
Tue Nov 18 08:11:14 PST 2003


Hi Bjoern,

> Or is there a way to add the shapefileObject to 
>the layer? (myLayer.data = myShapefileName didn't work).
>
Well, actually that should work, but not with the shapefileobj, the 
filename of you newly created shapefile is enough (you probably have to 
"close" the new shapefile with shapefileObj=None before). Otherwise if 
you only want to add some features to the layerobj, you can use 
layerobj.addFeature, that only takes a shapeobj, so you don't need a 
shapefileobj.

Cheers, Michael




More information about the MapServer-users mailing list