I'm using geopandas to get WKT and coordinates from a database:

df = pandas.read_sql(con=conn2, sql=test_query)

df['Coordinates'] = df['WKT'].apply(lambda x: wkt.loads(x.read()))

gdf = geopandas.GeoDataFrame(df, geometry='Coordinates')

loc = r"...\Layers\geopandastest2.shp"

When I use to_file() it gives me the following error:

C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\geopandas\io\file.py:108: FionaDeprecationWarning: Use fiona.Env() instead. with fiona.drivers():

Is it possible to get around this and force to_file() to use fiona.Env() or do I need to wait for geopandas to be updated?

Relevant geopandas github issue: https://github.com/geopandas/geopandas/issues/845

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.