From 0b27a83ab876730cdb6215deed01908f39476244 Mon Sep 17 00:00:00 2001 From: Sybrand Strauss Date: Tue, 3 May 2022 15:43:50 -0700 Subject: [PATCH] updated readme for importing shapefiles --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5385416..6fe8b45 100644 --- a/README.md +++ b/README.md @@ -87,10 +87,17 @@ poetry run python fetch_feature_layer.py https://maps.gov.bc.ca/arcserver/rest/s ### Using a shapefile +-nlt Define the geometry type for the created layer +-lco NAME=VALUE Layer creation option (format specific) +-nln Assign an alternate name to the new layer +-overwrite Delete the output layer and recreate it empty + ```bash -ogr2ogr -f "PostgreSQL" PG:"dbname=tileserv host=localhost user=tileserv password=tileserv" "my_shapefile.shp" -lco precision=NO -nln fire_area_thessian_polygons +ogr2ogr -f "PostgreSQL" PG:"dbname=tileserv host=localhost user=tileserv password=tileserv" "my_shapefile.shp" -nlt MULTIPOLYGON -lco precision=NO -nln fire_area_thessian_polygons -overwrite ``` +_note_ - special characters in the ogr2ogr password string can be escaped with a backslash. + ## Deploy ### Assumptions