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

Optimize Distance to anomaly #409

Closed
nmaarnio opened this issue Jun 4, 2024 · 3 comments · Fixed by #423
Closed

Optimize Distance to anomaly #409

nmaarnio opened this issue Jun 4, 2024 · 3 comments · Fixed by #423
Labels
performance Performance issues or improvements

Comments

@nmaarnio
Copy link
Collaborator

nmaarnio commented Jun 4, 2024

No description provided.

@nmaarnio
Copy link
Collaborator Author

nmaarnio commented Jun 4, 2024

@nialov , would you have time to take this task? Based on recent feedback, distance to anomaly is requested to run much faster (also distance computation, #384 )

@nmaarnio nmaarnio added the performance Performance issues or improvements label Jun 4, 2024
@nialov
Copy link
Collaborator

nialov commented Jun 10, 2024

I believe the problem is geopandas.GeoDataFrame.unary_union here:

geometries_unary_union = geodataframe.geometry.unary_union

Updates to geopandas and shapely might speed it up without code changes. I will try to check before the end of June.

If that does not solve the performance then you need to look at alternatives such as converting the geometries to raster cell values and calculating raster distances. The annoying thing is, that GDAL already implement the raster distance computations with high performance so you would just be replicating a GDAL function which you probably can not beat in terms of performance.

See: #324 (comment)

@nialov
Copy link
Collaborator

nialov commented Aug 12, 2024

There are a number of major updates that have not been implemented in eis_toolkit yet, e.g., shapely 2.0.0, geopandas 1.0.0 and numpy 2.0.0 to name a few. Getting these done successfully seems to require quite a lot of effort. If the updates are not needed, some other method for optimization will probably take less time.

@nmaarnio nmaarnio linked a pull request Oct 22, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Performance issues or improvements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants