Created
January 26, 2016 11:12
-
-
Save dkerkow/7531cfe47488c169e26f to your computer and use it in GitHub Desktop.
Export Postgis Layer Subset to Spatialite with ogr2ogr, using some options for significant speedup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ogr2ogr \ | |
-progress \ # show progress | |
-dsco SPATIALITE=YES \ # create SQLite DB with spatialite format | |
-f "SQLITE" \ # use SQLite as output format | |
-dsco OGR_SQLITE_CACHE=2048MB \ # use increased cache for speedup | |
-gt 65536 \ # use increased number of rows for each transaction for speedup | |
landuse.db \ # output filename | |
PG:"host=localhost user=osm dbname=osm" \ # Postgresql connection string | |
-sql "SELECT * FROM osm_landusages" # SQL statement for feature selection |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment