Bug in shakemaps_from_quakeml workflow for gfz2022gcsb
When I run the following code:
from shakyground2.workflows import shakemaps_from_quakeml
imts = ["PGA", "SA(0.3)", "SA(1.0)", "MMI"]
event_id = "gfz2022gcsb"
workflow_results = shakemaps_from_quakeml(event_id=event_id, imts=imts, config=None)
Then I get an error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/src/app/shakyground2/shakyground2/workflows.py", line 232, in shakemaps_from_quakeml
results.contours["mean"][imt] = shakemap.get_contours(
File "/usr/src/app/shakyground2/shakyground2/shakemap.py", line 542, in get_contours
geometries.append(LineString([(row[0], row[1]) for row in seg]))
File "/usr/local/lib/python3.8/dist-packages/shapely/geometry/linestring.py", line 46, in __init__
ret = geos_linestring_from_py(coordinates)
File "shapely/speedups/_speedups.pyx", line 156, in shapely.speedups._speedups.geos_linestring_from_py
ValueError: LineStrings must have at least 2 coordinate tuples
From my understanding it happens when the contour lines should be generated. Maybe it is assosiated with the used libraries that we use in the Eq Explorer.
See https://git.gfz-potsdam.de/earthquake-explorer/gfz-earthquake-explorer/-/issues/254 as well.