Closed jasonbeverage closed 9 years ago
The WKT writer was changed in Shapely 1.3 and it seems that it outputs 3D geometries (eg. POINT(8 50 0)
) on some systems. It does work with GEOS 3.4.x and it also does work with Shapely <1.3.
Right I was able to downgrade Shapely and then imposm worked great.
Hi, Considering we're at impose release 2.6.0 now, what is the current status here. Should we still be pinning the Shapely requirement to < 1.3?
Nevermind, Having update impose just now, I see that the Shapely requirement is now >= 1.5. This issue should probably be closed now as solved?
It should work with a recent version of Shapely and GEOS. So, I'm closing this.
I believe this has to be reopened with a recommendation for Shapely==1.5.2
. There seem to be issues with 1.5.3.
Could you provide more details?
Oh dear... I noticed this a few days ago but am at 1.5.2 now. Mind you, I'm on a mac, and I believe the 1.5.3 update is mostly about mac-specific bins? Basically, imposm failed with a series of errors when trying to import. Going back to Shapely==1.5.2 took care of the issue. I will do a test import soon and get back to you with the error list.
Ok. Problem is ValueError: Null geometry supports no operations
. Here goes the last part of the length shell output with latest Shapely. This is on a mac with postgres running through postgresql-common.
[2015-01-19 13:21:16,259] imposm.multipolygon - WARNING - error while building multipolygon:
[2015-01-19 13:21:16,259] imposm.multipolygon - ERROR - Null geometry supports no operations
Traceback (most recent call last):
File "/Users/joao/.pyenv/versions/imposm/lib/python2.7/site-packages/imposm/multipolygon.py", line 146, in build
self.build_relation_geometry(rings)
File "/Users/joao/.pyenv/versions/imposm/lib/python2.7/site-packages/imposm/multipolygon.py", line 221, in build_relation_geometry
rings.sort(key=lambda x: x.geom.area, reverse=True)
File "/Users/joao/.pyenv/versions/imposm/lib/python2.7/site-packages/imposm/multipolygon.py", line 221, in <lambda>
rings.sort(key=lambda x: x.geom.area, reverse=True)
File "/Users/joao/.pyenv/versions/imposm/lib/python2.7/site-packages/shapely/geometry/base.py", line 397, in area
return self.impl['area'](self)
File "/Users/joao/.pyenv/versions/imposm/lib/python2.7/site-packages/shapely/topology.py", line 55, in __call__
self._validate(this)
File "/Users/joao/.pyenv/versions/imposm/lib/python2.7/site-packages/shapely/topology.py", line 18, in _validate
raise ValueError("Null geometry supports no operations")
ValueError: Null geometry supports no operations
[13:21:16] relations: total time 1 s for 383 (365/s)
Assertion failed: (0), function write, file WKBWriter.cpp, line 127.
Assertion failed: (0), function write, file WKBWriter.cpp, line 127.
PS. I have to quit the terminal to get out. Even a keyboard interrupt won't do any good.
Ok, looks like it is related to the new binary packages for Mac OS X. See https://github.com/Toblerity/Shapely/issues/224
Shapely 1.5.4 is out and should fix it.
Yup. Confirmed, everything is smooth now. Thanks for that.
Hello, I had a same issue. Please let me know how to downgrade or upgrade it in ubuntu 12.04 LTS.
Not sure exactly what the problem is but I just installed imposm on a fresh Ubuntu x64 machine and it pulled down Shapely 1.3 from pip. When I went to import any pbf at all it complains about the enforce_dims_geometry being violated. Downgrading to Shapely 1.2.14 fixed things for me. Shapely 1.3 is really new (2 days ago) so it probably hasn't been tested with imposm much if at all.