[PROJ] proj_angular_input
Paul Ramsey
pramsey at cleverelephant.ca
Sat Feb 16 10:08:36 PST 2019
> On Feb 16, 2019, at 10:04 AM, Even Rouault <even.rouault at spatialys.com> wrote:
>
> On samedi 16 février 2019 06:57:10 CET Paul Ramsey wrote:
>> So, I create a PJ thusly:
>>
>> pj = proj_create_crs_to_crs(NULL, "EPSG:4326", "EPSG:3005", NULL);
>>
>> The from is clearly angular, the to is an albers projection in NAD83.
>>
>> But
>>
>> proj_angular_input(pj, PJ_FWD)
>>
>> Does not return true?
>>
>> Am I misunderstanding the meaning of proj_angular_input or of
>> forward/backward?
>
> Hum, I guess we have some confusion here about the semantics of
> proj_angular_input() and what the "new code" I added those months does.
>
> proj_angular_input() returns true if the expected values are in radian, but
> the pipeline returned by your above proj_create_crs_to_crs() invokation is
>
> +proj=pipeline +step +proj=axisswap +order=2,1 +step +proj=unitconvert
> +xy_in=deg +xy_out=rad +step +proj=aea +lat_0=45 +lon_0=-126 +lat_1=50
> +lat_2=58.5 +x_0=1000000 +y_0=0 +ellps=GRS80
>
> so it does the deg -> rad conversion, which causes the pipeline to not expect
> radians, and thus return false in proj_angular_input()
>
> Kristian, any idea what we should do ? The doc mentions "Check if a operation
> expects angular input.", but we have code we really expect angular to mean
> radian, such as in the proj utility that uses is to to deg to rad conversions.
Well, there’s a certain irony here, in that I’m only checking that function to see if I need to do a rad/deg conversion, so actually it does precisely what I need, but not what I expected. That just leaves me with the axis swapping problem to deal with.
P.
>
> Even
>
> --
> Spatialys - Geospatial professional services
> http://www.spatialys.com
More information about the PROJ
mailing list