Roads and routing in Thailand

Hi everybody!

There’s a validator now set for breaks in road graph in Thailand.

The page is in russian but hope that won’t hurt. It shows map of Thailand with all the unconnected parts of the roads. For now there are 1137 of them - a little bit too much for routers to route :slight_smile:

What you can do to help fixing it:

  1. Start JOSM;
  2. go to the link above with josm remote control enabled;
  3. chose a marker, click it;
  4. have a look at satellite imagery and try to connect the road to surrounding ones.

Comments? Ideas?

I had a look at about 10 problem areas around my home in Chiang Mai NW Thailand and in every case it was just a small soi (road/lane) that just stopped.
There were certainly no “breaks” in the road.

Great idea for a tool though, nice work.
But I think to be useful the algorithm may need to be changed to decide what actually is a broken road.


Hello Komяpa,
thanks for the tool. I looked at some places in the South where I traced a lot from Bing. And yes: some “broken” roads are my work. In a Southern country, there are some clouds on the sky on every day, and some areas could not be traced due to the clouds. I decided to trace the visible parts of the roads nonetheless, they are useful for those people who are on some tracks nearby and try to find a road. With GPS tracks from my last holiday, I’ll likely fix some of them.
Kind regards,

Thanks for the tool. I tried about 10 in and around Khon Kaen where I live and map. All false positive. JOSM validator is handy, good and gets them all before upload. Think I’ll stick to JOSM validator.


In Thailand there are a lot of highways obviously drawn by a major license change decliner from Bing without local knowledge. When I came across them during my mapping or my special cleanup of the Northeast I replaced them as time and local knowledge allowed. But there are still some or may be many which I left disconnected when enhancing or replacing major roads. They are unclassified, residential or tracks. They are sometimes disconnected, created by the disagreer and contain only or almost only nodes from the disagreer. I think they should be replaced or deleted in the automatic cleanup. Just reconnecting them would not improve the map but add to the expected automatic cleanup.

How does this differ from the OSM inspector of geofabrik?

How often do you update your map? Does it evaluate the layer tag or noexit?

In case a road is a dead-end it might be wise to place a noexit tag on the last node. In case there is a footpath leading out that section of the way should be drawn and tagged accordingly. Somewhere in the (far) future we might have pedestrian routing.


stephankn, OSM inspector doesn’t do analysis of the whole routing graph. It just finds all the end nodes of lines, probably checks for noexit= tags, and finds out whether there are unconnected candidates.

The map at is updated several times a week. It represents how a road graph falls apart after converting it into CityGuide navigation software. Some of the roads are considered non-routable in that software, as, for example, service ways are.

Have a look at Bankok - a lot of small unconnected roads are shown there.

Hello Komяpa,

thank you for the explanation of the details how a street is marked.

Do I understand right that for the detection of “floating islands” you ignore highway=service?

I agree this evaluation is closer to the reality then a simple detection of not connected ways as also done in keepright:


stephankn, yes, that’s right.

If you look at OSM Wiki, you can see the note about it:

Basically, for navigation purposes, there should always be a way from one higher-level to another higher-level road that will not make you go through service one. If it is the only way, then this road isn’t “service” one, it’s a higher class road.


This week DennisL, author of OSRM routing engine, made a nice post on OSM diaries on routing issues:

He kindly provided shape file with all the issueshe could find, and I did a service that loads them into josm one-by-one, letting you repair them.
Open this link while having josm running with remote control enabled:

Any responses are highly welcome.

I had a look at some of the road “islands” in Thailand. Mostly it’s residential roads connected to a lower class road, track, …
It might be worth checking the issues.

Did you know that it’s possible to detect a running remote control using javascript? I implemented it and also put documentation to the wiki. This way you can print a better error message in case JOSM is not running.

How often is your site updated? I came up with a lot of ways which looked already fine.


Hi stephankn,

Actualy situations when residential roads are connected to a road network via track is only a minority of all cases. The majority is obvious topological errors - roads are not connected by common nodes, because they were potlached or a mapper just did not bother to connect them.

Here is an ilustration:

Roads cross, but do not intersect. Boxed roads are inaccessible for routing engines.

this place on mapnik

Please be informed that the page has been updated with fresh data (currently this page is updated manualy). Currently there are 1639 islands in Thai. Week ago there were 2037 :wink:

Best regards,
Kirill aka Zkir

KeepRight is more suitable for this.

In case a road is connected on one side, but not on the other your algorithm won’t detect the problem, still routing not possible because it does not know the connection.