Skip to content

Commit 0883256

Browse files
Merge pull request #140 from rustprooflabs/public_transit
Public transport
2 parents b81106d + b3314bf commit 0883256

9 files changed

+386
-4
lines changed

flex-config/run-no-tags.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ require "style.leisure"
88
require "style.natural"
99
require "style.place"
1010
require "style.poi"
11+
require "style.public_transport"
1112
require "style.road"
1213
require "style.shop"
1314
require "style.traffic"

flex-config/run-no-tags.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
\i sql/traffic.sql
1010
\i sql/place.sql
1111
\i sql/poi.sql
12+
\i sql/public_transport.sql
1213
\i sql/road.sql
1314
\i sql/shop.sql
1415
\i sql/water.sql

flex-config/sql/public_transport.sql

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
COMMENT ON TABLE osm.public_transport_point IS 'OpenStreetMap public transport points - all points with a public_transport tag. Generated by osm2pgsql Flex output using pgosm-flex/flex-config/public_transport.lua';
2+
COMMENT ON TABLE osm.public_transport_line IS 'OpenStreetMap public transport lines - all lines with a public_transport tag. Generated by osm2pgsql Flex output using pgosm-flex/flex-config/public_transport.lua';
3+
COMMENT ON TABLE osm.public_transport_polygon IS 'OpenStreetMap public transport polygons - all polygons with a public_transport tag. Generated by osm2pgsql Flex output using pgosm-flex/flex-config/public_transport.lua';
4+
5+
6+
ALTER TABLE osm.public_transport_point
7+
ADD CONSTRAINT pk_osm_public_transport_point_osm_id
8+
PRIMARY KEY (osm_id)
9+
;
10+
ALTER TABLE osm.public_transport_line
11+
ADD CONSTRAINT pk_osm_public_transport_line_osm_id
12+
PRIMARY KEY (osm_id)
13+
;
14+
ALTER TABLE osm.public_transport_polygon
15+
ADD CONSTRAINT pk_osm_public_transport_polygon_osm_id
16+
PRIMARY KEY (osm_id)
17+
;
18+
19+
20+
CREATE INDEX ix_osm_public_transport_point_type ON osm.public_transport_point (osm_type);
21+
CREATE INDEX ix_osm_public_transport_line_type ON osm.public_transport_line (osm_type);
22+
CREATE INDEX ix_osm_public_transport_polygon_type ON osm.public_transport_polygon (osm_type);
23+
24+
25+
COMMENT ON COLUMN osm.public_transport_point.osm_id IS 'OpenStreetMap ID. Unique along with geometry type.';
26+
COMMENT ON COLUMN osm.public_transport_line.osm_id IS 'OpenStreetMap ID. Unique along with geometry type.';
27+
COMMENT ON COLUMN osm.public_transport_polygon.osm_id IS 'OpenStreetMap ID. Unique along with geometry type.';
28+
29+
COMMENT ON COLUMN osm.public_transport_point.geom IS 'Geometry loaded by osm2pgsql.';
30+
COMMENT ON COLUMN osm.public_transport_line.geom IS 'Geometry loaded by osm2pgsql.';
31+
COMMENT ON COLUMN osm.public_transport_polygon.geom IS 'Geometry loaded by osm2pgsql.';
32+
33+
COMMENT ON COLUMN osm.public_transport_point.osm_type IS 'Key indicating type of public transport feature if detail exists, falls back to public_transport tag. e.g. highway, bus, train, etc';
34+
COMMENT ON COLUMN osm.public_transport_line.osm_type IS 'Key indicating type of public transport feature if detail exists, falls back to public_transport tag. e.g. highway, bus, train, etc';
35+
COMMENT ON COLUMN osm.public_transport_polygon.osm_type IS 'Key indicating type of public transport feature if detail exists, falls back to public_transport tag. e.g. highway, bus, train, etc';
36+
37+
COMMENT ON COLUMN osm.public_transport_point.osm_subtype IS 'Value describing osm_type key, e.g. osm_type = "highway", osm_subtype = "bus_stop".';
38+
COMMENT ON COLUMN osm.public_transport_line.osm_subtype IS 'Value describing osm_type key, e.g. osm_type = "highway", osm_subtype = "bus_stop".';
39+
COMMENT ON COLUMN osm.public_transport_polygon.osm_subtype IS 'Value describing osm_type key, e.g. osm_type = "highway", osm_subtype = "bus_stop".';
40+
41+
COMMENT ON COLUMN osm.public_transport_point.public_transport IS 'Value from public_transport key.';
42+
COMMENT ON COLUMN osm.public_transport_line.public_transport IS 'Value from public_transport key.';
43+
COMMENT ON COLUMN osm.public_transport_polygon.public_transport IS 'Value from public_transport key.';
44+
45+
COMMENT ON COLUMN osm.public_transport_point.wheelchair IS 'Indicates if feature is wheelchair accessible. Expected values: yes, no, limited. Per https://wiki.openstreetmap.org/wiki/Key:wheelchair';
46+
COMMENT ON COLUMN osm.public_transport_line.wheelchair IS 'Indicates if feature is wheelchair accessible. Expected values: yes, no, limited. Per https://wiki.openstreetmap.org/wiki/Key:wheelchair';
47+
COMMENT ON COLUMN osm.public_transport_polygon.wheelchair IS 'Indicates if feature is wheelchair accessible. Expected values: yes, no, limited. Per https://wiki.openstreetmap.org/wiki/Key:wheelchair';
48+

flex-config/sql/shop.sql

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ COMMENT ON COLUMN osm.shop_point.geom IS 'Geometry loaded by osm2pgsql.';
88
COMMENT ON COLUMN osm.shop_polygon.geom IS 'Geometry loaded by osm2pgsql.';
99

1010

11-
COMMENT ON COLUMN osm.shop_point.wheelchair IS 'Indicates if building is wheelchair accessible. Values: yes, no, limited. Per https://wiki.openstreetmap.org/wiki/Key:wheelchair';
12-
COMMENT ON COLUMN osm.shop_polygon.wheelchair IS 'Indicates if building is wheelchair accessible. Values: yes, no, limited. Per https://wiki.openstreetmap.org/wiki/Key:wheelchair';
11+
COMMENT ON COLUMN osm.shop_point.wheelchair IS 'Indicates if feature is wheelchair accessible. Values: yes, no, limited. Per https://wiki.openstreetmap.org/wiki/Key:wheelchair';
12+
COMMENT ON COLUMN osm.shop_polygon.wheelchair IS 'Indicates if feature is wheelchair accessible. Values: yes, no, limited. Per https://wiki.openstreetmap.org/wiki/Key:wheelchair';
1313
COMMENT ON COLUMN osm.shop_point.operator IS 'Entity in charge of operations. https://wiki.openstreetmap.org/wiki/Key:operator';
1414
COMMENT ON COLUMN osm.shop_polygon.operator IS 'Entity in charge of operations. https://wiki.openstreetmap.org/wiki/Key:operator';
1515

@@ -45,7 +45,6 @@ COMMENT ON COLUMN osm.shop_polygon.city IS 'Value from addr:city tag';
4545
COMMENT ON COLUMN osm.shop_polygon.state IS 'Value from addr:state tag';
4646
COMMENT ON COLUMN osm.shop_polygon.postcode IS 'Value from addr:postcode tag';
4747

48-
COMMENT ON COLUMN osm.shop_polygon.wheelchair IS 'Indicates if building is wheelchair accessible.';
4948
COMMENT ON COLUMN osm.shop_point.brand IS 'Identity of product, service or business. https://wiki.openstreetmap.org/wiki/Key:brand';
5049
COMMENT ON COLUMN osm.shop_polygon.brand IS 'Identity of product, service or business. https://wiki.openstreetmap.org/wiki/Key:brand';
5150

@@ -82,7 +81,7 @@ COMMENT ON COLUMN osm.vshop_all.address IS 'Address combined from address parts
8281
COMMENT ON COLUMN osm.vshop_all.name IS 'Best name option determined by helpers.get_name(). Keys with priority are: name, short_name, alt_name and loc_name. See pgosm-flex/flex-config/helpers.lua for full logic of selection.';
8382
COMMENT ON COLUMN osm.vshop_all.geom IS 'Geometry, mix of points loaded by osm2pgsql and points calculated from the ST_Centroid() of the polygons loaded by osm2pgsql.';
8483

85-
COMMENT ON COLUMN osm.vshop_all.wheelchair IS 'Indicates if building is wheelchair accessible.';
84+
COMMENT ON COLUMN osm.vshop_all.wheelchair IS 'Indicates if feature is wheelchair accessible. Values: yes, no, limited. Per https://wiki.openstreetmap.org/wiki/Key:wheelchair';
8685
COMMENT ON COLUMN osm.vshop_all.geom_type IS 'Type of geometry. N(ode), W(ay) or R(elation). Unique along with osm_id';
8786
COMMENT ON COLUMN osm.vshop_all.operator IS 'Entity in charge of operations. https://wiki.openstreetmap.org/wiki/Key:operator';
8887
COMMENT ON COLUMN osm.vshop_all.website IS 'Official website for the feature. https://wiki.openstreetmap.org/wiki/Key:website';

0 commit comments

Comments
 (0)