I'm following the instructions here to create a minimalist style map for Japan:
https://github.com/aaronlidman/Toner-for-Tilemill
Now, I've downloaded the OSM data, used osm2pgsql, created the tilemill project and it now properly displays in TileMill.
However, all the displayed city name labels are in the Romanized (english) characters. Is there a way that I can get the Japanese (Kanji, hiragana, etc) displayed in place of thier romainzed dipictions? (Street names do appear in the original Japanese, sometimes with Romanized letters in parens)
I'm assuming that the original Japanese names are contained in the osm.pbf, but somewhere along the pipeline they are being ignored.
Any ideas?
1 Answer 1
You have to expand the default.style of osm2pgsql to import the local name as well.
The file is a simple text file, which you can edit with any text editor. You will find a line
node,way name text linear
inside. This will import only the international readable name. For local names, add
node,way name:ja text linear
in a separate line.
You have to go through the tilemill style as well, look for the part where name
or name:en
is used, and replace it with something like
if exist name:ja
then use name:ja
else use name
.
EDIT
Make sure TileMill is using your postgis database, and not the shapefiles that are in the layers
folder. Those files do not have names with Japanese characters.
-
A note to anyone else running into the same problem. In this case the Toner-for-Tilemill project uses pre-prepared labels that exist as shp files in the project. These seem to be prepared for various zoom-levels using Dymo, read more about it here: nps.gov/npmap/blog/…monkut– monkut2014年07月17日 06:08:41 +00:00Commented Jul 17, 2014 at 6:08
-
1Just to add: The standard Mapnik toolchain also uses prefabricated shapefiles for low zoom levels. This is much faster than querying the database for large areas.AndreJ– AndreJ2014年07月17日 06:48:44 +00:00Commented Jul 17, 2014 at 6:48