Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some multipolygons don't get created when using --proj 4326 #514

Closed
tobwen opened this issue Dec 9, 2015 · 1 comment · Fixed by #527
Closed

some multipolygons don't get created when using --proj 4326 #514

tobwen opened this issue Dec 9, 2015 · 1 comment · Fixed by #527

Comments

@tobwen
Copy link

tobwen commented Dec 9, 2015

osm2pgsql is not building some multipolygons when using --proj 4326.

Have a look at this relation:
wget -O nrw.osm http://www.openstreetmap.org/api/0.6/relation/62761/full
or its simiplied version (only have the size and faster to download):
wget -O nrw.osm https://clbin.com/nbVgx

I've imported it like this using the default.style with and without --multi-geometry using osm2pgsql c8265f8:

osm2pgsql --create --database testcase --proj 4326 nrw.osm

The resulting administrive area can't be found in planet_osm_polygon, it can be found splittet in more than 20 pieces in planet_osm_line.

Import works as expected when using native mercator projection:

osm2pgsql --create --database testcase nrw.osm
@lonvia
Copy link
Collaborator

lonvia commented Dec 9, 2015

I've checked as far back as 0.86 and it doesn't work there either.

Note that it works with -l which essentially is the same as --proj 4326 only faster.

lonvia added a commit to lonvia/osm2pgsql that referenced this issue Jan 12, 2016
- make use of osmium's CRS wrapper
- use virtual functions instead of switching over projection
- remove duplicate code (mainly WSG84 to mercator transformation)
- use custom projections also with --proj 4326 and 900913

Fixes osm2pgsql-dev#514.
lonvia added a commit to lonvia/osm2pgsql that referenced this issue Jan 17, 2016
- make use of osmium's proj wrapper class CRS
- use virtual functions instead of switching over projection
- remove duplicate code (mainly WSG84 to mercator transformation)
- use custom projections also with --proj 4326 and 900913 (fixes osm2pgsql-dev#514)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants