[PROJ] package 'geosphere' -- transforming spherical-based geographic coordinates to WGS84
Douglas, David C
ddouglas at usgs.gov
Fri Apr 17 11:59:59 PDT 2020
April 17, 2020
Greetings,
I have used the destPointRhumb function in the package geosphere to generate a set of geographic coordinates.
If I understand correctly, the returned coordinates were derived on a sphere with defined radius r=6378137.
My desire is to transform the destPointRhumb coordinates to WGS84.
I expected the transformation would result in slightly different coordinates on the WGS84 ellipsoid.
My transformation attempt, however, did not change the coordinates at all -- which puzzles me.
Can someone show me what I'm doing wrong, or misunderstanding?
Thank you in advance.
David Douglas
###########################################################
require(tidyverse)
require(sf)
require(geosphere)
# request 5 coordinates along a rhumb line, 3000 km apart spanning south of equator to northern Greenland...
d <- (1:5 * 3000000)
gs <- d %>% geosphere::destPointRhumb(p = c(-110,-45), b = 20, r = 6378137) %>% tbl_df()
# apply CRS as sphere...
geospherePoints <- gs %>% st_as_sf(coords = c("lon", "lat"), crs = "+proj=longlat +ellps=sphere +no_defs")
geospherePoints
# transform coordinates to WGS84 spheroid...
geospherePointsWGS84 <- geospherePoints %>% st_transform("+init=epsg:4326")
geospherePointsWGS84
# Result: the two sets of coordinates are qualitatively identical... why?
geospherePointsWGS84 == geospherePoints
###########################################################
David C Douglas
USGS Alaska Science Center
250 Egan Drive
Juneau AK 99801
(907) 364-1576 office
ddouglas at usgs.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20200417/d0963882/attachment.html>
More information about the PROJ
mailing list