-
Notifications
You must be signed in to change notification settings - Fork 773
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
proj_factors produces wrong results with EPSG:2222 (ft) #3824
Comments
Using PR #3825 to use a CRS in
|
Also using PR #3825 to use a CRS in proj CLI, I get these results with a CRS that is
|
I do not think you should expect any meaningful result in this case: the geometry factor functionality relates to a projection, not to a CRS, so specifying a CRS and asking for factors should be mutually exclusive |
I'm on it |
I do not think so. In fact, I am very interested on the distortion produced in a certain CRS. |
@rouault Do you know why was it failing? I tried removing one of the adjustments of the longitude (so it is done only once) but still the distortion factors were huge. Computing the derivatives numerically should work. |
pj_deriv() calls directly the fwd function pointer of a PJ* object. When it is just a single step pipeline of a map projection, this goes directly to the forward map projection method, which doesn't any pre-processing like done in the fwd_prepare() method, whih is called on the different steps by pipeline_forward() |
I see. P->a was the "culprit" (in addition to the adjustment of the longitude twice). The derivative "should" be independent of the units, and those transformations are conformal, so the axis swap is not noticeable. That means that |
The distortion tells something about the relation between two CRS's. Typically between a projected CRS and a geographic base CRS. The scale factor, e.g. is the ratio between (an infinitesimal) distance measured in the first, respectively the second CRS. Talking about distortions is meaningless if not specifying in relation to what. |
proj_factors(): make it work with projected CRS with non-metre unit and/or northing/easting axis order (fixes #3824)
That is exactly what #3825 does |
But not exactly what you argued for above |
Looking for the behaviour of proj_factors with with a CRS in feet, I found that it returns a huge value
Example of problem
I guess there is no option in
proj
CLI to pass a CRS identifier. So I modified the filegie_self_tests.cpp
. Sorry for the hack.With this input (using a system in ft) the meridional_scale is
3.51837e+07
. However, with EPSG:26948 (the equivalent CRS in m), the escale is0.9999
(the expected value)Problem description
The huge meridional_scale value makes no sense. The other factors are nonsense as well.
Debuging the code, I saw that with EPSG:2222 (and NOT with EPSG:26948) it gets into the function
fwd_prepare
infwd.cpp
. In the line 108it changes
coo.lp.lam
from a small value (near zero) to something like 1.9 radians.I guess that the problem is that it was previously "adjusted" in factors.cpp, line 65
Reached this point I do not know how to fix it without breaking anything else.
Expected Output
proj_factors
produce meaningful values for any CRS, including CRS in feet.Environment Information
proj
): masterInstallation method
The text was updated successfully, but these errors were encountered: