Opened 9 years ago

Closed 5 years ago

#3300 closed enhancement (duplicate)

[admin] Render admin_level=6 At Lower Zoom levels - US County Boundaries

Reported by: ezekielf@… Owned by: mapnik-team@…
Priority: minor Milestone:
Component: mapnik Version:
Keywords: Cc:

Description

I'd like to request that admin_level=6 boundaries get rendered at z9 and z10 as well as the z11-z18 that they currently render on. Here's the long story of why:

In some areas of the US county boundaries are rendered as a faint, solid line at zoom levels 9, 10, and 11 but are invisible when you zoom in further. In other areas, county boundaries are rendered as a thicker dashed line from zoom 11 to 18. After some digging I think I understand what's going on. The ones that render from z11-z18 always seem to be tagged with admin_level=8, while the ones that render from z9-z11 seem to never have an admin_level tag, just a boundary=administrative tag. In the layer-admin.xml.inc Mapnik stylesheet I found the following two rules:

    <Rule>
      <Filter>[admin_level]='6'</Filter>
      &maxscale_zoom11;
      <LineSymbolizer>
        <CssParameter name="stroke">purple</CssParameter>
        <CssParameter name="stroke-width">2</CssParameter>
        <CssParameter name="stroke-dasharray">6,3,2,3</CssParameter>
        <CssParameter name="stroke-opacity">0.3</CssParameter>
      </LineSymbolizer>
    </Rule>

   <Rule>
      <Filter>not [admin_level] &lt;&gt;''</Filter>
      &maxscale_zoom9;
      &minscale_zoom11;
      <LineSymbolizer>
        <CssParameter name="stroke">purple</CssParameter>
        <CssParameter name="stroke-width">1</CssParameter>
        <CssParameter name="stroke-opacity">0.2</CssParameter>
      </LineSymbolizer>
   </Rule>

It appears that county boundaries with no admin level specified are falling into a general administrative boundary rule that only renders from z9-z11, while the admin_level=8 ones are rendering at z11 and higher. Correct me if I'm wrong about this.

All the county boundaries ought to be tagged with admin_level=6, but clearly that's not the case in most areas of the US. The thing is that the rendering of counties at z9 and z10 is appropriate and applying admin_level=6 to them makes them not render until z11. It's disappointing to see the boundaries disappear as I tag them properly. Here are two examples at z9:

Michigan where counties have no admin level specified: http://www.informationfreeway.org/?lat=42.90583193200092&lon=-84.79784614733929&zoom=9&layers=0FB0F0

Vermont where counties are tagged properly with admin_level=6: http://www.informationfreeway.org/?lat=44.36429668148654&lon=-72.85502341669834&zoom=9&layers=0FB0F0

I think the Vermont map would benefit from showing counties at that level

Change History (5)

comment:1 Changed 9 years ago by NE2

Certainly. I don't know why boundaries with no admin_level are rendered at all.

comment:2 Changed 6 years ago by DENelson83

Strangely, boundary ways with tags "boundary=administrative" and "border_type=county" are rendered at zoom levels 9 and 10, but if you add "admin_level=6" to those very same ways, they disappear at those zoom levels. If you want an example of this, see what I—rather disruptively, in retrospect—did with the county lines of Washington and Oregon, and compare them to the Idaho county lines. You need to fix it so that ways with tags "boundary=administrative" and "admin_level=6" will render county boundaries at zoom levels 9 and 10 with the thin purple line and at zoom levels 11 and higher with the thick purple line, while the deprecated key "border_type" should have no impact at all on how they're rendered.

Last edited 6 years ago by DENelson83 (previous) (diff)

comment:3 Changed 5 years ago by math1985

Summary: Render admin_level=6 At Lower Zoom levels - US County Boundaries[admin] Render admin_level=6 At Lower Zoom levels - US County Boundaries

comment:4 Changed 5 years ago by math1985

Recent links: http://www.openstreetmap.org/#map=9/42.9058/-84.7978 http://www.openstreetmap.org/#map=9/44.3643/-72.8550

Note that both areas now have admin_level=6 added to them.

Not sure what to do with this - I also don't want admin borders dominating the map, which they might in other countries if we render them at earlier zoomlevels.

comment:5 Changed 5 years ago by math1985

Resolution: duplicate
Status: newclosed

This is now being discussed on Github: https://github.com/gravitystorm/openstreetmap-carto/issues/622 Therefore, I will close the issue here.

Note: See TracTickets for help on using tickets.