Thailand Road Classification and Tagging

Hi All,

We have a reasonable road classification up at http://wiki.openstreetmap.org/wiki/WikiProject_Thailand#Highway_classification but I find that this is not reflective of roads in urban areas. For example, what do we do for Roads (ถนน Thanon) and Lanes (Soi ซอย) in Bangkok since many are tagged as secondary or tertiary but this overlaps with the classification in the wiki which defines secondary and tertiary roads with two or three digits highway classifiers. There are others such as Private Roads (ถนนส่วนบุคคล Thanon Suan Bukkhol), Serviant Roads (ภาระจำยอม Phara Cham Yawm), possibly village roads (ถนนหมู่บ้าน Thanon Moo Baan) which should be correctly tagged too. Does anyone have any ideas how this should be done and resolved?

As has often been noted, the highway tag “is a very general and sometimes vague description of the importance of the highway for the road grid.” Importance, however, is difficult to objectively quantify. Official/legal classifications usually serve as an adequate guide, but not all types of highways have classifications.

For the benefit of those unfamiliar with all highway types here’s a recap:

Most urban streets would legally be local roads. These local roads (excluding those in Bangkok and Pattaya) are being registered, and given ref numbers and road grades, but the grades are based on physical condition and the refs don’t reflect their importance. (See the registration page for Chiang Mai City Municipality, for example.) I’m not sure whether tagging all local roads as highway=unclassified would be appropriate for other urban areas, but it would be totally inadequate in Bangkok. I’ve asked on the help page for advice, and there have been some good replies.

For Bangkok, I think the BMA’s Traffic and Transportation Department’s statistics reports may serve as a good starting point. They have tables showing the amount of traffic and travel times on “important roads” in the city. However, different editions show different lists of roads, so it doesn’t seem to be an official designation.

The roads usually included in said tables are: Kaset–Nawamin, Ngam Wong Wan, Charansanitwong, Charoen Krung, Charoen Nakhon, Chaeng Watthana, Narathiwat Ratchanakharin, Nawamin, Borommaratchachonnani, Bangna–Trat, Prachathipok, Prachasongkhro, Phaya Thai, Rama IX, Rama I, Rama II, Rama III, Rama IV, Rama V, Rama VI, Phahonyothin, Phatthanakan, Phitsanulok, Phetchaburi, Yaowarat, Ratchadaphisek, Ratchadamnoen, Ratchadamri, Ratchawithi, Ratchasima, Ramkhamhaeng, Ram Inthra, Lat Phrao, Vibhavadi Rangsit, Srinagarindra, Si Burapha, Si Ayutthaya, Sawankhalok, Sathon, Samsen, Si Lom, Sukhumvit, Surasak, Seri Thai, Lan Luang, Arun Amarin, Asok Din Daeng, and Inphithak–Phetkasem.

These roads should probably be at least highway=secondary, as they link different parts of the city. How many of them should be primary, I’m not quite sure. Also, as I said on the wiki talk page, my usual rule of thumb is to use at least highway=tertiary for thanon and residential or unclassified for sois. I would like to know what others think of this.

Tagging a soi as “highway=unclassified” certainly differs from the tagging elsewhere in the world.

We can do this, but that means we’re no longer “compatible” with the processing software used (and maintained!) in the rest of the world.

For a soi usually highway=residential is appropriate. There might be exceptions to the rule.

With respect to rendering other attributes should be considered and certainly will be in the near future. Currently the best candidates are lanes=* or width=*.

With roads having more lanes being rendered more prominent this could make city maps more readable. And this was THE reason I was given when people started upgrading road classifications in towns.

As it was already mentioned Bangkok is in many things a special case. For most parts of Thailand the existing classification scheme is easy to follow and can be verified by other mappers. The “on the ground” rule with the aspect of verification by other mappers is one of the cornerstones of OSM. I would not like to see this replaced by classification according to “gut feeling”.
In case we have for bangkok some sort of authoritative list I’m open for discussion.

@Paul: What license is the list of drr? Can we use it to check our roads for completion? Checks like this had been done in Germany to verify roads had been mapped completely.

You’re right, of course. I was mostly referring to the few larger sois that link main roads and serve through traffic, but which haven’t been upgraded to thanon. I think these would fall under the exceptions you mention.

I’m not sure. I’m not a lawyer, but according to the Copyright Act, Thai government units hold copyright to works created under their employment. However, “news of the day and facts having the character of mere information which is not a work in literary, scientific or artistic domain” are non-copyrightable, nor are collections of such facts made by government units. I don’t think Thai law covers anything like database rights. Practically I think it should be okay to use information from such lists for most purposes. Reproducing it is another matter.

The DRR also has a complete list of rural roads on its website. The DOH used to have a similar web interface for national highways, but it’s no longer available.

Then how about we create a list for these exceptions in the Wiki and maintain it?

The official classifications would be based on utility and purpose but if it’s not updated then maybe we should update the information to reflect the realities. I was looking at the zoning laws for Bangkok and they don’t make a distinction between Sois and Thanon but just use the width of the road to restrict building size, so should we also merely consider the designation (soi, thanon, trok) not classifications but merely part of the names and tag based on utility and physical characteristics instead?

OSM India http://wiki.openstreetmap.org/wiki/India:Tags/Highway separates out rural and urban roads, using the same tags in different context giving different meanings. I don’t like this much as we should not make software have to second guess if roads are rural or urban.

@thanaiwirat who is a lawyer on twitter and is usually available for questioning has said that generally when reproducing official information sources it is us good to send an official letter requesting clarification / permission for use. However, government issued publication can generally be cited and reproduced as reference. If you have a specific question to ask and don’t have access, I can translate it and ask him for you.

I can’t access the DRR website.

Paul/Mishari,
can you post some examples of residential roads which you would consider more important than other residential roads? I would like to know if tagging with the lane tag would solve the issue.

I was able to identify the lane count on some of the larger streets using aerial imagery. But I’m not that familiar with the road network in Bangkok. When in Bangkok I try to avoid the traffic jam by using MRT/BTS. So which Soi/other residential is used for pass-through traffic but not upgraded to a classified? I mean really classified by DRR, not just tagging in OSM which I believe is obviously wrong in the Bangkok area.

Example could be Sukhumvit 3 (someone tagged this as tertiary) or Soi 55 Thong Lor or Ekkamai (which was also upgraded to tertiary in OSM). Or the connection down to Rama 4.
I have the impression these upgrades had just been done to make them stick out more on the web map.

Please compare the two renderings here to get an impression on how roads can stick out more when having lanes tag set:
default style:

with lanes tag changing the width:

Would you consider this a way to make the map clearer without re-defining established tags to have a different meaning based on context?

Stephan

@stephankn actually that is pretty interesting, is this a normal part of the mapnik rendering feature?

@Mishari: That depends on the style rules which were used.
I do not know how to do that with the maps shown on the web, I normally create maps for Garmin. And here, I can severly change the layout, cf. my former message “New approach for a map of Thailand” (http://forum.openstreetmap.org/viewtopic.php?id=15541)

@Mishari:
Bernhard already pointed out this is controlled by rendering rules. The map hosted by osm.org uses different rules than mapquest, which also differs from the rules to create thaimap.osm-tools.org.

For osm.org there is currently a team reworking the styling rules. They have the power to include it in their style.

The example above was a quick rendering in Maperitive. I wanted to demonstrate that it might be better to consider actual road characteristics for creating a map and for routing. Classification of a road is some sort of “default value” when no other attributes are available.
The “importance” which is sometimes mentioned as a reason why a road should be upgraded usually is reflected in these attributes.

An “important” road is rarely an unpaved narrow road. It’s more common to be a wide road, multiple lanes, proper surface, sometimes with a different (higher) speed limit than nearby roads. All these attributes can be considered when creating a map. By evaluating for example the lanes attribute I was able to highlight the more important roads without changing their classification.

The current mapnik style also paints “unclassified” and “residential” the same. As unclassifieds are often connecting roads between villages or suburbs in town a more prominent rendering could make the map more readable.

I repeat my offer that I can modify the style on thaimap.osm-tools.org to have an adapted rendering for the situation in Thailand.

Stephan

Stephan, that’s a great offer!
From my point of view, the “trunk” roads deserve better attention. I know the situation in the South only, things might be different elsewhere.
Phetkasem road (#4) is tagged with highway=trunk even where it is just a “normal” road with two lanes, even when it is a narrow winding road (e.g. between Phang Nga and Thap Put). I’d prefer to “downgrade” it to a primary there.
On the other hand, there are some good dual-carriage highways tagged as primary (#41 from Krabi to Surat Thani), or secondary (#415 from Pang Nga to Thap Phut, or #403 to Nakhon Sri Thammarat), even tertiary (#4103 West of Nakhon Sri Thammarat), generally in accordance with the “administrative” tagging scheme described in the wiki.
Those roads have lanes=2 and oneway=yes, and I added dual_carriage=yes for ease of detection to many of them.
How easy/complicated is such an upgrading/downgrading action in Maperitive?

Hi Bernhard,

I hope I made it clear: I vote against changing road classifications based on the condition of the road. I vote for a change of the rendering to consider attributes like lanes for the rendering.

Changing in Maperitive it quite easy and straightforward. This is an example of what I changed in Maperitive on the style which comes together with maperitive:
I made a new define for oneway with two lanes:

highway lanes2oneway : highway=residential AND lanes=2 AND oneway=yes

and later style it according to a higher category road with colors of residential:


		elseif : *lanes2oneway
			define
				min-zoom : 13
				line-color : white
				line-width : 10:1;13:2;15:10;18:12
				border-style : solid
				border-color : white black 25%
				border-width : 15%
			for : tunnel=yes
				define
					border-style : dot
			for : bridge=yes
				define
					border-color : #000
			draw : line
			define
				min-zoom : 10
				max-zoom : 13
				line-color : white black 25%
				border-style : none
			draw : line
			define
				min-zoom : 15
				max-zoom : 20
			draw : text

For a change of the official style or thaimap a patch against mapnik styles is needed:
http://svn.openstreetmap.org/applications/rendering/mapnik/

I forgot: it the tag dual_carriage not a bit strange used in combination with oneway=yes?

Seeing it on a way I would have suggested it means the way is dual carriage but not yet separated into two ways having oneway=yes set each.

I think in most cases physical characteristics should be tagged independently without bearing on the classification. I agree that the distinction between soi and thanon can be rather arbitrary, but at least it’s something objective which can be easily recorded, and it usually does give a rough indication of a road’s “importance” to non-local traffic.

It seems to have been down for a while. Loads fine for me now.

Rendering/routing software taking physical characteristics into consideration would be very useful, but in some instances number of lanes alone won’t be adequate. Off the top of my head there’s Soi Ari Samphan (Rama VI Soi 30). Despite having two lanes (one in each direction), it (together with Soi Ratchakhru (Phahon Yothin 5)) serves a lot of non-local traffic travelling between Phayhon Yothin and Rama VI Roads.

As for Thailand in general, there’s also the issue of rural roads (those maintained by the DRR) not currently being distinguished from four-digit national highways (which are maintained by the DOH). I’m inclined to think that the difference between DRR and DOH highways should be more important than that among DOH highway classes. Any thoughts on this?

I still think that 1- and 2-digit DOH highways are usually of similar enough “importance” that their classes could be merged, leaving a different classification for DRR highways. But others may have better ideas.

Another important point for rendering are non-paved highways. Not all roads have an asphalt or concrete layer, look very similar to tracks, but are public roads connecting villages. I think it is important to see that difference also on the map.

@Stephan: of course, that “upgrading/downgrading” is done only locally for rendering purposes, not in the official database. E.g. I do

highway=trunk & (oneway!=yes) {set highway=primary}
highway!=motorway & (oneway=yes & lanes>1) {set highway=trunk}
highway!=motorway & (highway=* & lanes>2) {set highway=trunk}
highway!=motorway & dual_carriage=yes {set highway=trunk}

so that “trunks” which are not oneway roads are rendered like primaries; and secondary/tertiary etc. which have more than two lanes, or are oneways with more than one lane per direction, are rendered like trunks.
I think that’s similar to your “define” above, just for all previous classifications - mapnik can use more different styles than Garmin.

Sorry, I’m with Bernhard here. I have said it before and I’ll say it again: blindly adhering to the numbering scheme when classifying roads creates an “administrative” map, which is not very useful to anybody. The map should reflect the reality and not just some arbitrary numbering scheme.

As such, I have tagged sections of h’way 4 down South as primary, just like those kinks in the middle of h’way 1 should be (at most) primary, as these sections are of not a great significance in the network. H’way 32, on the other hand, is definitely a trunk road. It links (almost) Bkk to Chiang Mai.

In fact, the project page already states that roads should be ‘upgraded’ where appropriate and I suggest we also ‘downgrade’ roads in the same manner.

I have been mapping a lot of minor roads and tracks, mostly in the N. Some of these happen to have 4-digit ref numbers, but I doubt they are part of any classification scheme we know of. I was dismayed to find that people go and ‘upgrade’ these single lane dirt tracks to tertiary roads to “fill gaps in the road network”.

Regards,
Peter.

Removed

Can you elaborate on this? Since I’ve started mapping in Thailand, I’ve been baffled as to why this highway type is considered inappropriate for any road in Thailand. Certainly from a routing perspective, it seems like a useful classification. In my opinion, there are many minor roads that are typically “less” residential, or typically used as “through-roads” more often than other more residential roads. According to the OSM wiki (http://wiki.openstreetmap.org/wiki/Routing#Highway-type) the default routing priority of unclassified is higher than residential. It seems to me we are leaving a valuable classification unutilized. I think its incorrect to assume that every road in every city (that is not considered at least a 4-digit highway) is of equal importance, and all considered residential (even if its not really residential).

Seems like there is some discussion on these matters, and I just wanted to add my opinion, thanks.

Also agree strongly with Beddhist. The reality of the road system is very different than the official classifications. I definately think that the “reality” of the individual road size, construction, traffic flow, and route should be the primary consideration of classification. The “official” designations often do not reflect the actual “priority of use” of the road. I certainly would trust the opinion of a local mapper over the goverments official designation.

And you are exactly correct about the bypasses, RocketMan. Absolutely daft of us to blindly follow the numbering system in situations like this! Often times, the bypass route around a city would be the preferred method of travel (due to traffic and traffic controls), and yet due to the guidlines in-place, you are invariably routed directly through the city. I think these situations could be handled similarly to the US “business route” system (where the old route through the city is downgraded in classification). Even though there is no official designation for business route here in Thailand, I don’t think we should wait around for the government to change its road classifications in order for us to have better maps - we’re not making maps for the government are we?

Anyway, just needed to vent and throw my 2 cents into the fray.