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

Added crs converter function and test #297

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

osundwajeff
Copy link
Collaborator

Ticket #9

Reprojects CRS fucntion and tests.

@timlinux
Copy link
Contributor

Isnt it a bit wasteful to copy each working layer into a new version of the same layer in a different CRS? We should be able to reproject features on the fly into any CRS which is a fairly inexpensive operation. Or do you have a specific use case in mind?

@osundwajeff
Copy link
Collaborator Author

No @timlinux, I don't have any particular use case. I used the function as it is direct, I didn't factor the memory bit.
I'll update the function to reproject on the fly instead.

@osundwajeff
Copy link
Collaborator Author

@timlinux Upon looking at this further, I think reprojecting the object is a better approach as all the geometries will be converted to the new CRS and if there is any computation that will require using the geometries in the new CRS, it will be more accurate.
An example would be getting the extents/bbox of a boundary in utm, by using on the fly reprojection the geometries remain in WGS 84 / EPSG: 4326.
image

Reprojecting:
image

@osundwajeff osundwajeff marked this pull request as ready for review September 25, 2024 10:47
@timlinux timlinux merged commit eb77614 into kartoza:main Sep 26, 2024
6 checks passed
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

Successfully merging this pull request may close these issues.

2 participants