Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Also render junction names on areas #1271

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -1354,7 +1354,7 @@
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over",
"Datasource": {
"extent": "-20037508,-20037508,20037508,20037508",
"table": " (SELECT way, highway, junction, ref, name\n FROM planet_osm_point\n WHERE highway = 'motorway_junction' OR highway = 'traffic_signals' OR junction = 'yes'\n ) AS junctions",
"table": " ( SELECT way, highway, junction, ref, name\n FROM planet_osm_point\n WHERE highway = 'motorway_junction' OR highway = 'traffic_signals' OR junction = 'yes'\n UNION\n SELECT ST_BuildArea(way), highway, junction, ref, name\n FROM planet_osm_line\n WHERE highway = 'motorway_junction' OR highway = 'traffic_signals' OR junction = 'yes'\n ) AS junctions",
"geometry_field": "way",
"type": "postgis",
"key_field": "",
Expand Down
10 changes: 7 additions & 3 deletions project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1294,9 +1294,13 @@ Layer:
Datasource:
<<: *osm2pgsql
table: |2-
(SELECT way, highway, junction, ref, name
FROM planet_osm_point
WHERE highway = 'motorway_junction' OR highway = 'traffic_signals' OR junction = 'yes'
( SELECT way, highway, junction, ref, name
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

two stray spaces before the SELECT

FROM planet_osm_point
WHERE highway = 'motorway_junction' OR highway = 'traffic_signals' OR junction = 'yes'
UNION
SELECT ST_BuildArea(way), highway, junction, ref, name
FROM planet_osm_line
WHERE highway = 'motorway_junction' OR highway = 'traffic_signals' OR junction = 'yes'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if using this you need a you need a !bbox! && way condition in here

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it’s better not to add highway=motorway_junction and highway=traffic_signals here. Both are only defined for nodes, not for areas. (Or is there a technical reason to keep this?)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No technical reason, we could drop it. Are you sure highway=traffic_signals is not defined on junctions, with the recent changes to the tagging scheme?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Finally it was only about junction=yes, leaving complex traffic signal systems for later.

(Maybe I’ll try to re-launch discussion about the traffic signal systems, but I would not wait for this. Currently, I would drop on areas both, highway=motorway_junction and highway=traffic_signals)

) AS junctions
advanced: {}
- id: "roads-text-ref"
Expand Down
1 change: 1 addition & 0 deletions roads.mss
Original file line number Diff line number Diff line change
Expand Up @@ -1842,6 +1842,7 @@
text-halo-radius: 1;
text-wrap-width: 30;
text-min-distance: 2;
text-placement: interior;
[zoom >= 14] {
text-size: 9;
}
Expand Down