Loop3D/map2loop-2-legacy

error with read only shapefile access

Closed this issue · 2 comments

This happened when trying to load data from the remote sources for western australia.


CPLE_AppDefinedError Traceback (most recent call last)
fiona/_shim.pyx in fiona._shim.gdal_open_vector()

fiona/_err.pyx in fiona._err.exc_wrap_pointer()

CPLE_AppDefinedError: Only read-only mode is supported for /vsicurl

During handling of the above exception, another exception occurred:

DriverError Traceback (most recent call last)
fiona/ogrext.pyx in fiona.ogrext.WritingSession.start()

fiona/_shim.pyx in fiona._shim.gdal_open_vector()

DriverError: Only read-only mode is supported for /vsicurl

During handling of the above exception, another exception occurred:

CPLE_AppDefinedError Traceback (most recent call last)
fiona/_shim.pyx in fiona._shim.gdal_create()

fiona/_err.pyx in fiona._err.exc_wrap_pointer()

CPLE_AppDefinedError: /vsicurl/http://geo.loop-gis.org/geoserver/loop/wfs?service=WFS&version=1.1.0&request=GetFeature&typeName=linear_500k&bbox=500253.49057027657,7484158.223645598,509618.3857942696,7495253.0617621&srs=EPSG:28350 is not a directory.

During handling of the above exception, another exception occurred:

DriverError Traceback (most recent call last)
in
20 proj_crs={'init': 'EPSG:28350'},
21 # quiet=True
---> 22 overwrite='true',
23 )

~/map2loop-2/map2loop/project.py in update_config(self, out_dir, overwrite, loopFilename, bbox_3d, dtm_crs, proj_crs, step_out, quiet, **kwargs)
259 )
260
--> 261 self.config.preprocess()
262
263 def read_metadata(self, filename):

~/map2loop-2/map2loop/config.py in preprocess(self)
171 geology.to_file(self.geology_file)
172 faults.to_file(self.fault_file)
--> 173 folds.to_file(self.fold_file)
174 if len(mindeps) > 0:
175 mindeps.to_file(self.mindep_file)

/opt/conda/lib/python3.7/site-packages/geopandas/geodataframe.py in to_file(self, filename, driver, schema, index, **kwargs)
1084 from geopandas.io.file import _to_file
1085
-> 1086 _to_file(self, filename, driver, schema, index, **kwargs)
1087
1088 def set_crs(self, crs=None, epsg=None, inplace=False, allow_override=False):

/opt/conda/lib/python3.7/site-packages/geopandas/io/file.py in _to_file(df, filename, driver, schema, index, mode, crs, **kwargs)
326 crs_wkt = crs.to_wkt("WKT1_GDAL")
327 with fiona.open(
--> 328 filename, mode=mode, driver=driver, crs_wkt=crs_wkt, schema=schema, **kwargs
329 ) as colxn:
330 colxn.writerecords(df.iterfeatures())

/opt/conda/lib/python3.7/site-packages/fiona/env.py in wrapper(*args, **kwargs)
398 def wrapper(*args, **kwargs):
399 if local._env:
--> 400 return f(*args, **kwargs)
401 else:
402 if isinstance(args[0], str):

/opt/conda/lib/python3.7/site-packages/fiona/init.py in open(fp, mode, driver, schema, crs, encoding, layer, vfs, enabled_drivers, crs_wkt, **kwargs)
272 c = Collection(path, mode, crs=crs, driver=driver, schema=this_schema,
273 encoding=encoding, layer=layer, enabled_drivers=enabled_drivers, crs_wkt=crs_wkt,
--> 274 **kwargs)
275 else:
276 raise ValueError(

/opt/conda/lib/python3.7/site-packages/fiona/collection.py in init(self, path, mode, driver, schema, crs, encoding, layer, vsi, archive, enabled_drivers, crs_wkt, ignore_fields, ignore_geometry, **kwargs)
165 elif self.mode in ('a', 'w'):
166 self.session = WritingSession()
--> 167 self.session.start(self, **kwargs)
168 except IOError:
169 self.session = None

fiona/ogrext.pyx in fiona.ogrext.WritingSession.start()

fiona/ogrext.pyx in fiona.ogrext.WritingSession.start()

fiona/_shim.pyx in fiona._shim.gdal_create()

DriverError: /vsicurl/http://geo.loop-gis.org/geoserver/loop/wfs?service=WFS&version=1.1.0&request=GetFeature&typeName=linear_500k&bbox=500253.49057027657,7484158.223645598,509618.3857942696,7495253.0617621&srs=EPSG:28350 is not a directory.

This error is geopandas trying to write to a remote shapefile as @RoyThomsonMonash mentioned; was resolved in 34d7ff3. Git pull origin master should fix

Ah ok I built my docker container this morning must have been too quick!