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

Add Tallinn, Estonia #487

Closed
62mkv opened this issue Mar 23, 2022 · 29 comments · Fixed by #488
Closed

Add Tallinn, Estonia #487

62mkv opened this issue Mar 23, 2022 · 29 comments · Fixed by #488
Labels
city New city added to the project

Comments

@62mkv
Copy link

62mkv commented Mar 23, 2022

Hi, I have not done item # 5 from the template Readme (not sure where would such CSV be coming from, or in which cases I might want to create it manually - maybe this could be elaborated a bit in the README) ?

Can you please take a look at https://github.com/62mkv/equalstreetnames-tallinn and let me know what else needs to be done, in order to have it integrated? Thanks

@jbelien jbelien added the city New city added to the project label Mar 23, 2022
@jbelien
Copy link
Member

jbelien commented Mar 23, 2022

Hello @62mkv , welcome on board!

You should have received an invite to join @EqualStreetNames/tallinn ; once you joined, you will be able to transfer your repository to @EqualStreetNames and I'll take care of the next steps.


About item # 5 (CSV file), don't worry about it, it's not a requirement.
Some cities stored their data in CSV file before adding it to Wikidata/OpenStreetMap and so I provided that as a temporary solution.

@62mkv
Copy link
Author

62mkv commented Mar 23, 2022

by the way, if I run the "relations-full" Overpass query, it gets me mostly this:
image

does not seem to make any sense, those are basically parking places in the middle of nowhere, but somehow they like dominate in the results, because they have relation to Tammsaare tee, which is named after a person indeed? @jbelien can you check this, maybe it's incorrect mapping in OSM? if so I could probably fix it but I would need some guidance on how those things should be mapped instead (or we could adjust Overpass query to exclude them somehow?)

@62mkv
Copy link
Author

62mkv commented Mar 23, 2022

repository is transferred, by the way

@jbelien
Copy link
Member

jbelien commented Mar 23, 2022

does not seem to make any sense, those are basically parking places in the middle of nowhere, but somehow they like dominate in the results, because they have relation to Tammsaare tee, which is named after a person indeed? @jbelien can you check this, maybe it's incorrect mapping in OSM? if so I could probably fix it but I would need some guidance on how those things should be mapped instead (or we could adjust Overpass query to exclude them somehow?)

Relation https://www.openstreetmap.org/relation/1575115
This seems correct. These are not parking space but houses (or buildings).
The associatedStreet usually also contains the street itself but not it this case.
Not a big issue, since the street is not in that relation, the relation won't be used by EqualStreetNames.

repository is transferred, by the way

Thnaks, I'll take care of the next steps.
Don't forget to add you MAPBOX_TOKEN in the repository's secrets.

@jbelien jbelien mentioned this issue Mar 23, 2022
7 tasks
@jbelien
Copy link
Member

jbelien commented Mar 23, 2022

Deployed: https://tallinn.equalstreetnames.eu/ 🚀

@62mkv
Copy link
Author

62mkv commented Mar 23, 2022

Woohoo! Thanks. Right now, it's in a sad state lol.. but I will try to fix it soon

I have a question though:
Sometimes, same (logical) street can have many (more than one) ways, like here:

https://www.openstreetmap.org/way/114708576

https://www.openstreetmap.org/way/132657959

Should one apply wikidata tag to all of them, or only one should suffice? that seems strange, frankly, it can't be that one lane is named after a person and the other is not :)) should not there be some way to logically unite those geometric items?

@jbelien ?

@62mkv
Copy link
Author

62mkv commented Mar 23, 2022

Oh, I probably see now.. a Way can participate in Relations, and Relations can then have attributes too! thanks!

@jbelien
Copy link
Member

jbelien commented Mar 23, 2022

Woohoo! Thanks. Right now, it's in a sad state lol.. but I will try to fix it soon

Yep, I've done everything I can, now it's up to you to update the data (in OpenStreetMap and Wikidata). 💪
The repository will be automatically updated every month (on the 2nd).

Should one apply wikidata tag to all of them, or only one should suffice? that seems strange, frankly, it can't be that one lane is named after a person and the other is not :)) should not there be some way to logically unite those geometric items?

You will indeed need to add the wikidata tags on ALL the ways in a street.
That's why some cities in the world use associatedStreet relations to combine all the ways into one single "object".
See https://wiki.openstreetmap.org/wiki/Relation:associatedStreet

Oh, I probably see now.. a Way can participate in Relations, and Relations can then have attributes too! thanks!

That's exactly it!
See https://wiki.openstreetmap.org/wiki/Relation

@62mkv
Copy link
Author

62mkv commented Mar 23, 2022

hmmmm... so, this, for example, https://www.openstreetmap.org/relation/8834740#map=17/59.43561/24.75751 by itself will not be sufficient then? this Relation has "name", it has "wikidata" tag, and the item in question has "named after" property that resolves as a person/male. I'd think this should suffice, no?

@jbelien
Copy link
Member

jbelien commented Mar 23, 2022

The project doesn't use type=route relations by default.
But if that's something you use a lot in Tallinn, you just have to add it to the Overpass Query for relations in your repository

@62mkv
Copy link
Author

62mkv commented Mar 23, 2022

ok, I will try then ! btw, can we only include relations/ways, that have certain tags non-blank, like "wikidata" or "name:etymology:wikidata" ? it would return much less data I guess...

@jbelien
Copy link
Member

jbelien commented Mar 23, 2022

That's indeed possible but AFAIK that option was never used by any city in the project.
For huge cities that could make sense to reduce the size of GeoJSON file to download but it don't think it's necessary to do it for Tallinn considering its size.

@62mkv
Copy link
Author

62mkv commented Mar 23, 2022

I've tried with "routes" and it seems to work, however it also returns many (if not all) of the international routes:

[out:json][timeout:25];
( area["admin_level"=""]["wikidata"="Q1770"]; )->.a;
(
    relation["type"="route"]["route"="road"]["name"](area.a);
);
out body;
>;
out skel qt;

however, I believe we should be able to live with that. I will try to update data locally and then will present a PR if it works

@jbelien
Copy link
Member

jbelien commented Mar 23, 2022

Maybe you could add an extra filter on network=ee:local

@62mkv
Copy link
Author

62mkv commented Mar 23, 2022

I've tried to collect data again, and it's a bit better, but still, I am not sure I follow. For example, in relations.geojson we have such relation:

{ 
 "type":"Feature",
 "id":10567422,
  "properties":{
    "name":"Adam Johann von Krusensterni v\u00e4ljak", 
    "wikidata":"Q62505358", 
    "gender":null,
    "source":null,
   "details":null
  }
...

and that wikidata item https://www.wikidata.org/wiki/Q62505358 has named after property set to https://www.wikidata.org/wiki/Q160888

but the script puts it in other.csv, without any reference to wikidata or gender. What is still missing then?

"Adam Johann von Krusensterni väljak",,,,relation

@jbelien
Copy link
Member

jbelien commented Mar 23, 2022

At first sight, it should indeed work ...
I've built that process a while back ; I'll need to investigate.

@jbelien
Copy link
Member

jbelien commented Mar 23, 2022

I just tried locally and it works fine!

[out:json][timeout:300];
( area["admin_level"=""]["wikidata"="Q1770"]; )->.a;
(
    relation["type"="associatedStreet"]["name"](area.a);
    relation["type"="street"]["name"](area.a);
    relation["type"="route"]["route"="road"]["network"="ee:local"]["name"](area.a);
    relation["type"="multipolygon"]["place"]["name"](area.a);
    relation["type"="multipolygon"]["highway"]["name"](area.a);
);
out body;
>;
out skel qt;
name,source,gender,wikidata,type
"Lydia Koidula tänav",wikidata,F,Q237056,relation
"A. H. Tammsaare tee",wikidata,M,Q353637,relation
"Adam Johann von Krusensterni väljak",wikidata,M,Q160888,relation
"Ado Reinvaldi",wikidata,M,Q359922,way
"Amandus Adamsoni tänav",wikidata,M,Q454331,relation
...

@62mkv
Copy link
Author

62mkv commented Mar 23, 2022

hmm, I had almost the same. but without "associatedStreet". let me try once more with your query.

@62mkv
Copy link
Author

62mkv commented Mar 23, 2022

this is very strange. I've pasted your query literally; and this relation is still in the other.csv, and this is my whole gender.csv(I've cleaned up data folder before running update-data script):

name,source,gender,wikidata,type
"Lydia Koidula tänav",wikidata,F,Q237056,relation
"A. H. Tammsaare tee",wikidata,M,Q353637,relation
"Amandus Adamsoni tänav",wikidata,M,Q454331,relation
"Ants Laikmaa tänav",wikidata,M,Q609387,relation
"August Alle",wikidata,M,Q760801,way
"August Kitzbergi tänav",wikidata,M,Q376410,relation
"August Weizenbergi tänav",wikidata,M,Q356158,relation
"Carl Robert Jakobsoni tänav",wikidata,M,Q725191,relation
"Eduard Bornhöhe tee",wikidata,M,Q717712,way
"Eduard Viiralti tänav",wikidata,M,Q1290386,relation
"Eduard Vilde tee",wikidata,M,Q464207,relation
"Ferdinand Johann Wiedemanni tänav",wikidata,M,Q705843,relation
"Friedrich Reinhold Kreutzwaldi tänav",wikidata,M,Q333900,relation
"Georg Otsa",wikidata,M,Q1280772,way
"Jaan Poska tänav",wikidata,M,Q1385836,relation
"Johann Köleri tänav",wikidata,M,Q724444,relation
"Juhan Kunderi tänav",wikidata,M,Q12365486,relation
Lembitu,wikidata,M,Q960492,way
"Paul Kerese tänav",wikidata,M,Q207727,relation

@62mkv
Copy link
Author

62mkv commented Mar 23, 2022

seems like I have to remove data/wikidata folder in the process folder manually, otherwise it would not pick up my changes for those items.. checking now

@62mkv
Copy link
Author

62mkv commented Mar 23, 2022

indeed; this helped. maybe should be mentioned in command docs somehow

@62mkv
Copy link
Author

62mkv commented Mar 31, 2022

I am a bit worried about failing pipeline with my latest changes in "tallinn" - it seems that overpass query dies because of timeout, but when I run the same query via Overpass-turbo UI, it seems to work good. could you check it out @jbelien ?

@jbelien
Copy link
Member

jbelien commented Mar 31, 2022

Nothing to worry about 😃
It was most probably a temporary issue with Overpass API.
I just restarted the failed GitHub Actions workflow and everything went fine. 👍

@62mkv
Copy link
Author

62mkv commented Mar 31, 2022

Thanks! now it's indeed much better. Still; there're some things I don't understand, for whatever reason Gonsiori street is not highlighted at all on the https://tallinn.equalstreetnames.eu/en/index.html#15/59.43325/24.76248

even though it IS returned by Overpass query for relations (http://www.openstreetmap.org/relation/8821307) and it has a WD link (https://www.wikidata.org/wiki/Q16409044) and it has a "named after" (https://www.wikidata.org/wiki/Q31277799) which has "sex or gender" statement.. I wonder why we might be losing it still..

@62mkv
Copy link
Author

62mkv commented Mar 31, 2022

huh, not only that; also Kunderi, Vilmsi.. I was sure I had it all when I debugged the data retrieval locally. I will check again later..

@62mkv
Copy link
Author

62mkv commented Mar 31, 2022

seems like something is off with the highlighting, data box on the right shows that there're 2 streets named after women but none of them is presented on the map at all!

@jbelien
Copy link
Member

jbelien commented Mar 31, 2022

Your relations.geojson file seems indeed to be missing a lot of data.

I'll investigate!

@jbelien
Copy link
Member

jbelien commented Mar 31, 2022

Okay, it's related to the type=route relations you added!

I'm looking for relation members with a role=street (type=associatedStret relations) or role=outer (type=multipolygon relations).
But those type=route relations don't have a role for the ways member so I'll need to update my data process to be compatible with type=route relations.

@jbelien
Copy link
Member

jbelien commented Apr 1, 2022

All fixed! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
city New city added to the project
Development

Successfully merging a pull request may close this issue.

2 participants