Skip to content

error while building multipolygon with shapely 1.5.7 #45

Description

@ustroetz

Problem

I updated shapely 1.5.7 and I get the error below. If I use imposm with shapely 1.5.1 the problem doesn't happen.

It seems like it is related to issue #35.

Command

imposm -d santiago_chile -m imposm-mapping.py --read --write --optimize --overwrite-cache santiago_chile.osm.pbf

Error

Enabling Shapely speedups.
loading imposm-mapping.py as mapping
[18:11:36] ## reading santiago_chile.osm.pbf
[18:11:36] coords: 699k nodes: 13k ways: 99k relations: 0k (estimated)
[18:11:41] coords: 797k nodes: 0k ways: 183k relations: 0k
[18:11:41] reading took 5 s
[18:11:41] ## dropping/creating tables
[18:11:41] ## writing data
[2015-04-23 18:11:41,815] imposm.multipolygon - WARNING - error while building multipolygon:
[2015-04-23 18:11:41,815] imposm.multipolygon - ERROR - Null geometry supports no operations
Traceback (most recent call last):
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/imposm/multipolygon.py", line 146, in build
    self.build_relation_geometry(rings)
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/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 "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/imposm/multipolygon.py", line 221, in <lambda>
    rings.sort(key=lambda x: x.geom.area, reverse=True)
  File "/Library/Frameworks/GEOS.framework/Versions/3/Python/2.7/site-packages/shapely/geometry/base.py", line 409, in area
    return self.impl['area'](self)
  File "/Library/Frameworks/GEOS.framework/Versions/3/Python/2.7/site-packages/shapely/topology.py", line 55, in __call__
    self._validate(this)
  File "/Library/Frameworks/GEOS.framework/Versions/3/Python/2.7/site-packages/shapely/topology.py", line 18, in _validate
    raise ValueError("Null geometry supports no operations")
ValueError: Null geometry supports no operations

Setup

Python 2.7.9 (default, Jan  7 2015, 11:49:12) 
imposm 2.6.0 (installed with pip install imposm)
shapely 1.5.7
OS X 10.10.3.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions