CORINE data no longer works with example/rover.cfg
Setting land_use_data_source = corine
in the example file produces errors:
TopologyException: side location conflict at 10.716799999999999 49.961500000000001
Traceback (most recent call last):
File "C:\Users\schroen\AppData\Local\Programs\Python\Python39\lib\site-packages\shapely\predicates.py", line 15, in __call__
return self.fn(this._geom, other._geom, *args)
File "C:\Users\schroen\AppData\Local\Programs\Python\Python39\lib\site-packages\shapely\geos.py", line 565, in errcheck_predicate
raise PredicateError("Failed to evaluate %s" % repr(func))
shapely.errors.PredicateError: Failed to evaluate <_FuncPtr object at 0x00000205F8672860>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\schroen\dev\cornish_pasdy\instantPASDy.py", line 2048, in <module>
main(sys.argv.pop(1))
File "C:\Users\schroen\dev\cornish_pasdy\instantPASDy.py", line 541, in main
data['luse'] = exdata.corine.retrieve_corine_data(data,
File "C:\Users\schroen\dev\cornish_pasdy\corny\exdata\corine.py", line 44, in retrieve_corine_data
data=landcover.get_wfs_corine_germany(data)
File "C:\Users\schroen\dev\cornish_pasdy\corny\exdata\roverweb\landcover.py", line 188, in get_wfs_corine_germany
inpt_data=inpt_data.apply(lambda row: interpolate_from_multipolygons(row,corine_gdf,col=corine_column),axis=1)
File "C:\Users\schroen\AppData\Local\Programs\Python\Python39\lib\site-packages\geopandas\geodataframe.py", line 1361, in apply
result = super().apply(
File "C:\Users\schroen\AppData\Local\Programs\Python\Python39\lib\site-packages\pandas\core\frame.py", line 7768, in apply
return op.get_result()
File "C:\Users\schroen\AppData\Local\Programs\Python\Python39\lib\site-packages\pandas\core\apply.py", line 185, in get_result
return self.apply_standard()
File "C:\Users\schroen\AppData\Local\Programs\Python\Python39\lib\site-packages\pandas\core\apply.py", line 276, in apply_standard
results, res_index = self.apply_series_generator()
File "C:\Users\schroen\AppData\Local\Programs\Python\Python39\lib\site-packages\pandas\core\apply.py", line 290, in apply_series_generator
results[i] = self.f(v)
File "C:\Users\schroen\dev\cornish_pasdy\corny\exdata\roverweb\landcover.py", line 188, in <lambda>
inpt_data=inpt_data.apply(lambda row: interpolate_from_multipolygons(row,corine_gdf,col=corine_column),axis=1)
File "C:\Users\schroen\dev\cornish_pasdy\corny\exdata\roverweb\landcover.py", line 148, in interpolate_from_multipolygons
row=row.append(pd.Series({col:polygon_gdf[polygon_gdf.contains(row.geometry.centroid)][col].values[0]}))
File "C:\Users\schroen\AppData\Local\Programs\Python\Python39\lib\site-packages\geopandas\base.py", line 841, in contains
return _binary_op("contains", self, other, align)
File "C:\Users\schroen\AppData\Local\Programs\Python\Python39\lib\site-packages\geopandas\base.py", line 60, in _binary_op
data, index = _delegate_binary_method(op, this, other, align, *args, **kwargs)
File "C:\Users\schroen\AppData\Local\Programs\Python\Python39\lib\site-packages\geopandas\base.py", line 44, in _delegate_binary_method
data = getattr(a_this, op)(other, *args, **kwargs)
File "C:\Users\schroen\AppData\Local\Programs\Python\Python39\lib\site-packages\geopandas\array.py", line 551, in contains
return self._binary_method("contains", self, other)
File "C:\Users\schroen\AppData\Local\Programs\Python\Python39\lib\site-packages\geopandas\array.py", line 542, in _binary_method
return getattr(vectorized, op)(left.data, right, **kwargs)
File "C:\Users\schroen\AppData\Local\Programs\Python\Python39\lib\site-packages\geopandas\_vectorized.py", line 653, in contains
return _binary_predicate("contains", data, other)
File "C:\Users\schroen\AppData\Local\Programs\Python\Python39\lib\site-packages\geopandas\_vectorized.py", line 336, in _binary_predicate
data = [
File "C:\Users\schroen\AppData\Local\Programs\Python\Python39\lib\site-packages\geopandas\_vectorized.py", line 337, in <listcomp>
getattr(s, op)(right, *args, **kwargs) if s is not None else False
File "C:\Users\schroen\AppData\Local\Programs\Python\Python39\lib\site-packages\shapely\geometry\base.py", line 747, in contains
return bool(self.impl['contains'](self, other))
File "C:\Users\schroen\AppData\Local\Programs\Python\Python39\lib\site-packages\shapely\predicates.py", line 18, in __call__
self._check_topology(err, this, other)
File "C:\Users\schroen\AppData\Local\Programs\Python\Python39\lib\site-packages\shapely\topology.py", line 35, in _check_topology
raise TopologicalError(
shapely.errors.TopologicalError: The operation 'GEOSContains_r' could not be performed. Likely cause is invalidity of the geometry <shapely.geometry.polygon.Polygon object at 0x00000205FABE0A30>