<html style="direction: ltr;">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style id="bidiui-paragraph-margins" type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
</head>
<body bidimailui-charset-is-forced="true" style="direction: ltr;">
<p><font size="+1">Roger:</font></p>
<p><br>
</p>
<p>Thanks for your double effort to help.</p>
<p>Sorry about the line breaks.</p>
<p>(please see inline)<br>
</p>
<p><br>
</p>
<div class="moz-cite-prefix">On 1/22/21 6:19 PM, Roger Bivand wrote:<br>
</div>
<blockquote type="cite"
cite="mid:1ce93ae-f41e-79c3-21c-510fcdbb2f@reclus.nhh.no">On Fri,
22 Jan 2021, Roger Bivand wrote:
<br>
<br>
<blockquote type="cite">On Fri, 22 Jan 2021, Micha Silver wrote:
<br>
<br>
<blockquote type="cite"> Hello Roger:
<br>
<br>
<br>
On 1/20/21 12:39 PM, Roger Bivand wrote:
<br>
<blockquote type="cite"> On Wed, 20 Jan 2021, Micha Silver
wrote:
<br>
<br>
<blockquote type="cite"> The RAINLINK package [1] derives
rain rate from the attenuation of
<br>
signal strength between microwave towers. Data typically
comes from
<br>
cellular network providers, and the location of the
towers is
<br>
typically given in longitude/latitude. <br>
</blockquote>
This is not a reproducible example. Please provide a
reproducible
<br>
example,
<br>
specifying all of the software versions, especially PROJ
and GDAL. The
<br>
changes in PROJ are now entering the 4th year, so I'm a
bit surprised
<br>
that
<br>
steps were not taken before to check for problems to your
workflow as
<br>
Proj4 strings shift from deprecated to defunct. <br>
</blockquote>
<br>
</blockquote>
</blockquote>
</blockquote>
<p><br>
</p>
<p><br>
</p>
<p>This brings us back to the original question:</p>
<p><br>
</p>
<p>What would be the recommended, reliable way to create an
equidistant CRS on the fly, for any location determined by a
cluster of points in Long/Lat?? and avoiding using proj.4
strings??</p>
<p>Should we:</p>
<p> - construct a WKT description to create the CRS?</p>
<p> - just revert to using UTM (not equidistant, but available
everywhere, and easy to determine the zone, EPSG code for any
location)</p>
<p> - Something else?<br>
</p>
<p><br>
</p>
<p><br>
</p>
<blockquote type="cite"
cite="mid:1ce93ae-f41e-79c3-21c-510fcdbb2f@reclus.nhh.no">
<blockquote type="cite">
<blockquote type="cite"> <br>
</blockquote>
</blockquote>
If this is a minimal reprex (making "towers" from the first row,
and putting +lat_0= and +lon_0= at reasonable values):
<br>
<br>
library(sp)
<br>
df <- data.frame(x=c(6.98795, 6.948), y=c(53.09842, 53.08685))
<br>
coordinates(df) <- c("x", "y")
<br>
slot(df, "proj4string") <- CRS("EPSG:4326")
<br>
df
<br>
projstring_aeqd <- paste("+proj=aeqd +lat_0=53.09 +lon_0=6.97",
<br>
"+x_0=0 +y_0=0 +ellps=WGS84")
<br>
spTransform(df, CRS(projstring_aeqd))
<br>
<br>
then I don't see any problem:
<br>
<br>
SpatialPoints:
<br>
x y
<br>
[1,] 1202.371 937.1959
<br>
[2,] -1474.053 -350.3307
<br>
Coordinate Reference System (CRS) arguments: +proj=aeqd
+lat_0=53.09
<br>
+lon_0=6.97 +x_0=0 +y_0=0 +ellps=WGS84 +units=m +no_defs
<br>
Warning message:
<br>
In showSRID(uprojargs, format = "PROJ", multiline = "NO",
prefer_proj = prefer_proj) :
<br>
Discarded datum Unknown based on WGS84 ellipsoid in Proj4
definition
<br>
<br>
The warning just says that you need to know about and decide how
to handle changes in CRS representations. Maybe you do not realise
that sp::CRS() and sp::spTransform() both call rgdal if available,
so you can use:
<br>
<br>
options("rgdal_show_exportToProj4_warnings"="none")
<br>
<br>
before loading sp to mute warnings:
<br>
<br>
<br>
</blockquote>
<p><br>
</p>
<p>OK, clear</p>
<p><br>
</p>
<blockquote type="cite"
cite="mid:1ce93ae-f41e-79c3-21c-510fcdbb2f@reclus.nhh.no">Alternatively,
use the equivalent:
<br>
<br>
library(sp)
<br>
df <- data.frame(x=c(6.98795, 6.948), y=c(53.09842, 53.08685))
<br>
coordinates(df) <- c("x", "y")
<br>
slot(df, "proj4string") <- CRS("EPSG:4326")
<br>
df
<br>
projstring_aeqd <- paste("+proj=aeqd +lat_0=53.09
+lon_0=6.972",
<br>
"+x_0=0 +y_0=0 +datum=WGS84")
<br>
spTransform(df, CRS(projstring_aeqd))
<br>
<br>
</blockquote>
<p><br>
</p>
<p>So specifying the "+datum=" in the proj.4 string also avoids the
warning.</p>
<p><br>
</p>
<blockquote type="cite"
cite="mid:1ce93ae-f41e-79c3-21c-510fcdbb2f@reclus.nhh.no">
<br>
If this isn't a reprex, please extend briefly.
<br>
<br>
Roger
<br>
<br>
</blockquote>
<p><br>
</p>
<p>Thanks again,</p>
<p>Regards, Micha</p>
<p><br>
</p>
<pre class="moz-signature" cols="72">--
Micha Silver
Ben Gurion Univ.
Sde Boker, Remote Sensing Lab
cell: +972-523-665918</pre>
</body>
</html>