User:Hansm/Boundary statistics

From OpenStreetMap Wiki
Jump to navigation Jump to 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 6 administrative Cornwall
relation 62269 2 administrative Isle of Man
way 28489604 national_park Dartmoor National Park
relation 87944 6 administrative Swansea
relation 134324 6 administrative Powys
relation 10187 6 administrative Herefordshire
relation 151283 4 administrative West Midlands
relation 57511 6 administrative Shropshire
relation 82631 6 administrative South Gloucestershire
relation 57581 6 administrative Worcestershire
relation 57515 6 administrative Staffordshire
relation 153487 6 administrative Cheshire East
relation 149122 8 administrative Pendle
relation 151012 4 administrative Yorkshire and the Humber
relation 150871 8 administrative Richmondshire
relation 151164 4 administrative North East England
relation 88066 6 administrative Northumberland
way 31787677 national_park New Forest National Park
relation 151279 4 administrative East Midlands
relation 108100 8 administrative Derbyshire Dales
relation 88077 6 administrative Derbyshire
relation 118323 8 administrative Bradford
relation 88079 6 administrative West Yorkshire
relation 154376 6 administrative Tyne and Wear
relation 142282 6 administrative Newcastle upon Tyne
relation 127238 8 administrative Winchester
relation 76228 6 administrative Hampshire
relation 76155 6 administrative Oxfordshire
relation 63375 6 administrative Northamptonshire
relation 58414 10 administrative Morton Pinkney
relation 77270 8 administrative Bassetlaw
relation 135523 8 administrative Selby
relation 150966 8 administrative Hambleton
relation 114677 8 administrative Chichester
relation 113757 6 administrative West Sussex
relation 88082 6 administrative Bedfordshire
relation 158396 6 administrative Bedford
relation 57398 6 administrative Rutland
relation 145223 8 administrative Veulette-sur-Mer
relation 92650 6 administrative East Sussex
relation 62162 6 administrative Essex
relation 76488 8 administrative Castle Point
relation 53337 8 administrative St Edmundsbury
relation 57397 6 administrative Norfolk
relation 53332 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, relation 56392, relation 162784
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.