Vector Format Conversion Using ogr2ogr: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
Ellis Symons (talk | contribs) Created page with "This page lists useful batch file examples for using ogr2ogr.exe. For complete documentation on this tool please visit '''<u>[https://gdal.org/programs/ogr2ogr.html#ogr2ogr gd..." |
Ellis Symons (talk | contribs) No edit summary |
||
| Line 2: | Line 2: | ||
===Basic Format Conversion=== |
===Basic Format Conversion=== |
||
Format conversion can be done using "<tt>-f <format_name></tt>" then specifying the <tt><destination_filename> <source_filename></tt><br> |
Format conversion can be done using "<tt>-f <format_name></tt>" then specifying the "<tt><destination_filename> <source_filename></tt>".<br> |
||
'''SHP to GPKG'''<Br> |
|||
<pre>ogr2ogr.exe -f GPKG 2d_code_M01_R.gpkg 2d_code_M01_R.shp</pre> |
|||
'''MIF to SHP''' - ''assuming only one geometry type exists in the MIF file''<Br> |
|||
<pre>ogr2ogr.exe -f "ESRI Shapefile" 2d_code_M01_R.shp 2d_code_M01.mif</pre> |
|||
Revision as of 20:22, 11 April 2022
This page lists useful batch file examples for using ogr2ogr.exe. For complete documentation on this tool please visit gdal.org/programs/ogr2ogr
Basic Format Conversion
Format conversion can be done using "-f <format_name>" then specifying the "<destination_filename> <source_filename>".
SHP to GPKG
ogr2ogr.exe -f GPKG 2d_code_M01_R.gpkg 2d_code_M01_R.shp
MIF to SHP - assuming only one geometry type exists in the MIF file
ogr2ogr.exe -f "ESRI Shapefile" 2d_code_M01_R.shp 2d_code_M01.mif