Skip to content

Commit

Permalink
Merge pull request #9 from bcgov/sybrand/update_readme
Browse files Browse the repository at this point in the history
updated readme for importing shapefiles
  • Loading branch information
Sybrand committed May 3, 2022
2 parents a2aa3f3 + 0b27a83 commit 0f7dee1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,17 @@ poetry run python fetch_feature_layer.py https://maps.gov.bc.ca/arcserver/rest/s

### Using a shapefile

-nlt <type> Define the geometry type for the created layer
-lco NAME=VALUE Layer creation option (format specific)
-nln <name> 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
Expand Down

0 comments on commit 0f7dee1

Please sign in to comment.