Issue
Django is throwing IllegalArgumentException: Shell is not a LinearRing
, when I'm trying to convert a osm json to geojson with osm2geojson.
The exception is only thrown when osm2geoson is trying to make a MultiPolygon out of a relation. It returns a geojson, but without coordinates.
Points are transformed correctly.
My Setup: MAC OS, IntelliJ, but the project is running on a conda environment.
The strang thing: My colleague is working on exactly the same project with conda Environment, has installed the same packages and is got no errors. The only difference is that he works on Linux. But that shouldn't have any influence, right?!
Solution
We solved it!
We found out that Shapely had thrown the exception.
Then we discovered the following entry in the Shapely documentation. https://pypi.org/project/Shapely/
Source distributions:
pip install shapely --no-binary shapely
Before installing shapely without binaries you have to uninstall it.
After installing shapely without binaries, we were thrown out of the following error:
OSError at / dlopen(/usr/local/lib/libgeos_c.so, 6): image not found
... told us to reinstall geos etc.
Then we had to assign a geos_library_path to the django.setting.
GEOS_LIBRARY_PATH="/usr/local/Cellar/geos/3.9.1/lib/libgeos_c.dylib"
However, the image still could not be found. Only after we had copied the lib folder into the conda lib folder.
After that it finally worked!
Answered By - Rikardo Marenzzi
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.