Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Last active November 11, 2021 18:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aspose-com-gists/133c6e8b4a613dae32991505c2583e9a to your computer and use it in GitHub Desktop.
Save aspose-com-gists/133c6e8b4a613dae32991505c2583e9a to your computer and use it in GitHub Desktop.
Convert Shapefile to GeoJSON and GeoJSON to Shapefile using C#
string jsonPath = dataDir + "output_out.json";
string outShapefilePath = dataDir + "OutputShapeFile_out.shp";
VectorLayer.Convert(jsonPath, Drivers.GeoJson, outShapefilePath, Drivers.Shapefile);
string shapefilePath = dataDir + "InputShapeFile.shp";
string jsonPath = dataDir + "output_out.json";
VectorLayer.Convert(shapefilePath, Drivers.Shapefile, jsonPath, Drivers.GeoJson);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment