OpenStreetMap Forum

The Free Wiki World Map

You are not logged in.

#1 2013-01-13 10:11:48

Chiang Mai and up is flooded

When I make maps with mkgmap I have noticed that northern Thailand is "flooded". It starts just south of Chiang Mai on my maps and up to where I have the map cut in China. Somewhere there must be a body of water that is not closed. OSM inspector has a tool for it but it only seems to work for Europe.  Does anyone know of a way to find the leak?

Offline

#2 2013-01-14 00:25:11

Re: Chiang Mai and up is flooded

You can try this with the JOSM validator, but the region around Chiang Mai has a lot of OSM data, so this procedure will take some time. Better you could use filter options before.
F.e. for Chiang Mai itself JOSM has found the 3 unclosed waterways:
200889783
98567086
92838271

Offline

#3 2013-01-14 07:47:56

Re: Chiang Mai and up is flooded

Thanks for helping. Did you close the ones you found?

Offline

#4 2013-01-14 12:02:06

Re: Chiang Mai and up is flooded

No, I did not repair because I thought you want to research and find out before the real reason for flooding. Should I fix it?

Now I tried a better way for can check the full north of thailand. I had to install the "mirrored-download" plugin in JOSM first: http://wiki.openstreetmap.org/wiki/JOSM … d_download

With this plugin you can download objects of a type or condition you defined.
F.e. I did select the full north of thailand and searched for objecttype:"way" with xapi:"[natural=water]", later in a second and third downloads for "[landuse=basin]" and "[landuse=reservoir]". (I guess it is also possible in one run.)
Then I started the JOSM validator. My results for unclosed ways:
91222234, 200306319, 196514746, 93181185, 200889783, 92838271, 98567086, 143409915

Offline

#5 2013-01-14 16:06:09

Re: Chiang Mai and up is flooded

Yes, go ahead and fix. Thanks for your help.

Offline

#6 2013-01-15 10:41:32

Re: Chiang Mai and up is flooded

Ok, it's done.

Offline

#7 2013-01-15 14:00:31

Re: Chiang Mai and up is flooded

Thanks. Hopefuly that fixed it.

Offline

#8 2013-01-18 06:19:57

Re: Chiang Mai and up is flooded

It is still flooded.

I filtered out natural=water and converted to xml with osmosis like this:

Osmosis.bat --read-pbf file=map.osm.pbf --tf accept-ways natural=water --tf reject-relations  --used-node --write-xml map.osm.xml

When I try to open the result with josm I get an error: Illegal value for attribute 'version' on OSM primitive with ID 26577868. Got -1. (at line 4, column 118)

I open the xml file with a text editor and see this:

<?xml version='1.0' encoding='UTF-8'?>
<osm version="0.6" generator="Osmosis 0.40.1">
  <bound box="5.00000,96.00000,24.00000,112.00000" origin="0.40.1"/>
  <node id="26577868" version="-1" timestamp="1969-12-31T23:59:59Z" changeset="-1" lat="16.7810304" lon="96.1898577">
    <tag k="created_by" v="JOSM"/>
  </node>
  <node id="26577869" version="-1" timestamp="1969-12-31T23:59:59Z" changeset="-1" lat="16.7820215" lon="96.1893358">
    <tag k="created_by" v="JOSM"/>
  </node>
  <node id="26577870" version="-1" timestamp="1969-12-31T23:59:59Z" changeset="-1" lat="16.783004" lon="96.1891588">
    <tag k="created_by" v="JOSM"/>
  </node>

I replace all "-1" with "1" and then reopens with josm and it works and the validator finds a bunch of open waterways.

Is there any easier way to do this?

Offline

#9 2013-01-18 16:40:07

Re: Chiang Mai and up is flooded

RocketMan wrote:

It is still flooded.

I filtered out natural=water and converted to xml with osmosis like this:
Osmosis.bat --read-pbf file=map.osm.pbf --tf accept-ways natural=water --tf reject-relations  --used-node --write-xml map.osm.xml

Sorry, I do not know osmosis. I use now the upside described JOSM-plugin "mirrored download". So you can also make a filtered download direct into JOSM.

RocketMan wrote:

..
<bound box="5.00000,96.00000,24.00000,112.00000" origin="0.40.1"/>

You filtered in a very big region. I had made my repairs only in Thailand. Could you find still any unclosed ways here?

RocketMan wrote:

.. and the validator finds a bunch of open waterways.

Did you mean unclosed ways with waterway=* or natural=water? I think for waterway=*, only waterway=riverbank must be closed.

Please note also: I found some similar unclosed ways which are correct outer segments of multipolygon relations. But you and I did not download relations and so JOSM will show these ways as fault.

Offline

#10 2013-01-19 13:03:55

Re: Chiang Mai and up is flooded

You filtered in a very big region. I had made my repairs only in Thailand. Could you find still any unclosed ways here?

I found a couple of relation segments in Chiang Mai area that were tagged with natural=water if I remember right. Only the relation should be tagged with natural water and not any of the members if I have it right.

Did you mean unclosed ways with waterway=* or natural=water? I think for waterway=*, only waterway=riverbank must be closed.

I have only checked natural=water and landuse=reservoir so far. Probably should check waterway=riverbank too.

Please note also: I found some similar unclosed ways which are correct outer segments of multipolygon relations. But you and I did not download relations and so JOSM will show these ways as fault.

OSM inspector can check for relations so that is much easier.

Offline

#11 2013-01-21 17:40:09

Re: Chiang Mai and up is flooded

RocketMan wrote:

Please note also: I found some similar unclosed ways which are correct outer segments of multipolygon relations. But you and I did not download relations and so JOSM will show these ways as fault.

OSM inspector can check for relations so that is much easier.

Maybe it was a bit missunderstanding. When JOSM opens a data download containing only ways+nodes, then the Validator can not differentiate between
a) real unclosed ways and
b) way segments - each unclosed - combined by a multipolygone relation (f.e. the combine of the ways 92838271+98567086 was not necessary because the relation 2702714 already joined both).

I found a couple of relation segments in Chiang Mai area that were tagged with natural=water if I remember right. Only the relation should be tagged with natural water and not any of the members if I have it right.

No, it is not obligatory. Eighter the multipolygone relation contains all important tags of the area and all outer members have no tags of this kind. (This is currently the more recommended version.)
Or the tags are directly at the outer ways and the multipolygone relation combines it. Both versions are possible and allowed.
But if these relations contain inner ways (f.e. a forest with a sea inside) then there are small differences in the interpretation between both tagging versions: A tag at the outer way is valid for its full area (f.e. for the forest and for the sea). Tags in the relation are valid only for the resulting area (f.e. for the forest only).

Bye,
sundew

Offline

#12 2013-02-23 01:36:34

Re: Chiang Mai and up is flooded

Can you please send a link which shows that "flooded area"? I open the map around Chiang Mai quite often and did not notice any problems the last weeks. I'm quite sure I would have noticed a problem with the water features as I had been working on a SVG map recently...

http://thaimap.osm-tools.org/?zoom=10&l … ayers=B00T

Stephan

Offline

#13 2013-02-24 18:37:54

Re: Chiang Mai and up is flooded

The flooding will not show on the webpage, the problem is seen when using mkgmap to make maps for garmin gps.

Offline

#14 2013-02-25 18:46:33

Re: Chiang Mai and up is flooded

That may be a bug of mkgmap. If you do not use --generate-sea, but add a style for natural=coastline, the flooding may disappear.

Offline

#15 2013-02-26 15:33:50

Re: Chiang Mai and up is flooded

I "solved" it by using Wanmill's precompiled sea instead.

Offline

#16 2013-02-26 22:27:49

Re: Chiang Mai and up is flooded

Was the input data reference complete? Some of the multipolygons are quite large. Be sure the cutting of the area does not throw away important data.

Offline

#17 2013-02-27 11:17:58

Re: Chiang Mai and up is flooded

That I can't give a proper answer to. I used osmosis to cut out the data.

Offline

#18 2013-02-27 21:23:54

Re: Chiang Mai and up is flooded

you specified "--tf reject-relations". I'm quite certain with that option you won't have multi-polygon relations in your data. These are needed to correctly know which way is an outer or inner way of a water feature.

Offline

Board footer

Powered by FluxBB 1.4.8
Hosting sponsored by Oxilion