In an area of the map (Tänndalen, Sweden) many cross country skiing routes are typed “line” rather than some path or road type. Therefore routing algorithms avoid them. All of these features have a relation to a named “piste/ski route”. Can I batch-convert the type from “Line” to “Piste” in order to make them routable?
The algorithm should be something like:
for all features of type “Line” that have a relation of type “Piste*” then change type to “Piste”.
Can you be more specific how they are tagged, and/or point to more specific objects in the map?
I’ve been recently reviewing the Wiki documentation on “pistes”, and it lead me to the conclusion that the ways only used as xc trails in the winter should still be tagged with piste:type=nordic, even if they participate in a route relation. So, feel free to add it.
(Side note: I wish we had a proper feature tag, such as leisure=piste, used in such situations. But there currently isn’t one, so ski maps have to dig into presence of piste:type and figure it out.
At location 62.547906,12.303486 an east-west section of a “Line” feature has a relation to “Piste/Ski RouteDalslingan 7,5 km“. The line has no other tags. I enclose a screen shot from openrouteservice illustrating how routing between two locations ON THE LINE route through a nearby highway, not through the ski route “Dalslingan 7,5km”.
However, reading your answer I realise that those xc ski routes that are NOT summer roads or paths (typically those running over frosen lakes and marshes) should have a particular type to avoid routing through them in the summer. Is this what you suggest solving by a tag?
In your OpenRouteService, you have chosen “pedestrian” routing, and you expect the piste to be routed over. But is it advisable to use the piste when you are on foot? Because that’s what you seem to expect - that ORS should suggest the piste to pedestrians?
please read Automated Edits code of conduct - OpenStreetMap Wiki if you are not familiar with it
The example from openrouteservice was just to illustrate the problem, since it has no ski routig. I encountered the error in Osmand that has a ski routing option. It routes ski correctly on pistes that are related to roads and paths - but avoids pistes that are related to “Lines”. The Wiki suggests piste:type=* so I will try to use this, it seems to address the winter only issue. Thanks for the pointer to automated edits.
But if you refer to way 259948282, it already has (and has always had) piste:type=nordic. [Incidentally, it was last edited by @woodpeck himself, although in his DWG revert role so he certainly does not recall].
If I’m right, that seems to be a, well, bug in OsmAnd routing. However, I introduced the paragraph:
A way which is only used in season as a piste may be drawn independently and tagged with a {{Key|piste:type}} as a [[top-level tag]]. It may represent e.g. a centreline of a downhill piste, or an established, groomed cross-country trail.
…only 10 days ago, based on some limited research on taginfo, and common sense. Before that, Wiki was silent on the issue what to do when there is not an “underlying element”. So it’s quite possible that OsmAnd developers took for granted that there has to be one, so their router just skips bare piste:type=nordic ways. (However, they are rendered correctly on a few maps I investigated, e.g. this Flutlichtloipe @ Freemapts.sk).
As a general observation, if you find that some software does not behave the way you want it to, always consider that it might be a shortcoming of the software, and not a problem in the data. It is therefore good to raise the issue with the community (as you did) to avoid making changes to the data just to work around a software problem. There’s a phrase you will frequently hear in OSM and that’s “mapping for the renderer” - that would for example be someone recording a footway as a cycleway just because they prefer the blue colour used for cycleways by the standard map. Recording a piste as something other than a piste just to get OsmAnd to route on it would be a similar thing. – But of course, adding a piste:type to a piste is probably fine.
With some OSM software, it’s also possible to download OSM data, modify it outside of OSM, and then feed your modified version into the software to use in place of “normal” OSM.
OsmAnd is an example that does support this (they have something called OsmAndMapCreator), so you could make OSM data look like almost anything to OsmAnd, without changing it in OSM at all.
It’s a lot more complicated than just using OsmAnd’s regular downloads, though.
