question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

UnsupportedGeometryTypeError in Fiona 1.8.22

See original GitHub issue

Expected behavior and actual behavior.

Opening the file. Is working wit some files. Others raises the error below:

Steps to reproduce the problem.

open the file with geopandas’ read_file

Operating system

OS Ubuntu 20.04 derivative

Fiona and GDAL version and provenance

installed with mamba 0.27.0: fiona 1.8.2.2 gdal 3.5.2 Example Shape File: LoD1_23445938.zip (1/3 of the LoD1 files (by Lower Saxony (open Data)) I tried did not open). But this example opens in QGIS.



  File "fiona/ogrext.pyx", line 1515, in fiona.ogrext.Iterator.__next__
  File "fiona/ogrext.pyx", line 317, in fiona.ogrext.FeatureBuilder.build
  File "fiona/_geometry.pyx", line 187, in fiona._geometry.GeomBuilder.build
  File "fiona/_geometry.pyx", line 168, in fiona._geometry.GeomBuilder._buildGeometryCollection
  File "fiona/_geometry.pyx", line 169, in fiona._geometry.GeomBuilder._buildGeometryCollection
  File "fiona/_geometry.pyx", line 149, in fiona._geometry.GeomBuilder._buildParts
  File "fiona/_geometry.pyx", line 182, in fiona._geometry.GeomBuilder.build
fiona.errors.UnsupportedGeometryTypeError: 16

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
jorisvandenbosschecommented, Oct 21, 2022

t looks strange that if code = 16 on line 296, then line 317 is executed.

Yes, but so it is not code 16 on line 296, at that point it is a GeometryCollection, so code 7

0reactions
rbuffatcommented, Oct 21, 2022

@jorisvandenbossche thanks, now it makes sense! It looks as if the code in https://github.com/Toblerity/Fiona/blob/maint-1.8/fiona/ogrext.pyx#L298-L311 needs to be also in https://github.com/Toblerity/Fiona/blob/master/fiona/_geometry.pyx#L148, or better refactored that it is only in one place, e.g. in GeomBuilder.build.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fiona - PyPI
Raise an UnsupportedGeometryTypeError when a bogus or unsupported geometry type is encountered in a new collection's schema or elsewhere (#340). Enable – ...
Read more >
Fiona Documentation - Read the Docs
Raise an UnsupportedGeometryTypeError when a bogus or unsupported geometry type is encountered in a new collection's schema or elsewhere (#340).
Read more >
python - UnsupportedGeometryTypeError from GML
I'm trying to download a layer from the WFS service: import geopandas as gpd from owslib.wfs import WebFeatureService wfs_service ...
Read more >
Can't install Fiona on Windows - Stack Overflow
When building from source on Windows, it is important to know that setup.py cannot rely on gdal-config, which is only present on UNIX ......
Read more >
Fiona 2.0dev 文档
下面是一个使用fiona从一个数据文件中读取一些记录、更改其几何属性并将其写入新数据 ... 养一个 UnsupportedGeometryTypeError 当新集合的架构或其他地方遇到伪造或不 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found