[PROJ] Check if a definition if a cartographic projection

Kristian Evers kreve at sdfe.dk
Fri Feb 21 04:42:11 PST 2020


Hi José

Congrats on taking the big step towards PRO 6! As you've already found out
there are a few changes in how to work with projections. I'll try to answer your
questions:

1. I don't think so if you are strictly using proj_create(), but you can use
proj_angular_input() and proj_angular_output() to check if the operation
you've created with proj_create() behaves as a projection usually do:
angular in, non-angular out. You won't catch all situations like that, but
most of them. 
Alternatively you can use proj_create_crs_to_crs() and define the input
and output CRS's in terms of EPSG-codes or WKT(2) definitions. In that
case you can use proj_get_type() to get an idea about what you are dealing
with.

2. If your operation purely consist of "+proj=<projection", then yes. If you
expand that into a pipeline like 
"+proj=pipeline +step +unitconvert +xy_in=rad +xy_out=deg +step +proj=<projection>",
then you can use degress.

3. Yes, that phrasing is incorrect and could be improved by mentioning ellipsoids
as well.

/Kristian

-----Original Message-----
From: PROJ <proj-bounces at lists.osgeo.org> On Behalf Of José Luis García Pallero
Sent: 21. februar 2020 12:39
To: proj at lists.osgeo.org
Subject: [PROJ] Check if a definition if a cartographic projection

Hello:

I'm porting an old PROJ4 code for strictly cartographic projections
(forward and inverse steps) to version 6 and I'm a bit confused about
the definition. I see that I must substitute the old pj_fwd() and
pj_inv() by theproj_trans() function, where I set the forward or
inverse step via the PJ_DIRECTION input argument. My questions are:

1. Is it possible (has PROJ6 any function or other method) to check
the definition in order to guarantee it is strictly a cartographic
projection?

2. Must be the geodesic coordinates for the forward cartographic
problem always radians?

On the other hand, I can read in https://proj.org/operations/index.html

"
Projections are purely cartographic mappings of the sphere onto the plane
"

But PROJ also works in the ellipsoid, so I suppose it is a mistake

Best regards

-- 
*****************************************
José Luis García Pallero
jgpallero at gmail.com
(o<
/ / \
V_/_
Use Debian GNU/Linux and enjoy!
*****************************************
_______________________________________________
PROJ mailing list
PROJ at lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/proj


More information about the PROJ mailing list