-
Notifications
You must be signed in to change notification settings - Fork 15
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
Approximate polygons for areas/levels where they are missing #19
Comments
That can be a nice approach! Won't we need to weight the admin (with their population, area or whatever) ? And I think a dumb approach prioritizing admin's with boundary (at the same have you checked if there is a Voronoi rust implementation ? 🤣 |
What worked so far solely using postgis:
* Cities that have a polygon keep it,
* Boundaries of a higher level are also kept.
The weighting is something we are curently working on. I am not sure
exactly how it will result
…On 1 February 2018 at 10:38, Antoine D ***@***.***> wrote:
That can be a nice approach!
Won't we need to weight the admin (with their population, area
<https://www.wikidata.org/wiki/Property:P2046> or whatever) ?
And I think a dumb approach prioritizing admin's with boundary (at the
same ZoneType) can be enough no ?
have you checked if there is a Voronoi rust implementation ? 🤣
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#19 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAvywzo6CzuOPX7MaG8Pu_fwHcxJP95ks5tQYYIgaJpZM4RzDqt>
.
|
I doubt population is relevant. |
What is commonly available in data are population and place tag type. Not much more widely available so will have to do. In preliminary tests, population seems relevant to give a little more weight to bigger towns. |
After some testing, it seems that weighting is not a good idea : municipalities that are cities are not always larger than villages. The mistake was to confuse the urban area (often composed of many municipalities in cities) with the area of the municipality (often consists of fields and forest in rural areas). So the good news is that it’s way simpler ;) Example of the exploration of parameters : |
cool! so a simple voronoi is enough ? |
It would appear so! |
The Problem
There are a lot of areas around the world where it is close to impossible to obtain a proper partition of a country with available polygon data for all levels (especially city and below).
On the other hand, OSM has an abundance of city nodes for example.
How we can solve this
A first order approximation of the polygons for levels where OSM has a good coverage of nodes could be done via a Voronoi Diagram (https://en.wikipedia.org/wiki/Voronoi_diagram).
In practice
For preliminary tests, Postgis offers the
ST_VoronoiPolygons
(https://postgis.net/docs/ST_VoronoiPolygons.html) function.Example output applied to a set of city nodes:
This method would need to be refined and robustified to adapt to existing admin levels of higher level and situations where data is partially available (and other scenarios that might emerge).
The text was updated successfully, but these errors were encountered: