[OSM-talk] JOSM Tools to fix coastlines
Francisco R. Santos
frsantos at gmail.com
Wed Aug 8 13:13:04 BST 2007
On 8/8/07, Robert (Jamie) Munro <rjmunro at arjam.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> The quoting on this message has all messed up - sorry!
> Francisco R. Santos wrote:
> > Yesterday I began coding this check. The opposite directions check is
> > done, and the "meet other coastline" is also easy, I think.
> > > >> Could validator detect when two coastline ways run parallel without
> > > >> other ways in between running opposite?
> > > >
> > > > That is more complicated, and right now I don't know how to do it.
> > > > I'll need to think about it.
> > > If it helps, it occurs to me that any line drawn through a map should
> > > cross coastlines in alternate directions. You could test the lines
> > > making the borders of the downloaded area, then draw lines that pass
> > > through any ways that haven't been tested already.
> > I've thinking about it, and maybe this test is not necessary at all. If
> > two coastlines run in parallel, it is because at some point the lines
> > meet pointing in opposite directions, right?
> No, it's because they could be separate islands, or lakes and one of
> them is the wrong way round. Also the part of the map where they join
> might not have been downloaded because it is off the screen.
> See an area like:
> for a complicated example. In the mapnik layer, because the coasts
> aren't filled, you can see what is supposed to happen by the fact there
> is a town at the top. If you switch to the osmarender layer, you can see
> that it needs sorting, but it's hard to tell what is supposed to be land
> and what is supposed to be sea.
Yes, I see. I' try to make a test for it. Don't expect it soon, since I take
vacations this friday. I'll try to upload a version with the basic test
(ways meeting in opposite directions) tomorrow..
However, I don't think there could be an automatic fix for it, because there
is missing information if not all data is downloaded: that is, there is no
way of knowing if a way is clockwise or counterclockwise unless the whole
coastline is downloaded. Only if an island or lake is small enough could it
be automatically fixed. Perhaps islands could be used to check mainland or
bigger islands, and so on... I'll think about it.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the talk