[mapserver-users] Create new shapefile using C# MapScript ShapFileObj

sharad fine_sharad at hotmail.com
Fri Nov 2 05:13:09 PDT 2012


 ShapeFileObj class in C# mapscript

I'm trying to export spatial data in esri shape file format. I am using to
export a layer data  of map object into separate shapefile. I'm not having
any run-time failures but my result has only .SHP, .SHX files.



        layerObj lyrObj12 = baseMap.getLayerByName("District"); // baseMap
is mapObj and District is the layerObject name of baseMap
        shapeObj shapeObj = new OSGeo.MapServer.shapeObj(-1);

        resultObj robje = new resultObj(0);

        lyrObj12.open();
        shapeObj = lyrObj12.getShape(robje);

        // lineObj lobj= baseMap.g

        shapefileObj shapeFIle = new shapefileObj(csvFilePath +
"\\testShapeFile.shp", (int)MS_SHAPE_TYPE.MS_SHAPE_LINE); //csvFilePath  is
the location of the local drive

        shapeFIle.add(shapeObj);

        shapeObj.Dispose();
        shapeFIle.Dispose();


Any suggestions would be appreciated. 

Regards
Sharad Subedi




--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Create-new-shapefile-using-C-MapScript-ShapFileObj-tp5013528.html
Sent from the Mapserver - User mailing list archive at Nabble.com.


More information about the mapserver-users mailing list