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

Sort out generated features for landuse, buildings & POIs #72

Merged
merged 14 commits into from
Oct 15, 2015

Conversation

zerebubuth
Copy link
Member

This PR contains:

  • Updates for buildings: we now have a "purely building" kind and aren't pulling in extra properties from amenities. If these need labelling, then that now should come from the POIs layer directly.
  • Civic Center Park was showing some weirdness with the footpath around its boundary. This turned out to be due to mixed geometry types in the intercut results. The new flattening and filtering functions for geometries ensure that we get the types of geometries expected from the cut, but also don't throw away bits with different geometries.
  • Added a function to generate address points from buildings. These are different from label points (although the label points also have addresses). We get some address points directly from points in the table, but this extracts representative points for buildings too, and normalises the building name to an address where it's purely numeric (which seems quite common).
  • Added a "drop features where" post-processing function which allows dropping landuse polygons which would be duplicated by building polygons and we want to keep the building over the landuse. The reason we don't just not select it is that we still want the representative point for labelling.

Connects to tilezen/vector-datasource#201.

@rmarianski could you review, please?

feature_layers, zoom, source_layer=None, start_zoom=0):
"""
Generates address points from building polygons where there is an
addr:housenumber tag on the building. Removes those tags from the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this introduce potential backwards incompatibility that we should note in the CHANGELOG?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, there are lots of changes from these PRs... is the appropriate thing to include updates to the changelog in the PR, or just flag them for the changelog to be updated when pushing & tagging a new version?

…eful information (the area probably isn't zero, just unspecified).
if len(parts) == 0:
# the only way we can signal an empty geometry, as
# MultiPoint([]) throws an exception.
return GeometryCollection()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MultiPoint() seems to work though, and the others with no args seem to as well. We'd want to use the appropriate geometry constructor based on keep_dim right? I'm not sure if that's worth it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch - I didn't even try just MultiPoint(). I've extracted the constructors in 15ed909 - hopefully that looks better?

@rmarianski
Copy link
Member

👍

zerebubuth added a commit that referenced this pull request Oct 15, 2015
Sort out generated features for landuse, buildings & POIs
@zerebubuth zerebubuth merged commit 7254627 into integration-1 Oct 15, 2015
@zerebubuth zerebubuth deleted the 201-sort-out-landuse-buildings-pois branch October 15, 2015 17:35
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

Successfully merging this pull request may close these issues.

3 participants