Frontend transliterator: translit. A battle against the ??????'s

The weekly updated img files on http://garmin.na1400.info/routable.php now contain transliterations for 21 Areas:
albania, belarus, bulgarije, cyprus-turkish, czech-republic, estonia, georgia, greece, hungary, kaliningrad, latvia, lithuania, macedonia, moldavie, poland, romania, russia, serbia, slowakia, turkey and ukraina. Attentioen only 's with a valid place AND a name tag are transliterated when needed. (valid place |town|city|suburb|village|hamlet|).

So for instance in greece
http://api.openstreetmap.org/api/0.6/node/83945071




will show up in your garmin as " Agios Nikolaos (Agios Nikolaos). While
http://api.openstreetmap.org/api/0.6/node/83943762



will show up as “??? ??? (Agios Andreas)” because it is an island.

I now understand that such a restriction is unwanted. In the next update translit will handle all nodes with a name tag.

greencaps, do you feel confident by now about puglishing your translit program?
Or maybe even adding it into mkgmap?

The program at the moment is restricted to do 's. When 's and 's are also transliterated publication would make sense. Lambertus is the only one who uses (and tests) it. If translit does what I want it to do I will offer it to the community. In which way I still don’t know.

Adding to mkgmap is a different story. I never looked into the source of mkgmap so I do not know in which way the code could be integrated. But of course integration in mkgmap is preferred over functioning as a frontend. An extra option --translit which forces mkgmap to trow away all codepages and just take one transliterationtable (the one from translit for instance) would be nice.

Would it make sense to introduce a name:translit tag for transliterated names and let mkgmap choose one of them, e.g., mkgmap --name-tag-list=name:en,int_name,name:translit,name or (for native users) just mkgmap --name-tag-list=name:translit,name? The transliteration could be implemented as a separate preprocessing step or integrated in mkgmap so that it can be executed on the fly, when a substitution of name:translit is requested.

ISO 15924 and IANA define some language subcodes, such as sr-Cyrl and sr-Latn for Serbian written in Cyrillic or Latin, but I did not find any subcode for transliterated Russian or Greek, for instance. We could of course invent such codes ourselves, but it could be controversial to add, say, name:gr-Latn and name:ru-Latn to each Greek or Russian location in the OpenStreetMap database. (It could provoke edit wars, because not everyone is following the current version of ISO 9.)

Thats exactly what happens in Lambertus’ toolchain. The tag is added by the frontend.

Yes. Transliteration and adding the tag. But all depends on the structure of mkgmap.

I will not look at that to much.

This pictures shows, that the Nuvi 250 is not able to display utf-8 characters,
but to show lower-case characters.

Map has been build with --charset=utf8 and --lower-case

On MapSource I see the same characters.

The funny thing is, this actually don’t looks like utf-8 at all.

But when I use some unknown charset like --charset=xyz, it looks more like utf-8
(but the device is still not able to display them).

Chris

And this is the build in transliteration in action (only --lower-case option was set).


(MapSource screenshot)

My first thougth was : who says that there are utf8 chars in the map?

Ahhh. You said that --utf8 was no option. But I had to read it as : use --charset=utf8
So mkgmap can make those .img’s. Nice, I hope it just transfers the text untouched.

Well actually it does. That looks exactly like the chars in the transliteration table for greece that I use. See here some characters (copied from wordpad): look at tke leftmost column.

Λ=Ë=L
έ=å=e
ν=í=n
Ï„=ô=t
α=á=a
Ï‚=ò=s
é=e=e
Δ=Ä=D
μ=ì=m
Τ=Ô=T

And the same displayed by firefox and copied from it.
Λ=�=L
έ=�=e
ν=�=n
τ=�=t
α=�=a
ς=�=s
é=e=e
Δ=�=D

The Nuvi displays utf8 with a normal ansi charset (for one byte chars). On the nuvi screen there are 28 character. Those are 14 utf8 characters. Using my transliterationtable i come to Mikala… And looking at openstreetmap http://www.openstreetmap.org/?mlat=37.9761725887055&mlon=23.7486863136292&zoom=16&layers=B000FTF that is right.

Additional Info: For testing I used the name_tag = name, name:en sequence
in the options file.

When building real maps of couse you would first check for the
english names.

name_tag = name:en, name

chris

Ok, but what does mkgmap do when using a unknown charset like --charset=xyz ?

I would have expected that in this case no charset translation takes place and because the input
data is utf-8 the output also should be utf-8.

Chris

Don’t know. Until now I never used mkgmap so I cannot test. But it should bring an errormesage and stop.

Or nothing put out or only ???'s. Because thats in line whith what mkgmap does now.

Further my opinion is that if a parameter --charset=… is omitted the output should be utf8 (and only then). Exactly the same content as in the osm tags. (–charset=utf8 is confusing as no charset will be used. So this should bring an errormessage too and the program should stop, not even start.)

That looks ok. So your claim is that the cyrillic from Bulgaria is correctly transliterated too (in that same .img)?

Ok, here we are. Sofia compiled with only --lower-case and name-sequence again
is name, name:en, so first taking the lokal name.

Chris

Thank you for the effort Chris. I see the transliteration. Ok. But you left me unsure as you did not utter a direct “yes” or “no” on my question if both cyrillic and greek are transliterated within one map. (or run of mkgmap).

I would like to know also if georgian, arabic, chinese and so are transliterated. Dou you know what all is transliterated?

The battle is in a decisive stage. Look at the cyrillic in the center of Irkoetsk, Siberia:
http://www.openstreetmap.org/?mlat=52.2795800954968&mlon=104.27686214447&zoom=15&layers=B000FTF

Yesterday tile 63340555 on http://garmin.na1400.info/routable.php from Baikal region and Mongolia looked like this in GPSmapedit:

Today (after a special update) it looks like:

Gone are the questionmarks.

Translit now transliterates all items that have a name tag. So nodes, ways and relations. (But only if there are not already tags like name:en or int_name. It adds an extra tag with the transliteration. It only uses one transliteration table with less then 400 entries. It does not use regions or .gpx files anymore.

When I drive to Siberia again this summer my 60Cx will show all placenames and in towns all streets. I’m happy.

So very cool :slight_smile:

Thanks for you work on this!

If you decide to release this it would be great to add it to mkgmap. Of course I don’t know your code either, so I don’t know how easy or in what
manner it could be done. Contact me directly or via the mkgmap list if you want to discuss it.

…Steve

You can find binaries for windows and linux here: http://tinyurl.com/ydcjhpa

I would like an integration in mkgmap. As I never did something with it my plan was to first install mkgmap (on a new system that shortly will arrive). Then play a bit with it and investigate the source. I could start looking where transliteration code could be added. I’m not familiar with java so that would take some time.

When time comes I will post a message in your list.

Be warned - once you start playing with mkgmap you’ll never stop!

You are right! I already feel it ;-).

Today I downloaded a .zip snapshot from http://www.mkgmap.org.uk/snapshots/ Unzipped it. Put a mongolia.osm file in its directory and typed java -jar mkgmap.jar mongolia.osm and voila an .img! Not often things go so fluently. Very good job. How could I have imagined that it was that easy?

Below all of Mongolia. I first had splittted mongolia.osm from a geofabrik asia.osm.bz2 file.

And see: (the green) borders are displayed without questionmarks here:
(I refer to a problem described here: http://forum.openstreetmap.org/viewtopic.php?id=2625&p=19 )

Will continue…

Post about Georgian Alphabet and Potlatch moved to new topic.