Skip to content
This repository has been archived by the owner. It is now read-only.

[Mapnik] Motorway_junctions not in Mapnik #772

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 3 comments
Closed

[Mapnik] Motorway_junctions not in Mapnik #772

openstreetmap-trac opened this issue Jul 23, 2021 · 3 comments

Comments

@openstreetmap-trac
Copy link

@openstreetmap-trac openstreetmap-trac commented Jul 23, 2021

Reporter: Skywave
[Submitted to the original trac issue database at 2.22pm, Friday, 21st March 2008]

Motorway_junctions would be nice to mapnik, they are pretty much the only way of navigation on motorways. Render suggestion, z14+. Black dot with ref number in it, next to it name of the junction.

@openstreetmap-trac
Copy link
Author

@openstreetmap-trac openstreetmap-trac commented Jul 23, 2021

Author: Skywave
[Added to the original trac issue at 10.06pm, Wednesday, 26th March 2008]

Thanks you added it, but maybe this will improve it even more:

 <Rule> 
 	Filter>[highway] = 'motorway_junction'</Filter> 
 	<MaxScaleDenominator>500000</MaxScaleDenominator> 
 	<MinScaleDenominator>20000</MinScaleDenominator> 
 	<TextSymbolizer name="name" face_name="DejaVu Sans Book" size="9" fill="#6666ff" halo_radius="1" wrap_width="12"/> 
 	<TextSymbolizer name="ref" face_name="DejaVu Sans Book" size="9" fill="#6666ff" halo_radius="1" wrap_width="12" dy="14" min_distance=10/> 
</Rule> 
<Rule> 
 	<Filter>[highway] = 'motorway_junction'</Filter> 
 	<MaxScaleDenominator>20000</MaxScaleDenominator> 
 	<TextSymbolizer name="name" face_name="DejaVu Sans Book" size="13" fill="#6666ff" halo_radius="1" wrap_width="12"/> 
 	<TextSymbolizer name="ref" face_name="DejaVu Sans Book" size="13" fill="#6666ff" halo_radius="1" wrap_width="12" dy=14 min_distance=10/> 
</Rule>

I haven't tested this in my mapnik setup, so you should check it first. But this should avoid that the refs are not rederend. The min_distance should avoid that you will get the save label twice like here http://www.openstreetmap.org/?lat=43.5957&lon=3.9158&zoom=13&layers=B0FT . In the same example you will see that the refs are not rendered while they are tagged

@openstreetmap-trac
Copy link
Author

@openstreetmap-trac openstreetmap-trac commented Jul 23, 2021

Author: rjtehpwn[at]gmail.com
[Added to the original trac issue at 6.43pm, Tuesday, 1st April 2008]

Sorry to disturb you again but i have been tweaking this code in my local mapnik server and came up with this

    <Rule>
      <Filter>[highway] = 'motorway_junction'</Filter>
      <MaxScaleDenominator>500000</MaxScaleDenominator>
      <MinScaleDenominator>200000</MinScaleDenominator>
      <TextSymbolizer name="ref" face_name="DejaVu Sans Book" size="9" fill="#6666ff" halo_radius="1" wrap_width="12" min_distance="20"/>
    </Rule>
    <Rule>
      <Filter>[highway] = 'motorway_junction'</Filter>
      <MaxScaleDenominator>200000</MaxScaleDenominator>
      <MinScaleDenominator>20000</MinScaleDenominator>
      <TextSymbolizer name="ref" face_name="DejaVu Sans Book" size="9" fill="#6666ff" halo_radius="1" wrap_width="12" min_distance="20"/>
      <TextSymbolizer name="name" face_name="DejaVu Sans Book" size="8" fill="#6666ff" halo_radius="1" wrap_width="12" dy="-8" min_distance="20"/>
    </Rule>
    <Rule>
      <Filter>[highway] = 'motorway_junction'</Filter>
      <MaxScaleDenominator>20000</MaxScaleDenominator>
      <TextSymbolizer name="ref" face_name="DejaVu Sans Book" size="13" fill="#6666ff" halo_radius="1" wrap_width="12" min_distance="20"/>
      <TextSymbolizer name="name" face_name="DejaVu Sans Book" size="14" fill="#6666ff" halo_radius="1" wrap_width="12" dy="-14" min_distance="20"/>
    </Rule>

This will make sure ref and name are always separated

@openstreetmap-trac
Copy link
Author

@openstreetmap-trac openstreetmap-trac commented Jul 23, 2021

Author: steve8[at]mdx.ac.uk
[Added to the original trac issue at 7.49pm, Sunday, 6th April 2008]

Skywave's patch above implemented "as is". Original request for black dot was not ever implemented as it clouded rather than calarified.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant