handle raster2dggs conversion when raster uses projected CRS#57
Open
fmigneault wants to merge 1 commit intoopengeoshub:mainopengeoshub/vgrid:mainfrom
crim-ca:handle-raster2dggs-proj-crscrim-ca/vgrid:handle-raster2dggs-proj-crsCopy head branch name to clipboard
Open
handle raster2dggs conversion when raster uses projected CRS#57fmigneault wants to merge 1 commit intoopengeoshub:mainopengeoshub/vgrid:mainfrom crim-ca:handle-raster2dggs-proj-crscrim-ca/vgrid:handle-raster2dggs-proj-crsCopy head branch name to clipboard
fmigneault wants to merge 1 commit intoopengeoshub:mainopengeoshub/vgrid:mainfrom
crim-ca:handle-raster2dggs-proj-crscrim-ca/vgrid:handle-raster2dggs-proj-crsCopy head branch name to clipboard
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The code currently assumes that Geographic CRS are employed. If the raster is using PROJ CRS, the result is an incoherent collection of cells spread around the world.
For example, using this image: https://rcm-ceos-ard.s3.ca-central-1.amazonaws.com/MLC/2025/08/20/RCM2_OK3556292_PK3758929_1_SC30MCPB_20250820_124729_CH_CV_MLC/RCM2_OK3556292_PK3758929_1_SC30MCPB_20250820_124729_RL.tif
The CRS is:
The current code results in many random grid cells around the world.
(for example, one of the entry below is in Australia)
Now, it creates the correct grid positions in Canada (above Winnipeg, as expected).
There are many other locations in the code that does similar assumptions, but I have only edited the raster conversion that were identical to the code I am invoking.