<div dir="ltr"><div><br clear="all">
Hello everyone,<br></div><div>I am trying to read a vector file stored in a GRASS database from geopandas-fiona.<br><br>import fiona<br>import geopandas as gpd<br><br>fiona.supported_drivers["OGR_GRASS"] = "r" <br>gdf = gpd.read_file('/mnt/d/Datos_Landsat/nc_basic_spm_grass7/PERMANENT/vector/roadsmajor/head')<br><br>However it seems that fiona support for GRASS data is not enabled by default. And the suggested activation does not work.  I get the following error<br><br></div><div><br></div><div>Traceback (most recent call last):<br>  File "fiona/_shim.pyx", line 73, in fiona._shim.gdal_open_vector<br>  File "fiona/_err.pyx", line 270, in fiona._err.exc_wrap_pointer<br>fiona._err.CPLE_OpenFailedError: '/mnt/d/Datos_Landsat/nc_basic_spm_grass7/PERMANENT/vector/roadsmajor/head' not recognized as a supported file format.<br><br>During handling of the above exception, another exception occurred:<br><br>Traceback (most recent call last):<br>  File "<stdin>", line 1, in <module><br>  File "/home/juan/miniconda3/envs/iota2-env/lib/python3.6/site-packages/geopandas/io/file.py", line 76, in read_file<br>    with reader(path_or_bytes, **kwargs) as features:<br>  File "/home/juan/miniconda3/envs/iota2-env/lib/python3.6/site-packages/fiona/env.py", line 397, in wrapper<br>    return f(*args, **kwargs)<br>  File "/home/juan/miniconda3/envs/iota2-env/lib/python3.6/site-packages/fiona/__init__.py", line 253, in open<br>    layer=layer, enabled_drivers=enabled_drivers, **kwargs)<br>  File "/home/juan/miniconda3/envs/iota2-env/lib/python3.6/site-packages/fiona/collection.py", line 159, in __init__<br>    self.session.start(self, **kwargs)<br>  File "fiona/ogrext.pyx", line 484, in fiona.ogrext.Session.start<br>  File "fiona/_shim.pyx", line 80, in fiona._shim.gdal_open_vector<br>fiona.errors.DriverError: '/mnt/d/Datos_Landsat/nc_basic_spm_grass7/PERMANENT/vector/roadsmajor/head' not recognized as a supported file format.</div><div><br></div><div>I think it is possible that the OGR build does not include the driver to read GRASS GIS data, but this is new ground for me. does anyone have experience with this integration?<br><br>I am running on a WSL2 and on a conda environment created with the following packages:<br>- <a href="https://anaconda.org/iota2/grass">https://anaconda.org/iota2/grass</a> (grass7.7)<br>- <a href="https://anaconda.org/iota2/otb">https://anaconda.org/iota2/otb</a> (Orfeo Toolbox 7.1)</div><div><br></div><div>Regards,</div><div>Juan<br></div><div><br></div></div>