libgproj: Use SRID for PJ object creation when possible
This PR tries to address #2257 by using SRID, not GRASS key-value pairs, for creating an PJ object. Here is a related Q&A.
@metzm Do we ever hit this PROJ error when pj is already not NULL?
https://github.com/OSGeo/grass/blob/830f31d215038c1a67112aa350619f652e04e70b/lib/proj/get_proj.c#L275-L278
@metzm Do we ever hit this PROJ error when
pjis already notNULL?https://github.com/OSGeo/grass/blob/830f31d215038c1a67112aa350619f652e04e70b/lib/proj/get_proj.c#L275-L278
I think we can remove this check.
https://proj.org/development/reference/functions.html#c.proj_create_argv
If creation of the transformation object fails, the function returns 0 and the PROJ error number is updated.
Apparently proj_errno(pj) can still return an error code, if pj is not NULL. At least this is used in various places in PROJ itself.