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

Approximate polygons for areas/levels where they are missing #19

Open
poudro opened this issue Jan 30, 2018 · 7 comments
Open

Approximate polygons for areas/levels where they are missing #19

poudro opened this issue Jan 30, 2018 · 7 comments

Comments

@poudro
Copy link

poudro commented Jan 30, 2018

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:
screen shot 2018-01-30 at 10 39 17 pm

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).

@antoine-de
Copy link
Contributor

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 ZoneType) can be enough no ?

have you checked if there is a Voronoi rust implementation ? 🤣

@Tristramg
Copy link
Contributor

Tristramg commented Feb 1, 2018 via email

@TeXitoi
Copy link

TeXitoi commented Feb 1, 2018

I doubt population is relevant.

@poudro
Copy link
Author

poudro commented Feb 1, 2018

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.

@Tristramg
Copy link
Contributor

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 :

screenshot from 2018-02-07 10-11-39

@antoine-de
Copy link
Contributor

cool!

so a simple voronoi is enough ?

@poudro
Copy link
Author

poudro commented Feb 7, 2018

It would appear so!

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 a pull request may close this issue.

4 participants