[OSM-dev] Fixing invalid ghost lines in planet_osm_line
jochen at remote.org
Wed Feb 3 09:21:08 UTC 2021
The bug you are talking about has been fixed in osm2pgsql and we'll
release a new version today or tomorrow that contains this fix. The bug
has been in the code for about 5 years and nobody noticed in that time,
so I don't expect that there are many cases out there. The problem will
fix itself over time when the data is updated anyway.
The error happens when there is a boundary relation containing exactly
two ways forming a closed ring and the ways are oriented against each
other. So they both have the same first and last nodes. The bug does
not appear when the last node of one of the ways is the first node of
the other. (Most likely the bug will also happen if there are four
ways of which two create one ring and two another etc.)
With that information it is possible to find all occurances in the
planet file, if somebody want to do this.
It is also possible to fix at least some of these cases by simply
turning around one of the member ways. You can do this without the
software having been updated. Just take care that turning around the
way doesn't create other problems.
On Tue, Feb 02, 2021 at 10:24:56PM +0100, Stephan Knauss wrote:
> the Carto Standard rendering, CyclOSM and Humanitarian all show a ghost
> I suspect that the underlying database is corrupt and has invalid entries in
> A similar bug was reported towards osm2pgsql
> and recently fixed:
> I assume here:
> A fresh imported dataset with a newer osm2pgsql version does not show this.
> Can it be confirmed that these are duplicates to this bug?
> It involves way 312514772 and way 312514768 which have no continuous
> Is it possible to detect and fix in-place in the database? Any estimate how
> many geometries are affected by ghost lines?
> dev mailing list
> dev at openstreetmap.org
Jochen Topf jochen at remote.org https://www.jochentopf.com/ +49-351-31778688
More information about the dev