Skip to content

Instantly share code, notes, and snippets.

@geographika
Created May 21, 2020 19:14
Show Gist options
  • Save geographika/3ad5fe0c5459f1dae8d28a0ffc4b8459 to your computer and use it in GitHub Desktop.
Save geographika/3ad5fe0c5459f1dae8d28a0ffc4b8459 to your computer and use it in GitHub Desktop.
Convert "3D Multi Line String" geoms to "Geometry: 3D Measured Multi Line String" (add measures) in a spatialite db using ogr2ogr
-- Convert "3D Multi Line String" geoms to "Geometry: 3D Measured Multi Line String" (add measures)
-- in a spatialite db using ogr2ogr
ogr2ogr -update -f "SQLite" db.sqlite db.sqlite -nln "OutputGeomsZM" -sql "SELECT ObjectId, geom FROM SourceTable" -overwrite -nlt MULTILINESTRINGZM
ogrinfo db.sqlite OutputGeomsZM -so
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment