csv to shapefile source code for c# #79
-
I need to convert a csv file into a shapefile in a .Net6 windows application written in cshapr. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
I don't think so - there is nothing in C# samples. Another approach is to port some code from python: |
Beta Was this translation helpful? Give feedback.
-
You might try DotSpatial. |
Beta Was this translation helpful? Give feedback.
I don't think so - there is nothing in C# samples.
It will be easier to invoke ogr2ogr.
https://gis.stackexchange.com/a/276607
https://gdal.org/drivers/vector/csv.html
Another approach is to port some code from python:
https://gis.stackexchange.com/questions/202922/create-shapefile-from-csv-using-ogr-and-python
https://pcjericks.github.io/py-gdalogr-cookbook/vector_layers.html#read-a-csv-of-coordinates-as-an-ogrvrtlayer
Manually create a file and populate Shapefile:
https://pcjericks.github.io/py-gdalogr-cookbook/vector_layers.html#create-a-new-shapefile-and-add-data