Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shapely <=1.8 to >=2.0 #107

Open
andrea-bistacchi opened this issue Oct 21, 2024 · 0 comments
Open

Shapely <=1.8 to >=2.0 #107

andrea-bistacchi opened this issue Oct 21, 2024 · 0 comments
Assignees

Comments

@andrea-bistacchi
Copy link
Collaborator

andrea-bistacchi commented Oct 21, 2024

Here I record refactoring needed to upgrade from Shapely <= 1.8 to >= 2.0.


coords

When converting Shapely objects back to Numpy, the .coods property must be called:

outUV = np_array(shp_line) -> outUV = np_array(shp_line.coords)


geoms

When splitting Shapely objects a non-iterable GeometryCollection is returned. To access individual objects in the collection the .geoms property must be used.

split_line_1, split_line_2 = shp_split(line_in, point_in)
->
split_lines = shp_split(shp_line_in, shp_point_in)
split_line_1 = shp_linestring(split_lines.geoms[0])
split_line_2 = shp_linestring(split_lines.geoms[1])

resampling

a problem regarding resampling methods remains to be solved

@andrea-bistacchi andrea-bistacchi self-assigned this Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant