Thanks for `turning-circles.lua`. Some quick queries to make sure I've 
understood correctly:
- The `highways` table is just for this example, it could be the "regular" 
`planet_osm_line`?
- In the `highways_end` table, could this be "node-based" rather than way 
based? The logic of the final SQL query would be that of searching through 
nodes that are turning circles (rather than ways that contain TCs). 
- Is it necessary to pull out the tags of interest into `highways_end`, or can 
you address the way / node directly as in the SQL query above? Otherwise a 
change in "tags of interest" would require a re-import, which would be a big 
flexibility loss. Currently the pain point is making the spatial join, but, 
having done the join, all the tags are available.
- Am I right in thinking that the geometries are included in `highways_end` 
(rather than simply indices) to manage updates / expiry?
- Either way, would the node and way geometries be accessible to the SQL query? 

Connected to the point above, we would want to make the "joining tables" as 
general as possible to avoid a re-import. I think the database structure hasn't 
changed since hstore was introduced, and so we don't want to add features that 
reduce the current flexibility. There are a finite number of features that join 
nodes and ways (fords, turning circles, railway stations) and so it would make 
sense for these all to be imported whether or not the connection is used in the 
styling. Essentially, could `turning_circles` be `nodes_needing_ways` and 
`highways_end` be `nodes_attached_to_ways` and the rest be handled by the 
stylesheet?

 **Often you need the direction of the way to render the node in some special 
way, say a barrier that should be rendered perpendicular to the road**.

Yes, this would definitely be a useful special case. If  remember correctly, 
the French Carto style orients zebra crossings in this way via a [nasty looking 
SQL 
query](https://github.com/cquest/osmfr-cartocss/blob/9a7543eaee34fbb551e45550f3a14a7473639b17/osmfr.yml#L1083)
 involving a spatial join.
 
Other applications I've seen are orienting mountain pass symbols to the road 
direction.


-- 
Reply to this email directly or view it on GitHub:
https://github.com/osm2pgsql-dev/osm2pgsql/discussions/2455#discussioncomment-16520734
You are receiving this because you are subscribed to this thread.

Message ID: 
<osm2pgsql-dev/osm2pgsql/repo-discussions/2455/comments/[email protected]>
_______________________________________________
Tile-serving mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/tile-serving

Reply via email to