Skip to content

Commit

Permalink
Merge pull request #287 from OpenHistoricalMap/staging
Browse files Browse the repository at this point in the history
Add service tags for gen0 and gen1 - tiler
  • Loading branch information
Rub21 authored Apr 12, 2024
2 parents 1583d5f + 6c8acd1 commit d7e0dd4
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 58 deletions.
4 changes: 3 additions & 1 deletion images/tiler-server/config/config.template.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ max_connections = 50
[['providers/landuse_lines.toml']]
[['providers/landuse_points.toml']]

###### Transport lines from ways
###### Transport lines, points and areas from ways
[['providers/transport_points.toml']]
[['providers/transport_lines.toml']]
[['providers/transport_areas.toml']]

###### Amenities areas and points
[['providers/amenity_areas.toml']]
Expand Down
23 changes: 23 additions & 0 deletions images/tiler-server/config/providers/transport_areas.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[[providers.layers]]
name = "transport_areas"
geometry_fieldname = "geometry"
geometry_type = "multipolygon"
id_fieldname = "id"
sql = """
SELECT
ST_AsMVTGeom(geometry, !BBOX!) AS geometry,
id,
osm_id,
name,
class,
type,
area,
tags->'start_date' AS start_date,
tags->'end_date' AS end_date,
isodatetodecimaldate(pad_date(tags->'start_date', 'start'), FALSE) AS start_decdate,
isodatetodecimaldate(pad_date(tags->'end_date', 'end'), FALSE) AS end_decdate
FROM
osm_transport_areas
WHERE
geometry && !BBOX!
"""
80 changes: 27 additions & 53 deletions images/tiler-server/config/providers/transport_lines.toml
Original file line number Diff line number Diff line change
@@ -1,52 +1,3 @@
# Layer configuration for transport points
[[providers.layers]]
name = "transport_points"
geometry_fieldname = "geometry"
geometry_type = "point"
id_fieldname = "id"
sql = """
SELECT
ST_AsMVTGeom(geometry, !BBOX!) AS geometry,
id,
osm_id,
name,
class,
type,
tags->'start_date' AS start_date,
tags->'end_date' AS end_date,
isodatetodecimaldate(pad_date(tags->'start_date', 'start'), FALSE) AS start_decdate,
isodatetodecimaldate(pad_date(tags->'end_date', 'end'), FALSE) AS end_decdate
FROM
osm_transport_points
WHERE
geometry && !BBOX!
"""

# Layer configuration for transport areas
[[providers.layers]]
name = "transport_areas"
geometry_fieldname = "geometry"
geometry_type = "multipolygon"
id_fieldname = "id"
sql = """
SELECT
ST_AsMVTGeom(geometry, !BBOX!) AS geometry,
id,
osm_id,
name,
class,
type,
area,
tags->'start_date' AS start_date,
tags->'end_date' AS end_date,
isodatetodecimaldate(pad_date(tags->'start_date', 'start'), FALSE) AS start_decdate,
isodatetodecimaldate(pad_date(tags->'end_date', 'end'), FALSE) AS end_decdate
FROM
osm_transport_areas
WHERE
geometry && !BBOX!
"""

# Layer configuration for transport lines gen0
[[providers.layers]]
name = "transport_lines_gen0"
Expand All @@ -60,7 +11,8 @@ SELECT
type,
tunnel,
bridge,
ref,
ref,
service,
tags->'electrified' AS electrified,
tags->'highspeed' AS highspeed,
tags->'usage' AS usage,
Expand Down Expand Up @@ -90,6 +42,7 @@ SELECT
ref,
class,
type,
service,
tags->'electrified' AS electrified,
tags->'highspeed' AS highspeed,
tags->'usage' AS usage,
Expand All @@ -100,7 +53,13 @@ SELECT
FROM
osm_transport_lines_gen1
WHERE
type IN ('motorway', 'trunk', 'primary', 'primary_link', 'secondary', 'motorway_link', 'trunk_link', 'rail', 'subway', 'light_rail', 'tram', 'narrow_gauge', 'monorail', 'preserved', 'miniature', 'funicular', 'taxiway', 'runway', 'proposed', 'construction', 'disused', 'abandoned', 'razed', 'ferry')
type IN (
'motorway', 'trunk', 'primary', 'primary_link', 'secondary',
'motorway_link', 'trunk_link', 'rail', 'subway', 'light_rail',
'tram', 'narrow_gauge', 'monorail', 'preserved', 'miniature',
'funicular', 'taxiway', 'runway', 'proposed', 'construction',
'disused', 'abandoned', 'razed', 'ferry'
)
AND geometry && !BBOX!
"""

Expand Down Expand Up @@ -134,7 +93,14 @@ SELECT
FROM
osm_transport_lines
WHERE
type IN ('motorway', 'motorway_link', 'trunk', 'trunk_link', 'primary', 'primary_link', 'secondary', 'secondary_link', 'tertiary', 'tertiary_link', 'rail', 'subway', 'light_rail', 'tram', 'narrow_gauge', 'monorail', 'preserved', 'miniature', 'funicular', 'taxiway', 'runway', 'proposed', 'construction', 'disused', 'abandoned', 'razed', 'apron', 'ferry')
type IN (
'motorway', 'motorway_link', 'trunk', 'trunk_link',
'primary', 'primary_link', 'secondary', 'secondary_link',
'tertiary', 'tertiary_link', 'rail', 'subway', 'light_rail',
'tram', 'narrow_gauge', 'monorail', 'preserved', 'miniature',
'funicular', 'taxiway', 'runway', 'proposed', 'construction',
'disused', 'abandoned', 'razed', 'apron', 'ferry'
)
AND geometry && !BBOX!
"""

Expand Down Expand Up @@ -169,7 +135,15 @@ SELECT
FROM
osm_transport_lines
WHERE
type IN ('motorway', 'motorway_link', 'trunk', 'trunk_link', 'primary', 'primary_link', 'secondary', 'secondary_link', 'tertiary', 'tertiary_link', 'rail', 'subway', 'light_rail', 'tram', 'narrow_gauge', 'monorail', 'preserved', 'miniature', 'funicular', 'taxiway', 'runway', 'residential', 'taxiway', 'runway', 'proposed', 'construction', 'disused', 'abandoned', 'razed', 'apron', 'ferry')
type IN (
'motorway', 'motorway_link', 'trunk', 'trunk_link',
'primary', 'primary_link', 'secondary', 'secondary_link',
'tertiary', 'tertiary_link', 'rail', 'subway', 'light_rail',
'tram', 'narrow_gauge', 'monorail', 'preserved',
'miniature', 'funicular', 'taxiway', 'runway', 'residential',
'taxiway', 'runway', 'proposed', 'construction', 'disused',
'abandoned', 'razed', 'apron', 'ferry'
)
AND geometry && !BBOX!
"""

Expand Down
23 changes: 23 additions & 0 deletions images/tiler-server/config/providers/transport_points.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Layer configuration for transport points
[[providers.layers]]
name = "transport_points"
geometry_fieldname = "geometry"
geometry_type = "point"
id_fieldname = "id"
sql = """
SELECT
ST_AsMVTGeom(geometry, !BBOX!) AS geometry,
id,
osm_id,
name,
class,
type,
tags->'start_date' AS start_date,
tags->'end_date' AS end_date,
isodatetodecimaldate(pad_date(tags->'start_date', 'start'), FALSE) AS start_decdate,
isodatetodecimaldate(pad_date(tags->'end_date', 'end'), FALSE) AS end_decdate
FROM
osm_transport_points
WHERE
geometry && !BBOX!
"""
2 changes: 1 addition & 1 deletion ohm/requirements.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dependencies:
- name: osm-seed
version: '0.1.0-n790.hfb2d63a'
version: '0.1.0-n791.hae1c111'
repository: https://devseed.com/osm-seed-chart/
6 changes: 3 additions & 3 deletions values.staging.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ osm-seed:
# Variables for nominatim api
# ====================================================================================================
nominatimApi:
enabled: true
enabled: false
serviceAnnotations:
service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout: "300"
ingressDomain: nominatim-api.staging.openhistoricalmap.org
Expand Down Expand Up @@ -623,7 +623,7 @@ osm-seed:
# Variables for overpass-api
# ====================================================================================================
overpassApi:
enabled: true
enabled: false
serviceAnnotations:
service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout: "300"
ingressDomain: overpass-api.staging.openhistoricalmap.org
Expand Down Expand Up @@ -656,7 +656,7 @@ osm-seed:
# Variables for taginfo
# ====================================================================================================
taginfo:
enabled: true
enabled: false
serviceAnnotations:
service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout: "300"
ingressDomain: taginfo.staging.openhistoricalmap.org
Expand Down

0 comments on commit d7e0dd4

Please sign in to comment.