[R-sig-Geo] Change in proj strings?

Tim Keitt tkeitt at utexas.edu
Wed May 20 21:44:03 CEST 2015


http://www.keittlab.org/

On Wed, May 20, 2015 at 2:02 PM, Roger Bivand <Roger.Bivand at nhh.no> wrote:

> On Wed, 20 May 2015, Tim Keitt wrote:
>
>  I get: Error in CRS("+proj=longlat") : major axis or radius = 0 or not
>> given
>>
>> Never seen that before. What's the fix?
>>
>
> Depending on platform, you see different consequences.
>
> When PROJ.4 parses a string defining a spatial reference system, it wants
> something to give it a metric. The +ellps= tag is one such. In PROJ_LIB,
> there used to be a file (proj_def.dat), which contained +ellps=WGS84 as a
> default. On seeing any incoming string without any tags giving ellipsoid
> details, the default was used.
>
> The PROJ.4 trunk still has proj_def.dat, and up to and including 4.8.0, it
> was always shipped in the source and binaries (like Debian proj-data).
> Because the file seems to have been left out of 4.9.*RC* and 4.9.1, anyone
> deleting PROJ_LIB before installing the new version will lose access to the
> defaults. You can avoid using this file by saying:
>
> CRS("+proj=longlat +no_defs")
>
> and indeed that is why +init= generated parsed strings have +no_defs (no
> defaults) set - they ignore proj_def.dat.
>
> I've entered a PROJ.4 ticket #274 about missing proj_def.dat in released
> 4.9.1, and posted on the proj list without response so far.
>
> CRAN installed the Debian 4.9.1 packages on Monday with considerable
> fall-out, and many package maintainers have been contacted (some as early
> as the RC for 4.9.* by me and Edzer).
>
> One way to look at this is as a wake-up call reminding us that a metric
> really is needed in a spatial reference system definition. However, PROJ.4
> has broken its earlier practice of providing a reasonable default, very
> likely by mistake.
>
> The current status for CRAN is that Windows and Snow Leopard rgdal binary
> packages include proj_def.dat, OSX Mavericks does not (but will be rebuilt
> today, thanks to Simon Urbanek, so may get it - hard to inject
> automatically), and installs of rgdal from source depend on the platform
> PROJ.4. The recent Debian release is without proj_def.dat. The file itself
> may be added to PROJ_LIB manually, and downloaded from:
>
> http://trac.osgeo.org/proj/browser/trunk/proj/nad/proj_def.dat
>
> (unchanged in 14 years and very simple). I have no idea how it got lost
> from the PROJ.4 source distribution, but it isn't in proj-4.9.1/nad of:
>
> http://download.osgeo.org/proj/proj-4.9.1.tar.gz
>
> These things are sent to try us ...
>

Thanks. Right or wrong, that omission is going to break a lot of code.

THK


>
> Roger
>
>
>> THK
>> http://www.keittlab.org/
>>
>>         [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> R-sig-Geo at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>
>>
> --
> Roger Bivand
> Department of Economics, Norwegian School of Economics,
> Helleveien 30, N-5045 Bergen, Norway.
> voice: +47 55 95 93 55; fax +47 55 95 91 00
> e-mail: Roger.Bivand at nhh.no
>
>

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list