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

Doesn't work for Russia #7

Open
morandd opened this issue Aug 30, 2022 · 0 comments
Open

Doesn't work for Russia #7

morandd opened this issue Aug 30, 2022 · 0 comments

Comments

@morandd
Copy link

morandd commented Aug 30, 2022

Steps to reproduce:

  wget https://download.geofabrik.de/russia.poly
  python polygon2geojson.py russia.poly

The error message:

Traceback (most recent call last):
  File "/home/daniemor/miniconda3/envs/gdal33/lib/python3.10/site-packages/shapely/geometry/multipolygon.py", line 189, in geos_multipolygon_from_polygons
    N = len(exemplar[0][0])
TypeError: object of type 'float' has no len()

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/mnt/data/OSM/polygon2geojson.py", line 63, in <module>
    main(args.polygon_filename)
  File "/mnt/data/OSM/polygon2geojson.py", line 55, in main
    write_geojson(coordinates, polygon_filename)
  File "/mnt/data/OSM/polygon2geojson.py", line 43, in write_geojson
    output.write({'geometry': mapping(MultiPolygon(data)), 'properties': {}})
  File "/home/daniemor/miniconda3/envs/gdal33/lib/python3.10/site-packages/shapely/geometry/multipolygon.py", line 60, in __init__
    geom, n = geos_multipolygon_from_polygons(polygons)
  File "/home/daniemor/miniconda3/envs/gdal33/lib/python3.10/site-packages/shapely/geometry/multipolygon.py", line 191, in geos_multipolygon_from_polygons
    N = exemplar._ndim
AttributeError: 'list' object has no attribute '_ndim'
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