[gdal-dev] Using simple ogr2ogr line commands from C# code or another language

Oscar Calderon oscarc at hiltonsoftware.com
Thu May 23 14:25:22 PDT 2024


Hello,
I'm trying to execute these commands from my C# code:

ogr2ogr file1.shp file2.shp

ogr2ogr -update -append filex.shp  filey.shp

ogr2ogr -f GPKG -skipfailures -dialect sqlite -nln xxx file_whatever.gpkg file_whatever.shp

ogr2ogr -sql "sql query" file1.gpkg file2.gpkg

Basically, I'm combining two shapefiles in one, converting the combined file to geo package (gpkg) and then executing some sql queries on this gpkg.

To accomplish this, I've been using Process and ProcessStartInfo (executing a command line from my code), but I want to use the API.
Could someone help me to find the proper documentation or explain how this is done?

Thank you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240523/fe15c960/attachment.htm>


More information about the gdal-dev mailing list