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

name:etymology:wikidata on associatedStreet relation #4

Closed
Cyrille37 opened this issue May 10, 2024 · 9 comments
Closed

name:etymology:wikidata on associatedStreet relation #4

Cyrille37 opened this issue May 10, 2024 · 9 comments

Comments

@Cyrille37
Copy link

Hi.
Thanks for your really great work, it's impressive.

Some osm mappers use to attach tags on the associatedStreet relation rather than repeat them on each street segments. I think your tool does not read this tagging way. What is your opinion on the addition of this functionality?

@Danysan1
Copy link
Owner

Danysan1 commented May 10, 2024

I have long been interested in showing etymologies on relations with type=street or type=associatedStreet.

Unfortunately, these elements are lost from OSM dumps used for generating the pmtiles so I have no way to show them in the pmtiles back-end. The same thing happens to most racetracks, as explained here:

Both the initialization script and Geofabrik do use osmium-export.
From Osmium documentation I read:

The export command transforms OSM data into a more usual GIS data model. Nodes will be translated into points and ways into linestrings or polygons (if they are closed ways). Multipolygon and boundary relations will be translated into multipolygons. This transformation is not loss-less, especially information in non-multipolygon, non-boundary relations is lost.

Objects with invalid geometries are silently omitted from the output. This is the case for ways with less than two nodes or closed ways or relations that can’t be assembled into a valid (multi)polygon. See the options --show-errors/-e and --stop-on-error/-E for how to modify this behaviour.

I guess this problem can't be solved downstream by me but only upstream in the pbf generation.

A similar technical problem happens with the Overpass back-end: Overpass API returns the relation, but then osm2geojson, which I use for transforming the Overpass response into GeoJSON (suitable for the map) it fails to transform it. For example, this relation is returned by Overpass but I'm unable to show it:
image

I believe these technical problems are outside of my ability to fix them (if you or anyone has suggestions on how to fix them, they are welcome), so in both cases unfortunately I can't show them :\

@Cyrille37
Copy link
Author

Cyrille37 commented May 10, 2024

Hi

With https://overpass-turbo.eu exporting to geojson (that use osmtogeojson) give all renderable data on a map.

The executable query in place on the map : http://overpass-turbo.eu/s/1LfI

// the "associatedStreet" relation "name=Rue de Jemmapes" has the tag "name:etymology:wikidata"
//
// [bbox:{{bbox}}];
[bbox:47.42450157940906,0.6815895438194275,47.42598052149432,0.6835716962814331]
(
  way["highway"="residential"]["name:etymology:wikidata"];
  relation["type"="associatedStreet"]["name:etymology:wikidata"];
);
(._;>;);
out body;

@Danysan1
Copy link
Owner

Hmm I will look again into that, maybe I lost some configuration...

@Danysan1 Danysan1 reopened this May 10, 2024
Danysan1 pushed a commit to Danysan1/osm-wikidata-map-framework that referenced this issue May 16, 2024
Danysan1 added a commit to Danysan1/osm-wikidata-map-framework that referenced this issue May 16, 2024
Danysan1 pushed a commit to Danysan1/osm-wikidata-map-framework that referenced this issue May 16, 2024
@Danysan1
Copy link
Owner

Danysan1 commented May 16, 2024

I confirm that osmtogeojson is able to keep this data, I am now testing a new version that is able to render them, you can check it for example in https://owmf-test.wmcloud.org/#5.3694,43.2976,15.7,feature_source,overpass_all_etymology,stamen_toner_lite,etymology

Once I have fixed some existing bugs I will push this fix to etymology.dsantini.it as well

@Cyrille37
Copy link
Author

Great! Well done @Danysan1 😸

A proposal to refine: for associatedStreet relation removing role house will keep the map clearer and lighter.

image

https://owmf-test.wmcloud.org/#0.6832,47.4244,15.0,feature_source,overpass_all_etymology,stamen_toner_lite,etymology

@Danysan1
Copy link
Owner

Right! Done! To check the new behaviour make sure to clean the cache:

image

@Cyrille37
Copy link
Author

Fantastic! It works :-)

In June I welcome trainees from secondary schools to find out more about the IT profession. I'm going to put them on the subject of OpenStreetMap and etymology, and your tool will be a perfect support :-)

@Cyrille37
Copy link
Author

After hours of work with OpenRefine 🦄 I'm running a mass update of name:etymology:wikidata in city "Tours in France" https://www.openstreetmap.org/user/Cyrille37Bot/diary/404117

@Danysan1
Copy link
Owner

Great! I updated all my OWMF instances (including https://etymology.dsantini.it ) to the new version (v3.1.2) which includes these changes to the relation handling

Danysan1 pushed a commit to Danysan1/osm-wikidata-map-framework that referenced this issue May 18, 2024
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

2 participants