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

Issue with SDS_tools.polygon_from_geojson #562

Open
Russ-Nasrallah opened this issue Jan 10, 2025 · 2 comments
Open

Issue with SDS_tools.polygon_from_geojson #562

Russ-Nasrallah opened this issue Jan 10, 2025 · 2 comments

Comments

@Russ-Nasrallah
Copy link

Russ-Nasrallah commented Jan 10, 2025

Hello,
I am trying to pull coordinates from a geojson and getting the following error:

polygon = SDS_tools.polygon_from_geojson(geojson_polygon)

Traceback (most recent call last):

Cell In[7], line 1
polygon = SDS_tools.polygon_from_geojson(geojson_polygon)

File c:\coastsat-master\coastsat\SDS_tools.py:696 in polygon_from_geojson
gdf = gpd.read_file(fn,driver='GeoJSON')

File ~\AppData\Local\miniforge3\envs\coastsat\Lib\site-packages\geopandas\io\file.py:297 in _read_file
return _read_file_fiona(

File ~\AppData\Local\miniforge3\envs\coastsat\Lib\site-packages\geopandas\io\file.py:315 in _read_file_fiona
if _is_zip(str(path_or_bytes)):

File ~\AppData\Local\miniforge3\envs\coastsat\Lib\site-packages\geopandas\io\file.py:173 in _is_zip
parsed = fiona.path.ParsedPath.from_uri(path)

AttributeError: module 'fiona' has no attribute 'path'

I have checked online and it seems like it might be related to my version of geopandas (0.14.2)

Any thoughts? Apologies if im missing something basic.

@kvos
Copy link
Owner

kvos commented Jan 13, 2025

yes you need to update geopandas. in Anaconda prompt, after activating the environment, type: conda update geopandas

@Russ-Nasrallah
Copy link
Author

Thanks Kilian,
I did try to update it and got the following:
Image

When I rerun the code I get the same error.

Perhaps this is something about environments that I'm not understanding in Anaconda? unsure.

Thanks for the guidance.

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

2 participants