[R-sig-Geo] mapproject - datum and units

Roger Bivand Roger.Bivand at nhh.no
Tue Sep 13 18:54:41 CEST 2005


On Sun, 11 Sep 2005, Michael Sumner wrote:

> 
> Hello, what datum and unit is used by the mapproject function?
> 
> I'm trying to georegister the coordinates returned by mapproject() in a 
> GIS (Manifold). 
> 
> I'm using
> 
> proj='azequalarea',orient=c(-36.92,174.6,0)
> 
> as in the map.grid example for New Zealand.
> 
> Assuming the coordinate system "Lambert Azimuthal Equal Area", on datum 
> "World Geodetic (1984)", I can get the registration close (within 100 
> km) by using a local scale of 10, 000 km - however this procedure is 
> quite ad hoc, and I'd like to know more about how this is specified in R. 
> (See xml below for my "close" registration by changing the scale).
> 
> I'm quite sure that the unit and datum details are not specified in the 
> documentation for mapproject, and I can't find them in the source code 
> (but I'm a bit lost there anyway). 

I think the C source is the documentation, it's:

/************************************************************

Copyright (C) 1998, Lucent Technologies
All rights reserved

************************************************************/

#include "map.h"

int
Xazequalarea(struct place *place, double *x, double *y)
{
	double r;
	r = sqrt(1. - place->nlat.s);
	*x = - r * place->wlon.s;
	*y = - r * place->wlon.c;
	return(1);
}

proj
azequalarea(void)
{
	return(Xazequalarea);
}

where map.h says:

struct coord {
	double l;	/* lat or lon in radians*/
	double s;	/* sin */
	double c;	/* cos */
};
struct place {
	struct coord nlat;
	struct coord wlon;
};

but I'm about as enlightened as you, I'm afraid. The PROJ.4 system is 
better documented, package spproj on the r-spatial repository.

Roger


> 
> Cheers, Mike.
> 
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <preset>
>    <name>Lambert Azimuthal Equal Area</name>
>    <datum>World Geodetic 1984 (WGS84)</datum>
>    <system>Lambert Azimuthal Equal Area</system>
>    <unit>Kilometer</unit>
>    <majorAxis>6.378137000000000000000000e+006</majorAxis>
>    <eccentricity>8.181919084262148600000000e-002</eccentricity>
>    <centerX>0.000000000000000000000000e+000</centerX>
>    <centerY>0.000000000000000000000000e+000</centerY>
>    <centerZ>0.000000000000000000000000e+000</centerZ>
>    <scaleX>1.000000000000000000000000e+000</scaleX>
>    <localScaleX>1.000000000000000000000000e+007</localScaleX>
>    <scaleY>1.000000000000000000000000e+000</scaleY>
>    <localScaleY>1.000000000000000000000000e+007</localScaleY>
>    <falseEasting>0.000000000000000000000000e+000</falseEasting>
>    <localOffsetX>0.000000000000000000000000e+000</localOffsetX>
>    <falseNorthing>0.000000000000000000000000e+000</falseNorthing>
>    <localOffsetY>0.000000000000000000000000e+000</localOffsetY>
>    <centerLat>-3.692000000000000200000000e+001</centerLat>
>    <centerLon>1.745999999999999900000000e+002</centerLon>
> </preset>
> 
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> 

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no




More information about the R-sig-Geo mailing list