-
Notifications
You must be signed in to change notification settings - Fork 37
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
reproject
is not conceptually correct on Center
loci
#829
Comments
I would expect some error, since the midpoint in the source space may not be the midpoint in the target space as well. See this example in web mercator, where the midpoint between 70 and 80 N is 75 N in lat long, but 75.84 N in web mercator. So the space matters, since it is a nonlinear scaling. julia> using Proj
julia> trf = Proj.Transformation("EPSG:4326", "EPSG:3857"; always_xy = true)
Transformation pipeline
description: axis order change (2D) + Popular Visualisation Pseudo-Mercator
definition: proj=pipeline step proj=unitconvert xy_in=deg xy_out=rad step proj=webmerc lat_0=0 lon_0=0 x_0=0 y_0=0 ellps=WGS84
direction: forward
julia> p1 = trf(0, 70)
(0.0, 1.1068715659379492e7)
julia> p2 = trf(0, 80)
(0.0, 1.5538711096309224e7)
julia> inv(trf)((p1 .+ p2) ./ 2)
(0.0, 75.83979753052014)
julia> inv(trf)
Transformation pipeline
description: axis order change (2D) + Popular Visualisation Pseudo-Mercator
definition: proj=pipeline step proj=unitconvert xy_in=deg xy_out=rad step proj=webmerc lat_0=0 lon_0=0 x_0=0 y_0=0 ellps=WGS84
direction: inverse |
Just updated the example btw |
But we should document this! |
Yeah. I guess for (and yes I'm noticing this a lot plotting norway/svalbard!) |
Hmm that is only necessary if the intervals are Center I think, because of the difference in the nature of the spaces. For Start or End, since the transform is invertible we already get this for free with irregular but implicit intervals. |
reproject
has Locus issuesreproject
is not conceptually correct on Center
loci
Yeah the center moving is the problem. I guess instead it could just never return Center intervals |
It seems to give slightly different results if
shiftlocus(Center, rast)
is used before or afterreproject
. This could be intrinsically from shiftlocus being weird on an Irregular lookup. But it needs investigation.The text was updated successfully, but these errors were encountered: