feat: make view vw_counties/vw_landkreise dynamic instead of static
This commit is contained in:
parent
cafedf8963
commit
7b88255213
|
@ -0,0 +1,10 @@
|
|||
DROP VIEW public.vw_counties;
|
||||
|
||||
CREATE OR REPLACE VIEW public.vw_counties AS
|
||||
SELECT planet_osm_polygon.osm_id,
|
||||
planet_osm_polygon.name,
|
||||
planet_osm_polygon.boundary,
|
||||
planet_osm_polygon.admin_level,
|
||||
planet_osm_polygon.way
|
||||
FROM planet_osm_polygon
|
||||
WHERE ((planet_osm_polygon.admin_level = ANY (ARRAY['6'::text])) OR (planet_osm_polygon.admin_level = ANY (ARRAY['4'::text])) AND planet_osm_polygon.name = 'Hamburg'::text) AND planet_osm_polygon.boundary = 'administrative'::text
|
|
@ -14,6 +14,7 @@ echo "DB_NAME: $DB_NAME"
|
|||
DB_USER="$2"
|
||||
echo "DB_USER: $DB_USER"
|
||||
#
|
||||
psql -U $DB_USER -f ../vw_counties.sql -d $DB_NAME
|
||||
psql -U $DB_USER -f ../vw_poi.sql -d $DB_NAME
|
||||
#
|
||||
echo "Done."
|
||||
|
|
Loading…
Reference in New Issue