[PROJ] Odd 6.3.0RC1 issue

Even Rouault even.rouault at spatialys.com
Mon Dec 30 08:14:24 PST 2019


On lundi 30 décembre 2019 16:50:24 CET Roger Bivand wrote:
> Having installed 6.3.0RC1 and built GDAL 3.0.2 and GDAL master against it,
> I'm seeing a possible regression in GDAL function exportToProj4() after
> instantiating with EPSG:27700. With 6.2.1 I see "+proj=tmerc +lat_0=49
> +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +units=m
> +no_defs" but with 6.3.0RC1 and both GDAL versions "+proj=tmerc +lat_0=49
> +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +no_defs". The
> offending code is on R-Forge at:
> https://r-forge.r-project.org/scm/viewvc.php/pkg/R/ogr_sp.R?view=markup&root
> =rgdal function showSRID(), calling C++ function P6_SRID_show() at
> https://r-forge.r-project.org/scm/viewvc.php/pkg/src/ogr_proj.cpp?view=marku
> p&root=rgdal.
> 
> In the failing case, importFromEPSG() seems to work, but for 6.3.0RC1, the
> string exported to Proj4 has lost +ellps= and +units=.
> 
> I imagine that this is my mistake, but help would be appreciated.

Perhaps make sure PROJ_LIB is correctly set up / that you point to the right proj.db

Things work correctly for me:

$ projinfo EPSG:27700 -o PROJ
PROJ.4 string:
+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +units=m +no_defs +type=crs

$ gdalsrsinfo EPSG:27700 -o PROJ4

+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +units=m +no_defs

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the PROJ mailing list