[OSM-talk-nl] 'foute' polygonen in postgis

Richard Duivenvoorde rdmailings at duif.net
Sat Apr 19 20:24:13 BST 2008


Mm, ik had me voorgenomen om te reageren op een thread van ik meen 
Martijn en Martijn :-) over hoe om te gaan met 'foute' polygonen in 
osm/postgis. Alleen kan ik het mailtje zo even gauw niet terug vinden.

Het ging om het fixen van foute polygonen.
Omdat er bij mijn(!) weten geen mogelijkheid is om dit soort dingen 
automatisch te doen, dacht ik even te kijken of het eenvoudig met de 
hand is te doen.

De volgende query

select osm_id, boundary, name, 'natural', waterway, 
'http://www.openstreetmap.org/?zoom=16&lat=' || 
Y(Transform(ST_Centroid(way), 4326)) || '&lon=' || 
X(Transform(ST_Centroid(way), 4326)) as url
from planet_osm_polygon where not isvalid(way)

en een beetje plakken in een texteditor geeft het volgende resultaat 
voor de polygonen. Door de x en y van de centroid van de geomety in de 
osm url te plakken, kun je even snel op de kaart kijken, EN in een keer 
de data met josm ophalen.
Bij de eerste (Zuider Voorhaven) kon ik de 'zelfversnijding' nog wel 
vinden, maar bij andere niet.
Ik weet niet of dit de manier is, maar op zich zou je zo met wat 
handwerk wel de huidige fouten eruit kunnen vissen...

Waar vind ik trouwens in josm die osm_id terug. Klopt het dat die niet 
in de attributen terecht komen (in josm)?

Is er iemand die een beetje handig is met josm ;-)
Ik weet ook niet of de rendering hiervan dan meteen instort. Vandaar ook 
dat ik er nog geen heb aangepast.

Groet Richard Duivenvoorde


Hier het plak en knip resultaat:

ERROR                     osm_id  boudary name natual waterway    url

Self-intersection          6285567    ""    "Zuider Voorhaven" 
"natural"    "river" 
"http://www.openstreetmap.org/?zoom=16&lat=51.6749431687765&lon=4.38306821579024"

Self-intersection          19880774    ""    ""    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=51.2337263190066&lon=4.4796387889929"

Self-intersection          6346628    "administrative"    "Amstelveen" 
   "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=52.2893237166558&lon=4.85151980433692"

Hole lies outside shell   1669    ""    "Gooimeer"    "natural"    "" 
 
"http://www.openstreetmap.org/?zoom=16&lat=52.3153001710252&lon=5.20366576880434"

Self-intersection          16689815    ""    ""    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=50.7346634361231&lon=6.06209252344352"

Self-intersection          6321528    ""    "Nationaal Park De Meinweg" 
    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=51.1584587291095&lon=6.12947451832452"

Ring Self-intersection     16634784    ""    ""    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=50.7927346088327&lon=6.25808850244141"

Self-intersection          6295689    ""    ""    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=52.5757636310598&lon=6.69908371036832"

Self-intersection          6286427    ""    "Grevelingenmeer" 
"natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=51.7646331858133&lon=3.87701471786698"

Self-intersection          8033492    ""    "Grevelingenmeer" 
"natural"    "river" 
"http://www.openstreetmap.org/?zoom=16&lat=51.7419891034252&lon=3.89908262044033"

Hole lies outside shell   2030    ""    "Deltageul"    "natural"    "" 
 
"http://www.openstreetmap.org/?zoom=16&lat=51.8312550294404&lon=4.07474997705028"

Self-intersection          6287873    ""    "Brittanniëhaven" 
"natural"    "canal" 
"http://www.openstreetmap.org/?zoom=16&lat=51.8958212703664&lon=4.23528063225716"

Ring Self-intersection     6287119    ""    ""    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=51.841560381416&lon=4.31914483997721"

Self-intersection          19785088    ""    ""    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=51.3001319581023&lon=4.34544345747915"

Self-intersection          4327158    ""    ""    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=51.3425119495056&lon=4.35280120140598"

Self-intersection          6290388    ""    ""    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=52.0612956443162&lon=4.36592025276919"

Self-intersection          21109124    ""    ""    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=51.1661906231312&lon=4.3682863865411"

Hole lies outside shell   351    ""    "Étangs d'Ixelles - Vijvers van 
Elsene"    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=50.8316226552459&lon=4.36798174457292"

Self-intersection          21109372    ""    ""    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=51.1646289086344&lon=4.37738556946385"

Hole lies outside shell   2070    ""    ""    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=51.9739049229902&lon=4.27819826005774"

Self-intersection          21583231    ""    ""    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=51.3475832673845&lon=4.42617816786223"

Self-intersection          6283758    ""    ""    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=51.3785865538047&lon=4.42761620651383"

Self-intersection          18946158    ""    ""    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=51.1672905222284&lon=4.43324619659805"

Self-intersection          19880633    ""    ""    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=51.228191845978&lon=4.48831665386695"

Self-intersection          19734461    ""    ""    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=51.2005315787506&lon=4.49317959927205"

Self-intersection          6291711    ""    "Meerburgerwatering" 
"natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=52.1364965463938&lon=4.50624806176603"

Self-intersection          19844652    ""    "Fascinatio"    "natural" 
   "" 
"http://www.openstreetmap.org/?zoom=16&lat=51.9180831568962&lon=4.54510924048969"

Self-intersection          16605487    ""    ""    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=51.1393925044539&lon=4.57620837604766"

Ring Self-intersection     21555882    ""    ""    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=50.8548912364557&lon=4.67257306146194"

Self-intersection          1486    ""    ""    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=52.028726862613&lon=4.65672069528255"

Self-intersection          22323226    ""    ""    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=50.9125063719715&lon=4.69443902722115"

Self-intersection          21998126    ""    ""    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=50.9556096061247&lon=4.69689070864726"

Ring Self-intersection     6286060    ""    ""    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=51.7591045270272&lon=4.82942569008123"

Hole lies outside shell   1670    ""    "Jachthaven"    "natural"    "" 
 
"http://www.openstreetmap.org/?zoom=16&lat=52.3377438688945&lon=4.88308425907989"

Hole lies outside shell   2086    ""    "Grecht"    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=52.1015477796696&lon=4.86779228078237"

Self-intersection          12115224    ""    ""    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=52.084277365342&lon=4.90319674601783"

Self-intersection          20371006    ""    ""    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=52.0807968315577&lon=4.90563999957938"

Self-intersection          6286853    ""    "Boven Merwede"    "natural" 
    "river" 
"http://www.openstreetmap.org/?zoom=16&lat=51.825955150211&lon=4.95368465912784"

Self-intersection          12720259    ""    ""    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=52.3505133345946&lon=4.93055070551862"

Hole lies outside shell   2166    ""    "Het IJ"    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=52.4080771482947&lon=4.9625410893901"

Self-intersection          19077553    ""    ""    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=52.1697082350871&lon=4.99153957496968"

Self-intersection          6296563    ""    ""    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=52.7639242833866&lon=5.07659206802265"

Ring Self-intersection     21397434    ""    ""    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=51.4772085519089&lon=5.45573805773818"

Hole lies outside shell   1996    ""    ""    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=52.5112900119834&lon=5.46284069325626"

Hole lies outside shell   1994    ""    "Zuid-Willemsvaart"    "natural" 
    "" 
"http://www.openstreetmap.org/?zoom=16&lat=51.174609455169&lon=6.5402043447039"

Self-intersection          18891491    ""    ""    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=51.4992108861553&lon=5.52130673016943"

Self-intersection          18912202    ""    ""    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=51.4993973284145&lon=5.55010297131683"

Self-intersection          18639659    ""    ""    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=51.4931041536883&lon=5.54736764459605"

Self-intersection          22701864    ""    "Spielplatz"    "natural" 
   "" 
"http://www.openstreetmap.org/?zoom=16&lat=50.826575800681&lon=6.06868761616238"

Self-intersection          15089955    ""    ""    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=50.7018879629558&lon=6.07526568926768"

Self-intersection          19875526    ""    ""    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=50.7769108563901&lon=6.08265552760636"

Self-intersection          18455441    ""    ""    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=50.8505152375615&lon=6.09336390053085"

Self-intersection          19025203    ""    ""    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=50.789504496564&lon=6.09357982686961"

Self-intersection          9230471    ""    ""    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=51.6644040582116&lon=6.38016135481265"

Self-intersection          6327749    ""    ""    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=52.5295423549146&lon=6.38978365257901"

Self-intersection          6327943    ""    ""    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=52.6526237699888&lon=6.53571945536784"

Self-intersection          1863    ""    "Patersweldemeer"    "natural" 
    "" 
"http://www.openstreetmap.org/?zoom=16&lat=53.1679964160326&lon=6.56920371346113"

Self-intersection          6295796    ""    ""    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=52.6228933380416&lon=6.70407804610196"

Self-intersection          6295983    ""    "Coevorden-Vecht Kanaal" 
"natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=52.6470931331089&lon=6.73339962541546"

Hole lies outside shell   2751    ""    ""    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=50.6299027957243&lon=6.7436780975428"

Self-intersection          6325550    ""    ""    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=52.1873013010722&lon=6.94650348100578"

Self-intersection          15241539    ""    "Poppelsdorfer Schloß" 
"natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=50.7250760036328&lon=7.09206152074424"

Self-intersection          15241876    ""    "Universität Bonn" 
"natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=50.7340332762361&lon=7.10317331104173"

Self-intersection          10367110    ""    ""    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=50.6291945699195&lon=7.11340297958361"

Self-intersection          12701199    ""    ""    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=50.8211150956093&lon=7.17444757129563"

Hole lies outside shell   2886    ""    ""    "natural"    "" 
"http://www.openstreetmap.org/?zoom=16&lat=50.7069097416229&lon=7.42832799959136"





More information about the Talk-nl mailing list