[OSM-talk] Funny Mapnik rendering of lakes
darryl at shpak.ca
Mon Aug 13 23:24:00 BST 2007
Jon Burgess wrote:
> On Mon, 2007-08-13 at 22:32 +0100, Dermot McNally wrote:
>> On 13/08/07, Jon Burgess <jburgess777 at googlemail.com> wrote:
>>> I found a minor problem with the data which meant the way overlapped
>>> itself at 2 places. The points of overlap were very tiny but enough to
>>> confuse the osm2pgsql code and result in the bad rendering. I have
>>> attached 2 screenshots showing the problem data in JOSM.
>> That makes sense. This lake was traced with the excellent lakewalker.
>> I usually do a manual check of the banks to look for stuff like this,
>> but I can't actually recall doing it in this instance. I'll know what
>> to check next time I see this in Mapnik.
> It would be tricky to spot this manually. Maybe we should see if we can
> prevent lakewalker from generating overlapping segments.
That's definitely on the to-do list (maintained in a very high-tech
fashion: a big block of comments near the beginning of the script). The
second case here (three segments in a triangle) is caused by the way
lakewalker very methodically places nodes aligned to a fixed grid, and I
think I know how to fix it (nudge every node very slightly to the right
during the trace, so that if the path passes through the same point
twice from different directions, the nodes are slightly separated).
The first case, however (crossed segments) isn't something I've seen
before, and off the top of my head, I can't think of an easy way to fix
this. I think the JOSM Validator plugin will catch both types of problem
when you try to upload, though.
Many of these small-scale anomalies can be eliminated by turning on the
vertex reduction feature (--vr), which prevents nodes from being created
extremely close together (minimum allowable distance specified by
--vr-epsilon) . However, this also eliminates small-scale features, so
it may not be ideal. I never use it :)
More information about the talk