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

Add landuse kind to buildings #142

Closed
nvkelso opened this issue Aug 20, 2015 · 10 comments
Closed

Add landuse kind to buildings #142

nvkelso opened this issue Aug 20, 2015 · 10 comments
Assignees

Comments

@nvkelso
Copy link
Member

nvkelso commented Aug 20, 2015

Like we are planning for roads: #136

@rmarianski
Copy link
Member

This one might be a little bit trickier, because currently we don't clip buildings. If a building is completely contained within a landuse polygon it's fine, but if it's just a portion of it, what should we do?

@nvkelso
Copy link
Member Author

nvkelso commented Aug 20, 2015

Thinking out loud:

  • If 100% of a building is contained within a landuse polygon, do get the landuse attribute.
  • If 80% of a building is contained within a landuse polygon, do get the landuse attribute.
  • If 60% of a building is contained within a landuse polygon, don't get the landuse attribute.
  • If 10% of a building is contained within a landuse polygon, don't get the landuse attribute.

80% seems like a good fuzzy containment. The linework can be a little squishy (not line up perfect) but it'll still match. What do you think?

How does this work for buildings that extend past tile edges? We only know post processing for the part in the tile that has overlap with landuse? Do we attempt to resolve the whole shape?

@rmarianski
Copy link
Member

80% seems like a good fuzzy containment. The linework can be a little squishy (not line up perfect) but it'll still match. What do you think?

Sounds reasonable to me.

How does this work for buildings that extend past tile edges? We only know post processing for the part in the tile that has overlap with landuse? Do we attempt to resolve the whole shape?

Yes, I was assuming that we would use the whole shape.

@zerebubuth
Copy link
Member

I couldn't seem to get this to work / display properly in "skin-and-bones", but here's an example showing it in "simple-demo". Before:

building_landuse_kind_before

After tilezen/TileStache#45:

building_landuse_kind_after

Note that the purple buildings are theatres, even when they're in the park, because we're pulling in the building polygon as an "amenity" landuse. To me, this seems a bit weird, and we might want to see if we can be a bit more precise about what "landuse" actually means.

The scene file fragment for the above is:

    buildings:
        data: { source: osm }
        draw:
            polygons:
                order: 6
                color: '#404040'
        in_park:
          filter: { landuse_kind: park }
          draw:
            polygons:
              color: '#608040'
        in_garden:
          filter: { landuse_kind: garden }
          draw:
            polygons:
              color: '#408060'
        in_residential:
          filter: { landuse_kind: residential }
          draw:
            polygons:
              color: '#606070'
        in_theatre:
          filter: { landuse_kind: theatre }
          draw:
            polygons:
              color: '#804060'

@zerebubuth
Copy link
Member

I should have made a note: we can prioritise the landuse values for intersection, which might be a work-around if we wanted the theatre to have landuse_kind: park instead.

@zerebubuth
Copy link
Member

@nvkelso, how does it look?

@nvkelso
Copy link
Member Author

nvkelso commented Sep 11, 2015

Cool!

About the theaters:

  • Feature properties: if the building's amenity tag is theatre than it should be export as kind: theatre (just the same as the address discussion, we should collapse the variety of "landuse" like tags into a single kind property on export).
  • Intercut properties: If it's also in a park, then the exported building features should additionally get landuse_kind: park.

(Edited the feature properties bit to be less confusing)

@nvkelso nvkelso assigned zerebubuth and unassigned nvkelso Sep 11, 2015
@zerebubuth
Copy link
Member

@nvkelso The theatre is already exported as a landuse area - that's why the building is detecting it and setting its landuse_kind: theatre. In general, we should be tie-breaking on the order parameter of the landuse.

Let's consider the case when we have a building inside an apron inside an aerodrome inside a farmland polygon inside a conservation polygon inside a rural polygon (I know much of that doesn't make sense in the real world... but bear with me).

What landuse should that building get, and what sort order should theatre get?

If it's "largest draws last", then theatre "landuse" will get applied to the theatre always, which isn't very useful. If it's anything other than that, then it won't represent what's actually underneath it, because there could be many other layers in between (e.g: between rural & apron).

I think the fix here is to stop pulling amenties which are buildings into the "landuse" layer.

@nvkelso
Copy link
Member Author

nvkelso commented Sep 11, 2015

Let's track the weirdness around buildings ending up in the landuse layer with: #201 and call this work done.

@nvkelso
Copy link
Member Author

nvkelso commented Sep 11, 2015

All PR have been merged.

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

No branches or pull requests

3 participants