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

'MultiPolygon' object is not iterable #4

Open
ymazari opened this issue Jan 16, 2023 · 0 comments
Open

'MultiPolygon' object is not iterable #4

ymazari opened this issue Jan 16, 2023 · 0 comments

Comments

@ymazari
Copy link

ymazari commented Jan 16, 2023

Hello,
I am trying to generate as indicated in the example, but it fails with the following error:

File "/home/yacine/indeed/data-pipelines/venv/lib/python3.8/site-packages/geoh/geoh.py", line 44, in _flatten return [item for sublist in lyst for item in sublist] File "/home/yacine/indeed/data-pipelines/venv/lib/python3.8/site-packages/geoh/geoh.py", line 44, in <listcomp> return [item for sublist in lyst for item in sublist] File "/home/yacine/indeed/data-pipelines/venv/lib/python3.8/site-packages/geoh/geoh.py", line 48, in _multi_polygon_to_polygons return list(geom) TypeError: 'MultiPolygon' object is not iterable

Specifically, I have a geo json file that I obtained from converting the shp file from US census data, but I got the error.
To confirm that the issue is not with my file, I also tried your code with many other json files from the below sources, but I still get the same error.
https://github.com/johan/world.geo.json/blob/master/countries/USA.geo.json
https://eric.clst.org/tech/usgeojson/
https://github.com/loganpowell/census-geojson

Any hints?
Thanks.

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

No branches or pull requests

1 participant