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

George Washington National Forest should not be a national park #987

Closed
zerebubuth opened this issue Aug 24, 2016 · 9 comments
Closed

George Washington National Forest should not be a national park #987

zerebubuth opened this issue Aug 24, 2016 · 9 comments
Assignees
Milestone

Comments

@zerebubuth
Copy link
Member

zerebubuth commented Aug 24, 2016

George Washington National Forest currently comes through with kind: national_park, but shouldn't.

Relevant tags on the object:

  • boundary=national_park
  • landuse=forest
  • leisure=nature_reserve
  • operator=US Forest Service

Do we want some combination of these to override the choice of kind: national_park?

@zerebubuth zerebubuth added this to the v1.1.0 milestone Aug 24, 2016
@nvkelso nvkelso modified the milestones: v1.0.0, v1.1.0 Aug 25, 2016
@nvkelso
Copy link
Member

nvkelso commented Aug 25, 2016

Good catch! Browsing around the USA this seems fairly common and probably the root cause of a lot of our cludgy filter shims.

If we see the operator is United States Forest Service (we normalize a list of values into that in post-processing) it should be kind:forest instead of kind:national_park.

I've had good success in the scene file also paring with protect_class (to insist that a national_park can't be operated by USFS and it should generally be in only 2, 3, and 5 protect_class :

            national_park:
                filter:
                    all:
                        - kind: [national_park, battlefield, protected_area]
                    any:
                        - not: { operator: [ "United States Forest Service" ] }
                        - protect_class: ['2','3','5']
  • Example Stanislaus National Forest in California near Yosemite should be kind:forest.
  • Stanislaus happened to have protect_class = 6, which is how we end up drawing national forests in the scene file. But this other Humboldt forest in Nevada has protect_class 5 so that's not guaranteed, should be kind:forest.

I suspect these might address edge cases, while the dominant case is the example above.

  • landuse=forest I think this isn't worth pursing at this time as I've only found one case which is already addressed by the other logic, and I suspect this may do some harm unless further researched and it's an edge case so skip.
  • leisure=nature_reserve in Smith River is already taken care of by operator (should be kind:forest).
  • Counter example is Mojave National Preserve which is operated by United States National Park Service so we don't want it to become a forest (it should be kind:national_park).
  • Point Reyes is also leisure=nature_reserve but without an operator but with a protect_class of 2 (it should be kind:national_park, but might need some data work?), until data is fixed I think it'd come thru as kind:nature_reserve?
  • leisure=park in San Luis Reservoir State Recreational Area has boundary=national_park and leisure=park and
    park:type=state_recreational_area and no protect_class. This shouldn't be a kind national_park, just a kind:park!
  • Example forest in Colorado that only gets demoted because of protect_class is present as 6 but operator is missing. Gets demoted to what, though? propose kind:park since there isn't an operator to say forest, and it's not a national park. Alternatively boundary:type=protected_area could give us kind: protected_area instead.

@nvkelso
Copy link
Member

nvkelso commented Aug 31, 2016

  • leisure=nature_reserve in North Farallon Islands State Marine Reserve has boundary=protected_area with protect_class=4 in tile 11/323/791. It's operator=California Department of Fish & Wildlife so we'd just want this to be kind:nature_reserve.
  • leisure=nature_reserve in Mount Tamalpais Watershed has boundary=national_park with boundary:type=protected_area and operator=Marin Municipal Water District and protect_class=4. It should just be kind:nature_reserve.
  • leisure=common in Blithedale Summit Open Space Preserve with boundary=national_park and boundary:type=protected_area and protect_class=5 and operator=Marin County Parks should just be kind:common.
  • leisure=nature_reserve in Glen Canyon National Recreation Area with boundary=national_park and boundary:type=protected_area and protect_class=5 and protection_title=National Recreation Area which I think should default to kind:nature_reserve.

@nvkelso
Copy link
Member

nvkelso commented Aug 31, 2016

nature-reserve-boundaries

Looking at the OSM CartoCSS files, it looks like the special outline coloring on osm.org is being driven on:

Snippet from "nature-reserve-boundaries" MML:

SELECT\n way,\n name,\n boundary,\n way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels\n FROM planet_osm_polygon\n WHERE (boundary = 'national_park' OR leisure = 'nature_reserve')\n AND building IS NULL\n AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real\n) AS national_park_boundaries

(Is boundary=protected_area ever drawn in the default OSM.org map? There are 10s of thousands of protected_area features in OSM, so I think we should keep including them in Tilezen.)

Some OSM wiki page definitions:

Here's what we do now:

landuse.jinja2#L82:

  AND (tags->'boundary' IN ('national_park', 'protected_area') OR tags->'leisure'='nature_reserve')

landuse.yaml#L5-L13

I think the order should be more like:

  • national_park with US National Park Service
  • forest that are protect_class 6 or operator US National Forest Service
  • common
  • nature_reserve
  • park
  • other national_park
  • protected_area
  • other forest

And what we have now:

  - filter: {boundary: national_park}
    min_zoom: zoom + 2
    output: {kind: national_park}
  - filter: {boundary: protected_area}
    min_zoom: zoom + 2
    output: {kind: protected_area}
  - filter: {leisure: nature_reserve}
    min_zoom: zoom + 2
    output: {kind: nature_reserve}
  - filter:
      any:
        leisure: park
        landuse: park
    min_zoom: GREATEST(LEAST(zoom, 16), 9)
    output: {kind: park}
  - filter: {leisure: common}
    min_zoom: GREATEST(LEAST(zoom, 16), 9)
    output: {kind: common}
  - filter: 
      landuse: forest
      protect_class: '6'
    min_zoom: GREATEST(LEAST(zoom, 14), 7)
    output: {kind: forest}
  - filter: {landuse: forest}
    min_zoom: GREATEST(LEAST(zoom, 14), 9)
    output: {kind: forest}

theme parks and zoos

Similarly the reason why theme parks and zoos get an outline treatment is:

Snippet from "tourism-boundary" in MML:

(SELECT\n way,\n way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels,\n name,\n tourism\n FROM planet_osm_polygon\n WHERE tourism = 'theme_park'\n OR tourism = 'zoo'\n) AS tourism_boundary

I don't think we need any special handling for kind:theme_park or kind:zoo because they are straight forward (same as their original features).

@nvkelso
Copy link
Member

nvkelso commented Aug 31, 2016

More examples:

  • leisure=nature_reserve in Parque Natural Sierra de Andújar with finally kind:nature_reserve.
  • boundary=protected_area in Naturpark Steigerwald with protect_class=5 should end up with kind: protected_area
  • boundary=national_park in Muir Woods National Monument with leisure=nature_reserve and operator=National Park Service and protect_class=3 should end up with kind:national_park
  • leisure=park in Henry W. Coe State Park with boundary=protected_area and protect_class=5 should end up with kind:park.
  • operator=United States National Park Service and protect_class=2 in Yosemite National Park with boundary=national_park and leisure=nature_reserve should end up with kind:national_park.
  • operator=United States National Park Service and protect_class=2 in Redwood National Park with boundary=national_park and leisure=nature_reserve should end up with kind:national_park.
  • operator=United States National Park Service and protect_class=2 in Yellowstone National Park with boundary=national_park and leisure=nature_reserve should end up with kind:national_park.
  • boundary=national_park in Adirondack Park should end up with kind:park.
  • operator=United States National Park Service and protect_class=2 in Shenandoah National Park with boundary=national_park and leisure=park should end up with kind:national_park.
  • designation=national_park in Cairngorms National Park with boundary=national_park should end up with kind:national_park.
  • boundary=national_park in North Wessex Downs AONB with designation=area_of_outstanding_natural_beauty should end up with kind:park.
  • operator:en=Parks Canada and boundary=national_park in Riding Mountain National Park with leisure=nature_reserve.

@zerebubuth zerebubuth self-assigned this Sep 6, 2016
@zerebubuth zerebubuth added in review and removed ready labels Sep 6, 2016
@zerebubuth
Copy link
Member Author

Blocked on #997 - there are too many changes in that PR to proceed with this one.

@zerebubuth
Copy link
Member Author

Work in progress on the 987 national forests branch. I hit one snag with the examples above:

boundary=national_park in Adirondack Park should end up with kind:park.

The only relevant tag on Adirondack Park is boundary=national_park - it has no operator or boundary:type or protect_class, or even leisure or natural. Do you want all such boundary=national_park to be just park instead of national_park when there aren't other tags such as protect_class or operator to "lift" them up to national_park status? In other words, should the default kind for boundary=national_park be park or national_park, in the absence of other distinguishing information?

This will change the behaviour for a lot of existing tests.

Example forest in Colorado that only gets demoted because of protect_class is present as 6 but operator is missing. Gets demoted to what, though? propose kind:park since there isn't an operator to say forest, and it's not a national park. Alternatively boundary:type=protected_area could give us kind: protected_area instead.

I took the liberty of changing this to kind: forest, as it has a protection_title=National Forest and protection_title seems to be reasonably well-used. I thought it fits better with the name "Arapaho National Forest" and it does appear to be operated by USFS, despite the lack of operator tag.

@zerebubuth zerebubuth assigned nvkelso and unassigned zerebubuth Sep 8, 2016
@nvkelso
Copy link
Member

nvkelso commented Sep 9, 2016

For your boundary=national_park in Adirondack Park example, I think it should go to park in the absence of other distinguishing information. (Just like the ref & network plus shield_text stuff, I sense some Targeted Editing opportunities improve the underlying OSM data. In the meantime it sounds like we'll need to update tests.)

💯 Good call on the protection_title logic for the forest in Colorado!

@nvkelso
Copy link
Member

nvkelso commented Sep 22, 2016

I'm still working my way thru this one, but so far so good :)

@nvkelso nvkelso assigned nvkelso and unassigned zerebubuth Sep 22, 2016
@nvkelso
Copy link
Member

nvkelso commented Sep 22, 2016

Let's ship this!

Two minor points to fix in later releases:

  1. Besides park labels showing up too late & too early (let's fix next release in POI labels for parks show up too late / too early #1081), I think we're good to go :)
  2. This one isn't working (still shows up as national_park), followup in pois/landuse: "park" in Marin shouldn't be national_park (instead common) #1082:
    • leisure=common in Blithedale Summit Open Space Preserve with boundary=national_park and boundary:type=protected_area and protect_class=5 and operator=Marin County Parks should just be kind:common.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants