Call for ideas: Thailand map rendering

Hello,

as some of you might know I’m operating the bilingual map rendering on http://thaimap.osm-tools.org/

I’m planning to upgrade the rendering stack to the unfortunately still beta version of mapnik (harfbuzz) to get rid of the annoying rendering problems regarding Thai script.

In the process of the upgrade I’ll also update the toolchain to use the reworked styles based on CartoCSS which is active on osm.org since August.

I plan to migrate the adoptions I did to the old style like font sizes and rendering of guest-houses for example.

As the new style is supposed to be a lot easier to maintain it might be a good time to adopt it even more to the situation in Thailand.
I would like to stay close to the “main” style to make it easy to migrate in future updates. Slight modifications should be no problem.

As I’m no cartographer and my graphic skills are quite limited I ask for support by the community.

Is there an interest at all to have a special Thailand style?

I would like to have at least this:

  • bilingual
  • increased font size for Thai script
  • additional zoom level 20 to better represent dense areas in downtown Bangkok or Chiang Mai
  • equal importance levels for guest houses and hotels

possible ideas, might be done if enough support is there to realize it:

  • rendering style for roads, probably render based on lane count and width of road so bigger roads inside towns are more prominently rendered
  • rendering of highway shield with garuda?
  • different color scheme
  • improved rendering of frontage roads
  • better icons for emenities typical for Thailand, place of worship, convenience store, …
  • generalization of water features in lower zoom levels as in Thailand there are plenty of them
  • automatic creation of RTGS for names which exist in Thai script only

Work is planned for the 5th/6th of October. Would be great to have your ideas before this date. Also expect that map updates will be suspended during the upgrade. I’m currently refreshing all tiles so nothing will be older than 5 days if updates are suspended.

Stephan

Great idea! I especially like “increased font size for Thai script” - I think other farangs with some basic (only) knowledge of Thai script will like that too.

For places of worship, I’d suggest to use the styles of JOSM. We should be able to see Buddhist temples, and also mosques (there are many mosques in the South - presently, mosques are shown on the map).

Differentiating roads by the number of lanes is also a good point. I’d add the surface quality: only paved vs. unpaved, and unpaved roads could be summed up to residential/service on one side, and unclassified/tertiary/secondary(?) on the other.

In case of water features, “canal” is typically rendered to big. An irrigation canal of less than 10 m wide should be less prominent than a river. Fortunately, the width of canals is rather constant of longer parts of their length, so I added the width sometimes (it is easy to measure in JOSM).

I’d like to see better place name rendering for administrative boundaries (provinces & districts) on lower zoom levels. This isn’t particular to Thailand though.

I think anyone will. The style of Thai script used default font in particular isn’t easy to read. I don’t know about other free alternatives, however.

That would be nice. It’ll need to understand the distinction between national highways (Garuda) and rural roads (blue sign), which under the proposal in the other thread seems doable. Rendering green signs for Routes 31, 35 & 338 and the non-restricted portions of Routes 7 & 9 might be trickier, though. Also, what about the Asian Highway routes?

This would be rather difficult to achieve. Automated scripts such as that provided at http://www.thai-language.com/dict provide inaccurate results for proper nouns with parts based on Pali/Sanskrit roots, as they can’t figure out how to correctly break the syllables.

I agree in general with the rest.

Another “farang-specific” idea: what about a different symbol for “7/11” shops?
The equal importance levels for guest houses and hotels is good, but symbols should be different.
Also Thai restaurants, Western restaurants, and simple food-stalls (amenity=fast_food) should be shown at the same zoom level, with different symbols.
A recent thread was about provincial capitals - is it possible to underline their names?

Another idea from my side: automatic shortening of soi/street names.
I had presented the idea a while ago already: http://forum.openstreetmap.org/viewtopic.php?id=15762
As keng approved it I suppose it’s a proper way to have better naming of sois.

We can have the full name in the database for routing while still benefit from the shortened way fitting on the map.

regarding different symbols: from a map-making POV I don’t want to overload the map with too many different symbols. For some symbols I fully agree that we need them, especially the Buddhist place_of_worship. I have mixed feelings about “brand symbols”. Where to begin and where to end? Car dealers? Fuel stations? And what’s about the copyright of the brand logo?

If you have some symbols to include please provide a link to the symbol, preferably with a hint to the license. The style should match the existing one unless we completely exchange the map style (which is a task I certainly can’t do by myself - it’s an enormous effort). I’m considering mapicons and sjjb.

As I had asked for support: Would it help to have sort of a tutorial how to set up a local rendering stack to do experiments with the style? I thought about giving “TileMill” a try.

What happened to the symbol for Buddhist temples? In my Garmin maps, I use a symbol based on the JOSM style - the 8fold wheel. In MapTk project file I defined it with:

[POI]
Type=0x10d0c
String=0,Buddhist Temple
Color=0,0x000000
Line=........0........
Line=........0........
Line=......00000......
Line=...0.0..0..0.0...
Line=....0...0...0....
Line=...0.0..0..0.0...
Line=..0...0.0.0...0..
Line=..0....000....0..
Line=00000000000000000
Line=..0....000....0..
Line=..0...0.0.0...0..
Line=...0.0..0..0.0...
Line=....0...0...0....
Line=...0.0..0..0.0...
Line=......00000......
Line=........0........
Line=........0........
[END]

Can you use that format, or do you prefer an image (which format)?
I do not know the machinery behind the map on the web - I tried to set it up once, and after a few hours of strictly following the instructions was lost in Linux’ equivalent of the dll hell: x requires version a of library b while it is already installed in version c which is required by application d or something like that. If a Virtual Machine (industry standard: VMWare) was available, I’d perhaps play with that.

Hello Bernhard,

thanks for coming back with this topic. I’m sorry for not keeping you updated.

During the mentioned hack-weekend I had planned the transition to a newer mapnik including mapcss for a style being closer to the “official” OSM.org style.

I turned out to be much more complicated than planned. During that weekend I was only able to upgrade mapnik to the harfbuzz branch. It was not possible to set up sort of “development environment” using tilemill. Turned out that virtualbox was unable to run a Linux on my laptop.
Tilemill was also not updated since a year. Changing the contained mapnik is possible, creating a windows-build of the head-revision quite complicated.

Mapnik then also appeared to have two serious bugs in the mentioned branch which crashed the software. I was able to track down the root cause together with Herm (the developer of mapnik) so mapnik is running fine again.

On the pro side: Rendering is up and running again. I had made the server re-render all existing tiles, so the map should be showing the correct data now. Also that nasty problem of some Thai script not showing up depending on the direction of the way is resolved.
I was also able to bring some attention to the integration of harfbuzz into mainline mapnik. Andy Allen (OpenCycleMap, osm.org mapcss style) also showed a big interest in having a proper rendering solution available.

So for the next steps:
I still think we need sort of development environment to play with the map style before integrating it to the server. I still think a virtual machine installation would be the most convenient way to have it as it would run independent of you own OS.
I probably try again with a different virtualization solution. VMWare has a player which can be used free of charge. So that’s the next one I’ll try.

Icons for the map are best made as a SVG. These can be transformed into bitmaps quite easy and can be used for print as well. If you plan to hand-optimize icons for the small size, then as a PNG would be great. The wheel for the Buddhist temple is already available as a bitmap somewhere.

Stephan