You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This error occurs because only a single shoreline was discovered for a given date which means it cannot be saved as a linestring. Instead save it as a shapely.Point.
Saved extracted shorelines to /home/aksup/doodleverse/CoastSeg/sessions/ID_krt21_datetime04-04-24__11_42_37_RGB
Computing transect shoreline intersections: 100%|█████████████████████████████████████████████████████████████████████████████████████████████| 1319/1319 [05:06<00:00, 4.30it/s]Traceback (most recent call last):
File "/home/aksup/doodleverse/CoastSeg/alaska_zoo_test.py", line 110, in <module>
zoo_model_instance.extract_shorelines_with_unet(settings=settings,
File "/home/aksup/doodleverse/CoastSeg/src/coastseg/zoo_model.py", line 932, in extract_shorelines_with_unet
common.save_transects(
File "/home/aksup/doodleverse/CoastSeg/src/coastseg/common.py", line 1927, in save_transects
merged_timeseries_df,timeseries_df = add_lat_lon_to_timeseries(merged_timeseries_df, transects_gdf.to_crs('epsg:4326'),cross_distance_df,
File "/home/aksup/doodleverse/CoastSeg/src/coastseg/common.py", line 1801, in add_lat_lon_to_timeseries
new_gdf_shorelines_wgs84=convert_points_to_linestrings(cross_shore_pts, group_col='date', output_crs='epsg:4326')
File "/home/aksup/doodleverse/CoastSeg/src/coastseg/common.py", line 2026, in convert_points_to_linestrings
linestrings_gdf = order_linestrings_gdf(linestrings_gdf,linestrings_gdf['date'],output_crs=output_crs)
File "/home/aksup/doodleverse/CoastSeg/src/coastseg/common.py", line 1681, in order_linestrings_gdf
line_string = create_complete_line_string(points)
File "/home/aksup/doodleverse/CoastSeg/src/coastseg/common.py", line 1656, in create_complete_line_string
return LineString(sorted_points)
File "/home/aksup/miniconda3/envs/coastseg_gym/lib/python3.10/site-packages/shapely/geometry/linestring.py", line 73, in __new__
geom = shapely.linestrings(coordinates)
File "/home/aksup/miniconda3/envs/coastseg_gym/lib/python3.10/site-packages/shapely/decorators.py", line 77, in wrapped
return func(*args, **kwargs)
File "/home/aksup/miniconda3/envs/coastseg_gym/lib/python3.10/site-packages/shapely/creation.py", line 120, in linestrings
return lib.linestrings(coords, out=out, **kwargs)
shapely.errors.GEOSException: IllegalArgumentException: point array must contain 0 or >1 elements
The text was updated successfully, but these errors were encountered:
This error occurs because only a single shoreline was discovered for a given date which means it cannot be saved as a linestring. Instead save it as a shapely.Point.
Bug reported by @mlundine
The text was updated successfully, but these errors were encountered: