-
Notifications
You must be signed in to change notification settings - Fork 15
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
Polygon-Based Data Cropping #87
Comments
You will need to update the implementation too. As it is it will only work with rectangular regions. For a polygon you will need to use some shapely method like https://shapely.readthedocs.io/en/stable/reference/shapely.contains.html or geopandas sjoin: https://geopandas.org/en/stable/docs/reference/api/geopandas.sjoin.html. And you will need to check performance for large meshes. The pure numpy implementation we have here is probably faster than the alternatives. Nevertheless, try to get something working and if performance proves to be problematic you can investigate making it faster afterwards (e.g. leverage numba or something). |
I cannot find Searvey anymroe; anyone? Thx. |
Thanks for the quick response and the detailed explanation. For now, I am using a rectangle region but I wanted to confirm if there's a possibility to switch to a polygon later on. Thanks once again. |
Hi, please check here: https://github.com/oceanmodeling/searvey |
Thx, Atieh! |
Hi, I have a question: do we need to adjust this part of the code to use a polygon like the one below for cropping the data? Thanks!
polygon = array ([[271.09419606, 30.29241252],
[270.80483714, 30.47217758],
[270.31435613, 30.35380055],
[269.89991289, 30.0740687 ],
[269.9734827 , 29.72115943],
[270.38302128, 29.34776829],
[270.5129946 , 28.86997287],
[270.96177041, 28.87641531],
[271.38357063, 29.16376929],
[271.45468811, 29.68281716],
[271.68765915, 29.83609834],
[271.65087425, 29.96790232],
[271.09419606, 30.29241252]])
The text was updated successfully, but these errors were encountered: