-
Notifications
You must be signed in to change notification settings - Fork 3
/
import_data.sh
executable file
·46 lines (39 loc) · 1.58 KB
/
import_data.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
cd /green/GIS/Data_Repository/OR/Clatsop/lisdata
#docker exec geoserver-db psql -U gis_owner gis_data
SRC_PROJ="EPSG:2913"
DEST_PROJ="EPSG:3857"
SHAPEFILE=ccparks
ogr2ogr -skipfailures -t_srs "EPSG:3857" -f PostgreSQL \
PG:"host=localhost user=gis_owner dbname=gis_data" \
$SHAPEFILE.shp $SHAPEFILE \
-lco GEOMETRY_NAME=geom -lco SCHEMA=clatsop_wm -lco OVERWRITE=YES -lco PRECISION=NO \
-nlt MULTIPOLYGON \
-nln parks
SHAPEFILE=roads
ogr2ogr -skipfailures -t_srs "EPSG:3857" -f PostgreSQL \
PG:"host=localhost user=gis_owner dbname=gis_data" \
$SHAPEFILE.shp $SHAPEFILE \
-lco GEOMETRY_NAME=geom -lco SCHEMA=clatsop_wm -lco OVERWRITE=YES -lco PRECISION=NO \
-nlt MULTILINESTRING \
-nln roads
SHAPEFILE=ccbound
ogr2ogr -skipfailures -t_srs "EPSG:3857" -f PostgreSQL \
PG:"host=localhost user=gis_owner dbname=gis_data" \
$SHAPEFILE.shp $SHAPEFILE \
-lco GEOMETRY_NAME=geom -lco SCHEMA=clatsop_wm -lco OVERWRITE=YES -lco PRECISION=NO \
-nlt MULTIPOLYGON \
-nln county_boundary
SHAPEFILE=watpoly
ogr2ogr -skipfailures -t_srs "EPSG:3857" -f PostgreSQL \
PG:"host=localhost user=gis_owner dbname=gis_data" \
$SHAPEFILE.shp $SHAPEFILE \
-lco GEOMETRY_NAME=geom -lco SCHEMA=clatsop_wm -lco OVERWRITE=YES -lco PRECISION=NO \
-nlt MULTIPOLYGON \
-nln water_poly
SHAPEFILE=accts
ogr2ogr -skipfailures -t_srs "EPSG:3857" -f PostgreSQL \
PG:"host=localhost user=gis_owner dbname=gis_data" \
$SHAPEFILE.shp $SHAPEFILE \
-lco GEOMETRY_NAME=geom -lco SCHEMA=clatsop_wm -lco OVERWRITE=YES -lco PRECISION=NO \
-nlt MULTIPOLYGON \
-nln taxlots