Opened 10 years ago

Closed 10 years ago

#772 closed enhancement (fixed)

[Mapnik] Motorway_junctions not in Mapnik

Reported by: Skywave Owned by: steve8@…
Priority: minor Milestone: Wishlist
Component: mapnik Version:
Keywords: Cc:

Description

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.

Change History (5)

comment:1 Changed 10 years ago by Skywave

  • Owner changed from tom@… to steve8@…

comment:2 Changed 10 years ago by steve8@…

  • Resolution set to fixed
  • Status changed from new to closed

comment:3 Changed 10 years ago by Skywave

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

comment:4 Changed 10 years ago by rjtehpwn@…

  • Resolution fixed deleted
  • Status changed from closed to reopened

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

comment:5 Changed 10 years ago by steve8@…

  • Resolution set to fixed
  • Status changed from reopened to closed

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

Note: See TracTickets for help on using tickets.