Comments (10)
My guess would be differing geos versions. But the only way to track this down for sure would be to have a reduced/very small testcase that could be shared so that others could run it and dig into the issue.
from osm2pgsql.
No idea how that can happen, but one potential place to start looking for the difference are the "isValid" checks in build_geometry.cpp and the "--exclude-invalid-polygon" command line option.
osm2pgsql either just ignores invalid polygons, dropping them from the database, or tries to fix them by using the buffer(0) call. Perhaps these checks behave differently from version to version of geos?
from osm2pgsql.
Closing this as outdated. Things have changed since then in the polygon processing code, so it would need to be reconfirmed that this is an issue with current versions of osm2pgsql.
from osm2pgsql.
I can confirm this is still an issue. Installing osm2pgsql on ubuntu 12.04 using apt yields a binary that can successfully import a regional dump containing the willamette river (osm_id of 215160). Compiling from source on ubuntu 12.04 (separate machine) yields a binary that, with the same region dump, will not import a polygon of the river.
From apt, osm2pgsql version is 0.81.0. I checked out the 0.81.0 tag in git, which yielded the same problem.
Finally, removing the apt installed libgeos and gdal, and installing libgeos-3.3.5 and gdal-1.9.2 from source, recompiling osm2pgsql results in correct imports of my regional extract.
from osm2pgsql.
Finally, removing the apt installed libgeos and gdal, and installing libgeos-3.3.5 and gdal-1.9.2 from source, recompiling osm2pgsql results in correct imports of my regional extract.
Sounds like a geos problem then, not an osm2pgsql problem. Do you have a way or relation ID?
Edit: added relation
from osm2pgsql.
Thanks for the response, yes it definitely seems that it's likely a geos problem, I just wanted to ensure that the issue was documented/noted for other people to find.
Relation ID is 215160: http://www.openstreetmap.org/relation/215160
This is not the only issue, a considerable amount of inland rivers are not present on the import.
from osm2pgsql.
Are we certain this is a geos problem rather than geos handling invalid geometries differently on different versions?
Can you post the file you're using?
from osm2pgsql.
Here you go:
https://dl.dropboxusercontent.com/u/195961/planet_oregon_extract.pbf
On Tue, May 6, 2014 at 9:38 AM, Paul Norman [email protected]:
Are we certain this is a geos problem rather than geos handling invalid
geometries differently on different versions?Can you post the file you're using?
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/6#issuecomment-42326503
.
from osm2pgsql.
Where was this from? osmconvert and osmosis produce an invalid OSM file when told to convert it to XML, with invalid versions, timestamps, changesets, and no authors.
https://wiki.openstreetmap.org/wiki/Osmconvert#Dispose_of_Author_Information may be relevant.
Usually you will not encounter any problems when deleting the author information from .osm or .o5m files, however it is not encouraged to do this with .pbf files because most programs will not cope with this change of format
from osm2pgsql.
That was from an online tool to extract a region from the entire dump.
Here's another, different region extract from mapzen that has the same
issue. mapzen states their planet import was last updated 3/28/2014.
https://s3.amazonaws.com/metro-extracts.mapzen.com/portland.osm.pbf
On Tue, May 6, 2014 at 9:54 AM, Paul Norman [email protected]:
Where was this from? osmconvert and osmosis produce an invalid OSM file
when told to convert it to XML, with invalid versions, timestamps,
changesets, and no authors.https://wiki.openstreetmap.org/wiki/Osmconvert#Dispose_of_Author_Informationmay be relevant.
Usually you will not encounter any problems when deleting the author
information from .osm or .o5m files, however it is not encouraged to do
this with .pbf files because most programs will not cope with this change
of format—
Reply to this email directly or view it on GitHubhttps://github.com//issues/6#issuecomment-42328553
.
from osm2pgsql.
Related Issues (20)
- Handling of schemas HOT 1
- Loading ways in non-slim mode is slower than with --slim.
- osm2pgsql-replication init fails on get_dsn_parameters() HOT 1
- Test failure in bdd-flex with 1.9.0 HOT 2
- Confusing middle pgsql processing. HOT 7
- Problem with query to get changed parent objects HOT 7
- 1.9.2 failed to build on several architectures (error: static assertion failed) HOT 2
- Segmentation fault (core dumped) HOT 2
- Allow more than 32 generalization jobs HOT 2
- Chunky rivers when generalizing water areas HOT 2
- Question: could not extend file "base/361191441/368615606.137": No space left on device
- osm2pgsql should not perform analyze by itself HOT 15
- `object:as_multipolygon()` does not take `object.members` into account. HOT 2
- Some research on middle performance HOT 4
- highway=rest_area treatet as line HOT 2
- free(): invalid size Aborted Core dumped HOT 4
- North America import fails HOT 1
- nlohmann-json is missing from the Alpine build dependencies command
- Error in reprocessing of ways in relation, if osmc_symbols-tag of the relation contains the word 'backslash' HOT 6
- Deprecating -i,--tablespace-index? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from osm2pgsql.