How can I get only the boroughs of a city without the districts?
Opened this issue · 2 comments
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 :)
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 :)
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.