[OSM-dev] tagtransform for OSM - A effort make tagging and using OSM data easier; bridging different worlds together

Andy Townsend ajt1047 at gmail.com
Thu Dec 5 18:38:12 UTC 2019


On 05/12/2019 14:50, Sören Reinecke via dev wrote:
> I currently write a specification for tranforming tags in 
> OpenStreetMap to make life of data customers easier.

Firstly, thanks for trying to make the lives of people trying to do 
things with OSM data easier!

Obviously there are two bits to this:

 1. The technicalities of how to invoke a tag transformation between one
    set of values and another in, say, osm2pgsql, mkgmap or osmand.
 2. The actual set of values to be used in a particular case.

I can think of lots of examples of (1) - among the most well-known is 
the lua interface from osm2pgsql.  Are you planning to make something 
that can be integrated directly into that (or mkgmap, or osmand etc.**).?

What a particular data consumer would use for (2) will likely vary case 
by case.  For example, I might render a whole series of shops exactly 
the same but think that guest houses and bed-and-breakfast places ought 
to have different representations, but someone else might do the opposite.

At your github repository it looks like you're planning to store an 
explicit list of "tag X means the same as tag Y".  Is this going to be 
stored project by project so that you can say "project A thinks that tag 
X means the same as tag Y but project B does not"?


>
> *I want to hear your opinions on this and also feel not to shame to 
> ask questions. My answers will be part of the clarification of the 
> project "tagtransform for OSM".*
>
>
What would be really useful, actually, would be a way to re-use the same 
tag transformation definition used in one place in others as well*.

For example over at 
https://github.com/SomeoneElseOSM/SomeoneElse-style/blob/master/style.lua#L49 
I have a lump of lua code that does generic tag transforms.  It's called 
from a couple of other places in there which are called in turn from 
osm2pgsql - the documentation for that is at 
https://github.com/openstreetmap/osm2pgsql/blob/master/docs/lua.md .

I'd actually like to be able to do the same generic transformations from 
mkgmap as well.  Currently mkgmap's transformations are handled by files 
such as 
http://www.mkgmap.org.uk/websvn/filedetails.php?repname=mkgmap&path=%2Ftrunk%2Fresources%2Fstyles%2Fdefault%2Fpoints&peg=4384 
- in there you can see OSM tags and values and the Garmin symbols that 
they get turned into.  What this would technically need is a way of 
calling lua from java (stackoverflow suggests that various options 
exist, but "some assembly would be needed") and then document the 
calling interface so that it'd be easy for people to modify their 
existing lua tag transforms to work from there too.

Osmand's a bit more complicated - the equivalent tag transform 
definition is 
https://github.com/osmandapp/OsmAnd-resources/blob/master/obf_creation/rendering_types.xml 
(see http://osmand.net/help/docs/Custom_Rendering_How-To.htm for a bit 
more information), but that file is a bit of a monster and seems to 
handle several jobs at the same time.  Another option would be call out 
to a lua tag transform before throwing the result at 
"rendering_types.xml" and the display style "default.render.xml".

So that's the big question really - what are you planning to do to 
integrate what you're doing here with the existing toolchains?

Best Regards,

Andy


* not in any way an original idea by me.

** three example just off the top of my head.  Other data consumers will 
be able to think of others in other toolchains.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20191205/2661bbd5/attachment.html>


More information about the dev mailing list