[mapserver-users] Edit a Line shape and save it

Mohamed Saâd HESSANE saad.hessane at gmail.com
Wed Mar 9 05:58:43 EST 2011


Hy everybody,
I work with python mapscript and i want to create a Line shape.
I do this :
   test = mapscript.shapefileObj('test',mapscript.MS_SHAPEFILE_ARC)
   for i in range(len(x))
      test.addPoint(mapscript.pointObj(x[i],y[i],0,0))

When i execute the script, there is two new file in the script directory
(test.shp and test.shx).
But when i do an ogrinfo, there's no data stored in the file :
   $ogrinfo -al test.shp
   INFO: Open of `test.shp'
         using driver `ESRI Shapefile' successful.

   Layer name: test
   Geometry: Line String
   Feature Count: 0
   Extent: (0.000000, 0.000000) - (0.000000, 0.000000)
   Layer SRS WKT:
   (unknown)

can you help me please?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20110309/e59bc2c9/attachment.html


More information about the mapserver-users mailing list