Vector Format Conversion Using ogr2ogr: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 30:
:* ''<tt>-append</tt>'': appends the layer into an existing database
<pre>ogr2ogr.exe -f GPKG -nln 2d_code_M01_R -append existing_database.gpkg 2d_code_M01_R.shp</pre>
 
==Converting MIF File With Multiple Geometry Types==
<Br>
''MIF With Multiple Geometry Types To SHP''<br>
:* ''<tt>-where <clause></tt>'': "-where" can be used to specify a clause to only select a given geometry type
<pre>ogr2ogr.exe -f "ESRI Shapefile" -where ""OGR_GEOMETRY='Point'"" 2d_zsh_P.shp 2d_zsh.mif
<pre>ogr2ogr.exe -f "ESRI Shapefile" -where ""OGR_GEOMETRY='LineString'"" 2d_zsh_L.shp 2d_zsh.mif
<pre>ogr2ogr.exe -f "ESRI Shapefile" -where ""OGR_GEOMETRY='Polygon'"" 2d_zsh_R.shp 2d_zsh.mif</pre>