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

New implementation of affine transformations of SFE objects #54

Open
lambdamoses opened this issue Oct 25, 2024 · 1 comment
Open

New implementation of affine transformations of SFE objects #54

lambdamoses opened this issue Oct 25, 2024 · 1 comment
Labels
advanced enhancement New feature or request

Comments

@lambdamoses
Copy link
Collaborator

So it's more like BioFormatsImage, storing the transformation info in metadata, only evaluating it last ditch say when plotting. I'm thinking about this because the user may add more geometries say from QuPath annotations to the SFE object. If the SFE object is already transformed, then the new geometries have to be transformed separately, which would be difficult if the transformation info for the SFE object isn't save somewhere. So at least the transformation info should be saved. The disadvantage of being like BioFormatsImage is that the transformation has to be applied every time spatial data from the SFE object is plotted and I know that users can make a lot of plots. That can be slow when there're hundreds of thousands of polygons but I wouldn't plot that many polygons since we can't see them anyway so I'd rather use scattermore to plot the centroids. Furthermore, while spatial methods that use the spatial neighborhood graph are not affected by the transformation, distance view methods like the variogram may be affected, say by rotation (for anisotropic variograms), scaling, shearing, etc.

@lambdamoses lambdamoses added enhancement New feature or request advanced labels Oct 25, 2024
@lambdamoses
Copy link
Collaborator Author

Also try using proj, if I don't want to read the confusing WKT engineering CRS specification. https://proj.org/en/9.2/operations/transformations/affine.html https://r-spatial.github.io/lwgeom/reference/st_transform_proj.html If it works, then it might be faster than my crude homemade approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
advanced enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant