[OSM-talk] Wanted: Osm2pgsql.exe developer
jburgess777 at googlemail.com
Thu Nov 13 23:37:40 GMT 2008
On Thu, 2008-11-13 at 16:03 +0200, Rahkonen Jukka wrote:
> Martijn van Oosterhout wrote:
> On Thu, Nov 13, 2008 at 7:24 AM, Jukka Rahkonen
> ><jukka.rahkonen at mmmtike.fi> wrote:
> >> I made a quick test with the program and yesterdays Finland.osm.bz2 from
> >> Geofabrik.de. Program starts OK and reading in data is perhaps faster than with
> >> the older osm2pgsql.exe. However, import was not successful because of some
> >> error in the data. Message is this:
> >> terminate called after throwing an instance of 'geos::util::TopologyException'
> >> what(): TopologyException: found non-noded intersection between 2.68304e+006
> >> 8.95213e+006, 2.68415e+006 8.95259e+006 and 2.68415e+006 8.95259e+006, 2.68391e+
> >> 006 8.95307e+006 2.68415e+006 8.95259e+006
> > That's, uh, wierd. Never seen that message before. We do use geos but
> > I didn't think we did anything to trigger this...
> > There's no other helpful information?
> No, unfortunately not. I made two more tests with another computer.
> 1. Test data: Isle of Wight data from Kosmos v. 188.8.131.52 sample data. Result: OK
> 2. Test data: Finland.osm.bz2 from 21st October 2008. Result:
> terminate called after throwing an instance of 'geos::util::TopologyException'
> what(): TopologyException: found non-noded intersection between 2.34623e+006
> 1.07286e+007, 2.34611e+006 1.07287e+007 and 2.34593e+006 1.07281e+007, 2.34684e+
> 006 1.07301e+007 2.34618e+006 1.07286e+007
I've found the source of the problem. It seems there is an issue
catching the exceptions generated in the geos DLL by main program.
> For comparison the same data got imported with the Artem's version of
> osm2pgsql, even that too gave an odd error. This error is from
> different place and obviously for some other reason:
> ElevationMatrix::add(2.8979e+006 8.63408e+006 1.7e-308): Coordinate
> does not overlap grid extent: IllegalArgumentException:
> ElevationMatrix::getCell got a Coord
> inate out of grid extent (Env[2.89876e+006:2.90052e+006,8.6307e
> ]) - cols:3 rows:3
> Conclusion: Jon's osm2pgsql.exe works, but something in the system is
> perhaps too sensible for OSM data errors. If error is something
> Windows related could be verified if somebody who has osm2pgsql on a
> Linux box could have a try with Finnish data from Geofabrik
> <http://download.geofabrik.de/osm/europe/finland.osm.bz2> )? It takes
> about five minutes to run.
The exceptions are often thrown when the osm2pgsql code calls geos to
work out an interior point for the 'P' symbol of a parking area. If the
area is bad, e.g. self-intersecting, then you'll get an exception
thrown. The osm2pgsql code has a try/catch block to ignore these errors
but this was failing.
It tried some combinations of '-shared-libgcc' as mentioned on some of
the sites below  but only statically linking the geos code into
osm2pgsql seemed to fix it.
There is an updated executable at:
More information about the talk