[R-sig-Geo] How to define a local equidistant CRS

Michael Sumner md@umner @end|ng |rom gm@||@com
Fri Jun 11 04:16:44 CEST 2021


I'd do

local_aeqd <- function(lon, lat) {
  sprintf("+proj=aeqd +lat_0=%f +lon_0=%f +datum=WGS84", lat, lon)
}

local_aeqd(147, -42)

just note that the very high accuracy of distances only applies from points
to that central point  - but for a fair region around probably suits your
purposes well also and definitely a 15km region, the equidistant property
is unlikely to matter at that scale, for general use I go for laea or if I
have a definite extent and for larger regions >=1000km lcc with +lat_1
and +lat_2 set to the north/south extent.

But, do you really need a projection or just distance between points of
long-lat? (Can't tell from your description). I use geosphere or geodist
routinely, the same code (Karney) exists in the sf stack as well.

Cheers, Mike.

On Sun, Jan 24, 2021 at 2:56 AM Micha Silver <tsvibar using gmail.com> wrote:

>
> On 1/23/21 1:05 PM, Roger Bivand wrote:
>
> On Sat, 23 Jan 2021, Micha Silver wrote:
>
>
> Roger:
>
>
>
>
> Yes, but the exceptions for WGS84, NAD83 and NAD27 are just that,
> exceptions from the general rule of +datum= being dropped. The next road
> bump will occcur soon(ish) because WGS84 is an ensemble of datum
> specifications, not a unique specification, and PROJ 7.2.0 is starting to
> address this: https://proj.org/news.html (Update to EPSG 10.003 and make
> code base robust to dealing with WKT CRS with DatumEnsemble (#2370)). The
> link to https://github.com/OSGeo/PROJ/pull/2370 gives details.
>
> Unless you need sub-metre accuracy, this may not matter, but if different
> parts of the world use different WGS84 definitions (at different times),
> the s2 package may be more stable though a little less accurate.
>
> Sub meter accuracy is definitely not an issue in our use case. The
> microwave antennas are from 1-12 km apart. We need the list of antennas
> that are within a radius of about 15 km. Missing one antenna that is, on a
> sphere, a few 10's of meters too far is of no consequence here.
>
>
> This is more detail than you expected, I think, but at least it is a way
> of documenting things.
>
> Well, like you said, you can't get the sweet potatoes back after cooking
> orange vegetable soup.
>
> :-)
>
>
> Roger
>
>
>
>       If this isn't a reprex, please extend briefly.
>
>       Roger
>
>
> Thanks again,
>
> Regards, Micha
>
>
>
>
> --
> Micha Silver
> Ben Gurion Univ.
> Sde Boker, Remote Sensing Lab
> cell: +972-523-665918
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>


-- 
Michael Sumner
Software and Database Engineer
Australian Antarctic Division
Hobart, Australia
e-mail: mdsumner using gmail.com

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list