Rendering Based on Highway Designation

118 views
Skip to first unread message

Jonathan Stuart

unread,
Feb 28, 2019, 11:04:20 AM2/28/19
to Osmand
Hi,

I've created a custom XML rendering file to change the rendering of highways based on their access rights. This is generally working but I can't get OSMAnd to format the highway when access is set to "designated" or  by checking the value of "designation". For example, this works:

<case additional="foot=yes" attrColorValue="#FFFF0000"/>
<case additional="foot=permissive" attrColorValue="#FF00FF00"/>

But this doesn't work:

<case additional="foot=designated" attrColorValue="#FF0000FF"/>
<case additional="designation=public_footpath" attrColorValue="#FF0000FF"/>

Is it possible to do what I want and if so what am I doing wrong?

Thanks,

Jonathan


Majka

unread,
Feb 28, 2019, 11:26:45 AM2/28/19
to Osmand
Are you sure that OsmAnd has the "designation" tag included? Because this seems to be tagging almost exclusively in UK. It might be that you are looking for a non-existent value (in OsmAnd data).

Jonathan Stuart

unread,
Feb 28, 2019, 5:55:42 PM2/28/19
to Osmand
Thank you, that does sound like a likely explanation. I assumed that all tags & values in OpenStreetMap would also be available in OSMAnd. Is that not the case? Also, is there a way to find out if a value exists in OSMAnd?

Thanks,

Jonathan

Majka

unread,
Mar 1, 2019, 3:22:10 AM3/1/19
to Osmand


On Thursday, 28 February 2019 23:55:42 UTC+1, Jonathan Stuart wrote:
Thank you, that does sound like a likely explanation. I assumed that all tags & values in OpenStreetMap would also be available in OSMAnd. Is that not the case? Also, is there a way to find out if a value exists in OSMAnd?

Thanks,

Jonathan
According to this page, the included tags are defined here. It seems that the designation is missing in the file.

Jonathan Stuart

unread,
Mar 1, 2019, 5:40:02 PM3/1/19
to Osmand
Thanks, that makes sense. It shows that the "designation" tag is not included but the "designated" value is included, but only for "bicycle" (see below). This explains the behaviour I see with OSMAnd's formatting. It seems inconsistent that the "designated" value is included for "bicycle" but not "foot" and "horse", etc. Is there a reason for this or could this value be included for other tags? Ideally for UK users the "designation" tag would be included too but it would be enough if the "designated" value was included for more than the "bicycle" tag.

<type tag="bicycle" value="designated" minzoom="12" additional="true" poi="false"/>

A Thompson

unread,
Mar 9, 2019, 9:48:23 PM3/9/19
to Osmand
Thanks, everyone. I was just trying to do the same thing, got bored when it didn't work, and instead decided to go browse this group's archive for the first time in a while!

I agree with your motivation, Jonathan: in the UK people are starting to mark legally designated footpaths with designation= and if a route looks questionable but someone had taken the trouble to tag it as official, it would be nice to be able to check that. I was thinking of adding some sort of show/hide option to the renderer I use for walking (here).

Jonathan Stuart

unread,
Mar 16, 2019, 5:22:15 PM3/16/19
to Osmand
Thanks. I got my renderer working to show rights of way in different colours depending on what they are (footpath, bridleway, byway, etc) and on whether they're a public RoW or permissive, etc. Unfortunately, this requires me to generate my own obf files with a custom rendering_types.xml that includes "designated" values and the "designation" tag. It would be great if this data could be included in the standard obf files.

Edward Kimber

unread,
Jun 14, 2020, 7:31:51 AM6/14/20
to OsmAnd
Hello, I was just thinking about doing this myself because none of the rendering options currently available are suitable for walking in many parts of the UK where there is a dense network of various designated and other paths and features. It would be so good to have clearly highlighted public rights of way. Did you put in a request to include the designation tag? I don't think designated would be sufficient from what I have seen of the underlying trail tagging. I will resort to building my own obf if necessary. Is it just a question of adding entries such as this?
<type tag="designation" value="public_footpath" ...

Andy Townsend

unread,
Jun 14, 2020, 7:46:44 AM6/14/20
to osm...@googlegroups.com

I did have a look at this earlier this year - the idea was/is to be a second OSM diary entry to follow on from https://www.openstreetmap.org/user/SomeoneElse/diary/391499 .  For various reasons it didn't get finished - it may need a few steps backwards first (removing options unused by me to make the replacement files easier to understand) before going forward again.  The resulting "work in progress" is at https://github.com/SomeoneElseOSM/osmand_files/tree/WIP2 but it is just that - an incomplete work in progress.  However, it might still be useful to look at if you're trying to do something similar.  I wasn't trying to add an "extra option" to the standard OsmAnd rendering files, just to create a drop-in replacement.

That's for offline maps of course - it's straightforward to do for online maps - just use tiles from https://map.atownsend.org.uk/maps/map/map.html of the format https://map.atownsend.org.uk/hot/14/8158/5231.png .

Best Regards,

Andy

--
You received this message because you are subscribed to the Google Groups "OsmAnd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osmand+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osmand/01358bf2-35be-44cf-bdbe-fe581a9928cbo%40googlegroups.com.

Edward Kimber

unread,
Jun 14, 2020, 9:38:10 AM6/14/20
to OsmAnd
Thanks!
It will be useful at the very least to gain some understanding by looking at what you've done. Those online maps are great, but in fact I have never used raster maps in OsmAnd, I guess it's the factor of knowing you can pull it up and never have to think about network signal.

Regards,
Ed
To unsubscribe from this group and stop receiving emails from it, send an email to osm...@googlegroups.com.

A Thompson

unread,
Jun 14, 2020, 12:10:44 PM6/14/20
to OsmAnd
For UK Rights of Way, another way to go is to make GPX files. RoW data for most counties is freely available, and there's an excellent guide here:

Using JOSM (maybe also QGIS if you go to the original source and discover it is WFS or something peculiar) you can export as GPX. What I then do is use GPSBabel's "crosstrack" simplification method with an error bound of 5m to reduce the file size (actually I use the program "Viking" which is a friendly front-end to GPSBabel and select filter>compress). All the tools I have mentioned are free.

For example, the GPX RoW for West Sussex is 12,463 kB but after simplification with a 5m tolerance it's only 4,295 kB. And that's a big county. On my old phone I have GPX RoW files for the three counties I visit most without any trouble.

OsmAnd gives great options for how a GPX is displayed - this is really quite a nice way to do it!
Reply all
Reply to author
Forward
0 new messages