2

I'm working on a project with GIS data from ArcGIS in a .gdb file. I wanted to use fiona/geopandas for this and use the data with some machine learning libraries. Some layers contain unsupported types, mentioned here https://github.com/Toblerity/Fiona/blob/master/fiona/_geometry.pyx.

More concrete, I got UnsupportedGeometryTypeError: 11 after opening the layer and then indexing it. Some indexes have valid types, others don't.

Example:

with fiona.open('path.gdb', layer='layername') as layer:
  print(layer[4]) # works
  print(layer[5]) # don't work, UnsupportedGeometryTypeError: 11

Currently, I'm working on a mac, but can switch to a Linux distro if it solves the problem. I prefer to use free libraries and to avoid arcpy, since I need a license and e.g. ArcGIS Server.

Any ideas how can I work with those formats? Maybe additional drivers or another library? Thanks.

  • Do you know the type of geo which is not supported? – sagarr Feb 05 '19 at 16:13
  • @sagarr so far I encountered MultiCurve, but it's possible that other types are also in the dataset. – Anton Krashennikov Feb 06 '19 at 07:46
  • Am afraid that shapely will support proprietary geo type like multicurve, you are better off using arcpy, also ask the question on gis.stackexchange, you may get more input there. – sagarr Feb 08 '19 at 08:41

1 Answers1

2

You could give a try to GDAL/OGR python library. There is good chances that it supports all the geometry types that are in your fgdb.

If it's not the case, your best option would be to convert your FileGeodatabase (fgdb) which is a proprietary format (Esri) into an open format like PostGreSQL/PostGIS.

You can use the command line tool ogr2ogr to perform the conversion.

Below the Radar
  • 7,321
  • 11
  • 63
  • 142