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

How can I get only the boroughs of a city without the districts? #207

Open
sowinski opened this issue Oct 11, 2018 · 2 comments
Open

How can I get only the boroughs of a city without the districts? #207

sowinski opened this issue Oct 11, 2018 · 2 comments

Comments

@sowinski
Copy link

Hi,

is it possible to get only the boroughs of a city?

Example:
berlin = City.objects.filter(name="Berlin")[0]
len(District.objects.filter(city=berlin))
This should be 12 but gives me 205 because it includes boroughs and districts.
https://en.wikipedia.org/wiki/Boroughs_and_neighborhoods_of_Berlin

Thank you :)

@sowinski
Copy link
Author

I was investigating where the problem is. On geoames.org you can see those informations and there are also in the files which you can download.

Example:
http://www.geonames.org/7118093/gallus.html

"Innenstadt I" is not listes as a district, only "Gallus". Why is this hierarchy not stored and how can I fix this?

Thx :)

@sowinski
Copy link
Author

In the config there is this line of code for district types:
district_types = ['PPLX']
I have seen that the parents of PPLX is ADM5. I would like to include both.

But how can I later see the difference between those two kinds?

I guess there should also be a type field for districts.

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

1 participant