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

selectively convert some points to buffered geometries #214

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

missinglink
Copy link
Member

@missinglink missinglink commented Jun 19, 2018

This PR 'buffers' Point geometries, effectively turning them in to Polygon geometries.

It's currently only enabled in the UK, where the lack of open data is a real problem, resulting in incorrect labels for the numerous small towns, hamlets and neighbourhoods where we don't have polygon data.

The code is configurable, in terms of the buffer radius and which records are selected to be buffered.

This will likely have an effect on RAM, although doing it in the UK only will mitigate that somewhat.

The default radius of 0.02 degrees was selected as it's the same value that Nominatim uses for the same task, although they also have larger radii for larger geographies, I chose the more conservative approach for now. I did some spot checking and 0.02 works pretty well.

We will probably need to couple this PR with a small update to the query logic, in the case where more than one neighbourhood matches. In that case, we should choose the record which has the closer centroid.

@missinglink
Copy link
Member Author

On retrospection, we can probably skip buffering anything that isn't a neighbourhood to save RAM?

@orangejulius
Copy link
Member

Could be interesting to try both neighbourhood and other layers.

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.

2 participants