Skip to content

Commit

Permalink
fix modelled crossings dump
Browse files Browse the repository at this point in the history
  • Loading branch information
smnorris committed Mar 19, 2024
1 parent f51d74f commit 75a265e
Showing 1 changed file with 25 additions and 27 deletions.
52 changes: 25 additions & 27 deletions jobs/release_modelled_stream_crossings
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,31 @@
set -euxo pipefail

#-------
# release modelled crossings
# release modelled crossings as zipped .gpkg
#-------

ogr2ogr \
-f GPKG \
modelled_stream_crossings.gpkg.zip \
PG:$DATABASE_URL \
-nlt PointZM \
-nln modelled_stream_crossings \
-FID modelled_crossing_id \
-sql "select \
modelled_crossing_id, \
modelled_crossing_type, \
array_to_string(modelled_crossing_type_source, '; ') as modelled_crossing_type_source, \
transport_line_id, \
ften_road_section_lines_id, \
og_road_segment_permit_id, \
og_petrlm_dev_rd_pre06_pub_id, \
railway_track_id, \
linear_feature_id, \
blue_line_key, \
downstream_route_measure, \
wscode_ltree, \
localcode_ltree, \
watershed_group_code, \
geom \
from bcfishpass.modelled_stream_crossings"
aws s3 cp modelled_stream_crossings.gpkg.zip s3://bcfishpass/modelled_stream_crossings.gpkg.zip
echo "Latest modelled crossings data now available at:"
echo "https://bcfishpass.s3.us-west-2.amazonaws.com/modelled_stream_crossings.gpkg.zip"
-f GPKG \
modelled_stream_crossings.gpkg.zip \
PG:$DATABASE_URL \
-nlt PointZM \
-nln modelled_stream_crossings \
-sql "select
modelled_crossing_id,
modelled_crossing_type,
array_to_string(modelled_crossing_type_source, '; ') as modelled_crossing_type_source,
transport_line_id,
ften_road_section_lines_id,
og_road_segment_permit_id,
og_petrlm_dev_rd_pre06_pub_id,
railway_track_id,
linear_feature_id,
blue_line_key,
downstream_route_measure,
wscode_ltree,
localcode_ltree,
watershed_group_code,
geom
from bcfishpass.modelled_stream_crossings"

aws s3 cp modelled_stream_crossings.gpkg.zip s3://bcfishpass

0 comments on commit 75a265e

Please sign in to comment.