Closed rogerkuou closed 1 year ago
An alternative is to use the dike data as before. But the source: "https://service.pdok.nl/bzk/bro-geomorfologischekaart/atom/v1_0/index.xml" cannot be read directly by Geopandas.
dikes = gpd.read_file("https://service.pdok.nl/bzk/bro-geomorfologischekaart/atom/v1_0/index.xml")
Output exceeds the [size limit](command:workbench.action.openSettings?[). Open the full output data [in a text editor](command:workbench.action.openLargeOutput?c7578e69-6379-4ce3-96e2-da3660923dfc)
---------------------------------------------------------------------------
DriverError Traceback (most recent call last)
/mnt/c/Users/OuKu/Developments/Carpentry/geospatial-python/notebooks/fix_episode_7_and_8.ipynb Cell 27' in <module>
----> [1](vscode-notebook-cell://wsl%2Bubuntu-18.04/mnt/c/Users/OuKu/Developments/Carpentry/geospatial-python/notebooks/fix_episode_7_and_8.ipynb#ch0000035vscode-remote?line=0) dikes = gpd.read_file("https://service.pdok.nl/bzk/bro-geomorfologischekaart/atom/v1_0/index.xml")
File ~/miniconda3/envs/geospatial_python/lib/python3.9/site-packages/geopandas/io/file.py:201, in _read_file(filename, bbox, mask, rows, **kwargs)
198 reader = fiona.open
200 with fiona_env():
--> 201 with reader(path_or_bytes, **kwargs) as features:
202
203 # In a future Fiona release the crs attribute of features will
204 # no longer be a dict, but will behave like a dict. So this should
205 # be forwards compatible
206 crs = (
207 features.crs["init"]
208 if features.crs and "init" in features.crs
209 else features.crs_wkt
210 )
212 # handle loading the bounding box
File ~/miniconda3/envs/geospatial_python/lib/python3.9/site-packages/fiona/collection.py:555, in BytesCollection.__init__(self, bytesbuf, **kwds)
552 self.virtual_file = buffer_to_virtual_file(self.bytesbuf, ext=ext)
554 # Instantiate the parent class.
--> 555 super(BytesCollection, self).__init__(self.virtual_file, vsi=filetype,
556 encoding='utf-8', **kwds)
...
--> 188 raise DriverError("unsupported driver: %r" % driver)
189 if self.mode not in supported_drivers[driver]:
190 raise DriverError("unsupported mode: %r" % self.mode)
DriverError: unsupported driver: 'GeoRSS'
Then we need to store the pre-processed data at some location (e.g. Figshare)
The waterway data retrieved from source seem to have a corrupted coordinates:
The lat and lon seem to be flipped. We can deal with it but the solution will not be very simple AFAIK. May we we should not use this dataset.