feat(db): adjust ticket offices of update-db.sh
This commit is contained in:
parent
c9182b959b
commit
cddb3de560
|
@ -6,10 +6,10 @@ DROP TABLE IF EXISTS :schema.tbl_shop_ticket;
|
||||||
DROP VIEW IF EXISTS :schema.vw_shop_ticket;
|
DROP VIEW IF EXISTS :schema.vw_shop_ticket;
|
||||||
|
|
||||||
CREATE OR REPLACE VIEW :schema.vw_shop_ticket AS
|
CREATE OR REPLACE VIEW :schema.vw_shop_ticket AS
|
||||||
SELECT entity.osm_id, entity."tickets:public_transport", entity.name, entity.st_x, entity.st_y
|
SELECT entity.osm_id, entity.shop, entity.name, entity.st_x, entity.st_y
|
||||||
FROM (
|
FROM (
|
||||||
--planet_osm_point/node
|
--planet_osm_point/node
|
||||||
SELECT osmNode.osm_id, osmNode."tickets:public_transport", osmNode.name,
|
SELECT osmNode.osm_id, osmNode.shop, osmNode.name,
|
||||||
st_x(st_transform(osmNode.way, 4326)) AS st_x,
|
st_x(st_transform(osmNode.way, 4326)) AS st_x,
|
||||||
st_y(st_transform(osmNode.way, 4326)) AS st_y
|
st_y(st_transform(osmNode.way, 4326)) AS st_y
|
||||||
FROM planet_osm_point AS osmNode
|
FROM planet_osm_point AS osmNode
|
||||||
|
@ -20,7 +20,7 @@ WHERE
|
||||||
AND osmNode.proposed IS NULL
|
AND osmNode.proposed IS NULL
|
||||||
UNION
|
UNION
|
||||||
--planet_osm_polygone/way
|
--planet_osm_polygone/way
|
||||||
SELECT osmWay.osm_id, osmWay."tickets:public_transport", osmWay.name,
|
SELECT osmWay.osm_id, osmWay.shop, osmWay.name,
|
||||||
st_x(st_centroid(st_transform(osmWay.way, 4326))) AS st_x,
|
st_x(st_centroid(st_transform(osmWay.way, 4326))) AS st_x,
|
||||||
st_y(st_centroid(st_transform(osmWay.way, 4326))) AS st_y
|
st_y(st_centroid(st_transform(osmWay.way, 4326))) AS st_y
|
||||||
FROM planet_osm_polygon AS osmWay
|
FROM planet_osm_polygon AS osmWay
|
||||||
|
|
Loading…
Reference in New Issue