Thailand Road Classification and Tagging

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.

Please do not forget that almost all of the roads in Thailand with numbers are tagged according to their numbers now. Changes may cause inconsistencies.
I’d like to suggest to take a closer look at other usability criteria, e.g. width of the road (directly in meters, or indirectly by e.g. presence/absence of a central_line, existence of a shoulder), surface and smoothness, number of lanes, speed limits, …
Such criteria can be used for creating the maps instead of the “highway” tag.

Having the physical properties of every road surveyed and tagged would of course be the ideal solution. However, it is also unrealistic to expect this, at least in the short term. While it would be great to have renderers based on the roads’ actual characteristics, we should also be able to make the most of the default fallback when such information isn’t available, which is the highway tag. Having the highway tag reflect the number of digits in the ref 100% of the time would render it redundant. I agree that when local knowledge/experience is available, such information should be taken into consideration.

At any rate, we still need a good set of default classifications, for when detailed knowledge isn’t yet available. As noted above, the current scheme in the Wiki is inadequate as it leaves out / fails to distinguish many types of roads.

I see that my prevoius post could be mis-understood. I did not say: “do not chnage the highway tag”. Rather I’d like to say: “when you change the highway tag, do it with care”.

I’ve started updateing the highway tag of roads in South Thailand. Most changes were “upgrades”, only a few “downgrades”.