User:Hansm/Boundary statistics

From OpenStreetMap Wiki
Jump to: navigation, search

Here are some statistics about the usage of relation tag "type=boundary". All relate to the planet.osm dump from 2009-07-13.

Boundaries that osm2pgsql converts as pg POLYGON

Except "boundary=yahoo".

relation way admin_level boundary name
Relation 57537 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx) 6 administrative Cornwall
Relation 62269 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx) 2 administrative Isle of Man
Way 28489604 national_park Dartmoor National Park
Relation 87944 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx) 6 administrative Swansea
Relation 134324 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx) 6 administrative Powys
Relation 10187 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx) 6 administrative Herefordshire
Relation 151283 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx) 4 administrative West Midlands
Relation 57511 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx) 6 administrative Shropshire
Relation 82631 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx) 6 administrative South Gloucestershire
Relation 57581 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx) 6 administrative Worcestershire
Relation 57515 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx) 6 administrative Staffordshire
Relation 153487 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx) 6 administrative Cheshire East
Relation 149122 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx) 8 administrative Pendle
Relation 151012 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx) 4 administrative Yorkshire and the Humber
Relation 150871 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx) 8 administrative Richmondshire
Relation 151164 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx) 4 administrative North East England
Relation 88066 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx) 6 administrative Northumberland
Way 31787677 national_park New Forest National Park
Relation 151279 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx) 4 administrative East Midlands
Relation 108100 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx) 8 administrative Derbyshire Dales
Relation 88077 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx) 6 administrative Derbyshire
Relation 118323 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx) 8 administrative Bradford
Relation 88079 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx) 6 administrative West Yorkshire
Relation 154376 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx) 6 administrative Tyne and Wear
Relation 142282 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx) 6 administrative Newcastle upon Tyne
Relation 127238 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx) 8 administrative Winchester
Relation 76228 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx) 6 administrative Hampshire
Relation 76155 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx) 6 administrative Oxfordshire
Relation 63375 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx) 6 administrative Northamptonshire
Relation 58414 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx) 10 administrative Morton Pinkney
Relation 77270 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx) 8 administrative Bassetlaw
Relation 135523 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx) 8 administrative Selby
Relation 150966 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx) 8 administrative Hambleton
Relation 114677 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx) 8 administrative Chichester
Relation 113757 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx) 6 administrative West Sussex
Relation 88082 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx) 6 administrative Bedfordshire
Relation 158396 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx) 6 administrative Bedford
Relation 57398 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx) 6 administrative Rutland
Relation 145223 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx) 8 administrative Veulette-sur-Mer
Relation 92650 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx) 6 administrative East Sussex
Relation 62162 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx) 6 administrative Essex
Relation 76488 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx) 8 administrative Castle Point
Relation 53337 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx) 8 administrative St Edmundsbury
Relation 57397 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx) 6 administrative Norfolk
Relation 53332 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx) 8 administrative Mid Suffolk District
(45 rows)

All administrative boundaries are derived from relations with tag "type=boundary". The only boundary POLYGONs derived from ways are national_parks.

Furthermore, there are 1164 boundaries in talbe planet_osm_line and 1135 in table planet_osm_roads. Both seem to be more or less the same. Both tables contain roughly half of the rows derived from ways and the other half derived from relations. Boundary relations seem to be widely used in the UK and in France.

Relations with "type=boundary" in relation clusters

In the actual OSM DB (not what osm2pgsql has generated from it), there are 26928 relations with "type=boundary". 259 of them are part of a relation cluster, i.e. a relation that contains some of this relations. With high probability, this means that they don't enclose an area. 157 relation clusters contain sub-relations tagged as "type=boundary".

"type" tags used in this relation clusters:

type count remark
address 127 relation names look Russian
boundary 19 mainly used in France, Germany, Austria, Switzerland
multipolygon 3 Relation 17775 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx), Relation 56392 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx), Relation 162784 (XML, Potlatch2, iD, JOSM, history, analyze, manage, gpx)
state 3
county 2
country 1
null 1
nation 1

Super relations containing relations with "type=boundary"

Relation 7374, Relation 7424, Relation 7435, Relation 7885, Relation 7886, Relation 7887, Relation 11980, Relation 16163, Relation 16438, Relation 17775, Relation 22956, Relation 23169, Relation 26880, Relation 28245, Relation 29956, Relation 51684, Relation 51701, Relation 51908, Relation 54422, Relation 56392, Relation 78655, Relation 78967, Relation 79842, Relation 79843, Relation 79844, Relation 79845, Relation 79846, Relation 79847, Relation 79848, Relation 79849, Relation 79852, Relation 79853, Relation 79854, Relation 79855, Relation 79856, Relation 79857, Relation 79858, Relation 79859, Relation 79860, Relation 79895, Relation 79897, Relation 79898, Relation 79900, Relation 79902, Relation 79904, Relation 79906, Relation 79907, Relation 79908, Relation 79909, Relation 79910, Relation 79912, Relation 79913, Relation 79914, Relation 79916, Relation 79917, Relation 79918, Relation 79919, Relation 79920, Relation 79921, Relation 79922, Relation 79924, Relation 79925, Relation 79926, Relation 79927, Relation 79929, Relation 79930, Relation 79931, Relation 79932, Relation 79933, Relation 79934, Relation 79935, Relation 79937, Relation 79940, Relation 79941, Relation 79942, Relation 79943, Relation 79944, Relation 79945, Relation 79946, Relation 79947, Relation 79948, Relation 79949, Relation 79952, Relation 79953, Relation 79954, Relation 79956, Relation 79958, Relation 79959, Relation 79960, Relation 79962, Relation 79963, Relation 79964, Relation 79965, Relation 79966, Relation 79967, Relation 79968, Relation 79969, Relation 79970, Relation 79971, Relation 79972, Relation 79973, Relation 79974, Relation 79976, Relation 79978, Relation 79983, Relation 79984, Relation 79985, Relation 79986, Relation 79987, Relation 79988, Relation 79989, Relation 79990, Relation 79991, Relation 79992, Relation 79993, Relation 79995, Relation 79996, Relation 79997, Relation 79998, Relation 79999, Relation 80000, Relation 80001, Relation 80002, Relation 80003, Relation 80004, Relation 80007, Relation 80008, Relation 80010, Relation 80011, Relation 80012, Relation 80013, Relation 80014, Relation 80015, Relation 80016, Relation 80017, Relation 80018, Relation 80019, Relation 80020, Relation 80022, Relation 80025, Relation 80026, Relation 80028, Relation 80029, Relation 80030, Relation 80031, Relation 80033, Relation 80035, Relation 80096, Relation 80488, Relation 82728, Relation 82743, Relation 82765, Relation 82767, Relation 102879, Relation 135579, Relation 161349, Relation 162784

Sub-relations with "type=boundary"

Relation 7426, Relation 7723, Relation 7885, Relation 7886, Relation 16354, Relation 16483, Relation 17511, Relation 17529, Relation 17560, Relation 17567, Relation 17580, Relation 17601, Relation 17605, Relation 17623, Relation 17632, Relation 17633, Relation 17641, Relation 17644, Relation 17645, Relation 17655, Relation 22233, Relation 22733, Relation 22735, Relation 26221, Relation 26222, Relation 26907, Relation 26923, Relation 28245, Relation 28322, Relation 29713, Relation 29714, Relation 29715, Relation 29716, Relation 29724, Relation 29726, Relation 29731, Relation 29736, Relation 29750, Relation 29773, Relation 29784, Relation 29787, Relation 29788, Relation 29925, Relation 29939, Relation 29948, Relation 31257, Relation 47393, Relation 47442, Relation 47505, Relation 47626, Relation 47773, Relation 47803, Relation 47812, Relation 51239, Relation 51250, Relation 51322, Relation 51326, Relation 51333, Relation 51334, Relation 51339, Relation 51410, Relation 51419, Relation 51440, Relation 51441, Relation 51442, Relation 51443, Relation 51444, Relation 51781, Relation 51793, Relation 51800, Relation 51806, Relation 51814, Relation 51821, Relation 51827, Relation 51831, Relation 51841, Relation 51848, Relation 51902, Relation 51903, Relation 51905, Relation 51906, Relation 51907, Relation 51909, Relation 53957, Relation 59065, Relation 59092, Relation 59137, Relation 59148, Relation 59149, Relation 59161, Relation 59162, Relation 59167, Relation 59178, Relation 59188, Relation 59189, Relation 59190, Relation 59195, Relation 59199, Relation 59202, Relation 59208, Relation 59209, Relation 59246, Relation 59249, Relation 59250, Relation 59252, Relation 59257, Relation 59273, Relation 59275, Relation 59415, Relation 59417, Relation 59418, Relation 59419, Relation 59504, Relation 59506, Relation 59752, Relation 59755, Relation 62145, Relation 65595, Relation 65598, Relation 65606, Relation 66113, Relation 69554, Relation 70542, Relation 70549, Relation 70561, Relation 70563, Relation 70565, Relation 70568, Relation 70569, Relation 70575, Relation 70577, Relation 70580, Relation 70586, Relation 70589, Relation 70591, Relation 70595, Relation 70602, Relation 70604, Relation 70605, Relation 70610, Relation 70614, Relation 70616, Relation 70618, Relation 70620, Relation 70626, Relation 70637, Relation 70638, Relation 70639, Relation 70649, Relation 70656, Relation 70660, Relation 70662, Relation 70665, Relation 70668, Relation 70669, Relation 70671, Relation 70676, Relation 70677, Relation 70679, Relation 70680, Relation 70684, Relation 70690, Relation 70691, Relation 70701, Relation 70703, Relation 70707, Relation 70716, Relation 70719, Relation 70721, Relation 70725, Relation 70727, Relation 70728, Relation 70732, Relation 70737, Relation 70746, Relation 70747, Relation 70748, Relation 70749, Relation 70751, Relation 70752, Relation 70754, Relation 70768, Relation 70772, Relation 70790, Relation 70795, Relation 70798, Relation 70799, Relation 70801, Relation 70809, Relation 70810, Relation 70812, Relation 70814, Relation 71093, Relation 71094, Relation 71097, Relation 71100, Relation 71101, Relation 71105, Relation 71112, Relation 71114, Relation 71116, Relation 71117, Relation 71118, Relation 71119, Relation 71121, Relation 71124, Relation 71125, Relation 71128, Relation 71130, Relation 71132, Relation 71133, Relation 71134, Relation 71135, Relation 71138, Relation 71145, Relation 71147, Relation 71149, Relation 75767, Relation 82622, Relation 82629, Relation 82675, Relation 82682, Relation 82722, Relation 82729, Relation 82751, Relation 82766, Relation 82773, Relation 82775, Relation 82779, Relation 89489, Relation 90124, Relation 90162, Relation 90333, Relation 90340, Relation 90341, Relation 90348, Relation 90352, Relation 102647, Relation 102666, Relation 102877, Relation 102882, Relation 102885, Relation 102896, Relation 102898, Relation 103060, Relation 126410, Relation 130921, Relation 131862, Relation 161349, Relation 163244

Relations with "admin-level" tag set

In the actual OSM DB (not what osm2pgsql has generated from it), there are 47825 relations with "admin-level" tag set.

"boundary" values used together with "admin-level":

boundary count
administrative 47497
historic 20
national_park 1
maritime 1
typos 35
obvious nonsense 3

"type" values used together with "admin-level":

type count
boundary 26679
multipolygon 21050
municipality 29
county 12
amt 10
typos 7
commune 6
border 4
state 1
collection 1
boundary_incomplete 1

Conclusion

Although osm2pgsql tries to generate PostGIS POLYGONS from boundaries, in fact the result is very poor. 45 polygons in relation to 26928 relations with "type=boundary" or 47825 relations with "admin-level" tag set, osm2pgsql's success rate is very close to 0.

Among administrative boundaries, the usage of "type=boundary" and "type=mulitpolygon" is about half-half.

There are only 259 relations with "type=boundary" that are part of a relation cluster. I don't understand the usage in relation clusters with "type=address", but this is the vaste majority. Only 29 are used in clusters with type values that look like administrative units. Mostly, this are high level units (with admin_level <= 4).

An alternate importer tries to fix several issues related to polygons in OSM data for GIS analysis, see osm2postgresql.