Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

swh:1:snp:a4c99a50dc49f82b591f268001b320f8c3ca0041
  • Code
  • Branches (42)
  • Releases (0)
    • Branches
    • Releases
    • HEAD
    • refs/heads/master
    • refs/tags/0.96
    • refs/tags/0.97-1
    • refs/tags/1.0-1
    • refs/tags/1.0-2
    • refs/tags/1.0-3
    • refs/tags/1.0-4
    • refs/tags/1.0-5
    • refs/tags/1.0-6
    • refs/tags/1.0-6.1
    • refs/tags/R-2.10.0
    • refs/tags/R-2.10.1
    • refs/tags/R-2.11.0
    • refs/tags/R-2.11.1
    • refs/tags/R-2.12.0
    • refs/tags/R-2.12.1
    • refs/tags/R-2.12.2
    • refs/tags/R-2.13.0
    • refs/tags/R-2.13.1
    • refs/tags/R-2.13.2
    • refs/tags/R-2.14.0
    • refs/tags/R-2.14.1
    • refs/tags/R-2.14.2
    • refs/tags/R-2.15.0
    • refs/tags/R-2.15.1
    • refs/tags/R-2.15.2
    • refs/tags/R-2.15.3
    • refs/tags/R-2.6.0
    • refs/tags/R-2.6.1
    • refs/tags/R-2.6.2
    • refs/tags/R-2.7.0
    • refs/tags/R-2.7.1
    • refs/tags/R-2.7.2
    • refs/tags/R-2.8.0
    • refs/tags/R-2.8.1
    • refs/tags/R-2.9.0
    • refs/tags/R-2.9.1
    • refs/tags/R-2.9.2
    • refs/tags/R-3.0.0
    • refs/tags/R-3.0.1
    • refs/tags/R-3.0.2
    • refs/tags/R-3.0.3
    No releases to show
  • 46ec0e1
  • /
  • man
  • /
  • geoXY.Rd
Raw File Download
Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
  • revision
  • snapshot
content badge Iframe embedding
swh:1:cnt:06ddef4cbc78fe36f462e9d9b405f61c18cb0742
directory badge Iframe embedding
swh:1:dir:b8e8ff44b5e9724f390de5aae681dc35a28d4b65
revision badge
swh:1:rev:635622b024294f87a1442a50ad662642f5586aa7
snapshot badge
swh:1:snp:a4c99a50dc49f82b591f268001b320f8c3ca0041
Citations

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
  • revision
  • snapshot
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: 635622b024294f87a1442a50ad662642f5586aa7 authored by jmc on 14 July 2008, 00:00:00 UTC
version 1.0-4
Tip revision: 635622b
geoXY.Rd
\name{geoXY}
\alias{geoXY}
\title{ Geodetic coordinates from latitude and longitude }
\description{
  Given a set of points on the earth's surface, in latitude and longitude form, this function returns the corresponding coordinates in \code{X} (east-west) and \code{Y} (north-south) distances along the surface of the earth, from a specified origin.
}
\usage{
geoXY(latitude, longitude, lat0, lon0, unit = 1)
}
\arguments{
  \item{latitude, longitude}{ Pairs of latitude and longitude values for the points to be used. }
  \item{lat0, lon0}{ The two latitude, longitude defining the origin for the desired coordinates.  By default, the southwest corner of the data; that is, the minimum values for the supplied latitude and longitude coordinates. }
  \item{unit}{ The unit to be used for the coordinates, in meters; e.g., \code{unit=1000} causes the coordinates to be in kilometers. }
}
\details{
The coordinates returned are an alternative to projecting the points onto a plane or other surface.
Unlike projections, there is no distortion or approximation involved, other than computational error in the algorithm for geodetic distances.
The coordinates are in principle exact replications of the latitude and longitude, but expressed in distances along the corresponding horizontal and vertical geodesics.
Essentially, the coordinates are rotated to a parallel of latitude and a north-south meridian through the \code{origin}, and distances returned along those lines to the latitude and longitude of the data points.
For  purposes of data visualization, the advantage is that the points are suitable for plotting as \code{x, y} values directly, regardless of the location, so long as the range of the latitude is not large compared to the surface of the earth.

The specific computation can be imagined as follows.  For each pair of latitude and longitude in the data, the corresponding x coordinate is the distance from the origin to a point that has the same latitude as the origin and the same longitude as the data.
The y coordinate is the distance from the origin to a point with the same longitude as the origin and the same latitude as the data.
In each case the distance is distance on the surface of the earth, as computed by the algorithm in \code{\link{geoDist}}, with a sign given by the corresponding difference in latitude (for the y coordinate) or longitude (for the x coordinate).


}
\value{
  A two-column matrix of coordinates, with column names \code{"X", "Y"}.
}
\references{ Vincenty,T. (1975). Direct and inverse solutions of geodesics
on the ellipsoid with application of nested equations. \emph{Survey
Review}, vol. 23(176):88-94.
}
\seealso{  \code{\link{geoDist}}, which computes the distances. }
\examples{
\dontshow{
load(system.file("testdata/gpsObject1.rda", package = "SoDA"))
}
xy <- geoXY(gpsObject1@latitude, gpsObject1@longitude, unit = 1000)
plot(xy[,1], xy[,2], asp = 1)
\dontshow{
rm(gpsObject1, xy)
}
}
\keyword{ math }

back to top

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Contact— JavaScript license information— Web API