Skip to content

Commit

Permalink
Merge branch 'master' into host-binding-api
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddewie authored Aug 4, 2024
2 parents 082af5b + 9d48989 commit 41af0dc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion import/docker-startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,13 @@ esac
$PSQL -c "update planet_osm_nodes set tags = null where tags is not null;"
$PSQL -c "update planet_osm_ways set tags = null where tags is not null;"
$PSQL -c "update planet_osm_rels set tags = null where tags is not null;"
# Remove platforms which are not near any railway line, and also not part of any railway route
$PSQL -c "delete from platforms p where not exists(select * from routes r where r.platform_ref_ids @> Array[-p.osm_id]) and not exists(select * from railway_line l where st_dwithin(p.way, l.way, 20));"

echo "Post processing imported data"
$PSQL -f sql/functions.sql
$PSQL -f sql/get_station_importance.sql
$PSQL -f sql/signals_with_azimuth.sql
$PSQL -f sql/get_station_importance.sql
$PSQL -f sql/tile_views.sql

echo "Updating materialized views"
Expand Down
3 changes: 2 additions & 1 deletion import/openrailwaymap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,8 @@ function osm2pgsql.process_way(object)
if gauge_tag then
for gauge in string.gmatch(gauge_tag, '[^;]+') do
if gauge then
table.insert(gauges, gauge)
-- Raw SQL array syntax
table.insert(gauges, "\"" .. gauge:gsub("\"", "\\\"") .. "\"")
end
end
end
Expand Down

0 comments on commit 41af0dc

Please sign in to comment.