Package: geosphere 1.6-0

Image

Robert J. Hijmans

geosphere: Spherical Trigonometry

Spherical trigonometry for geographic applications. That is, compute distances and related measures for angular (longitude/latitude) locations.

Authors:Robert J. Hijmans [cre, aut], Charles Karney [ctb], Ed Williams [ctb], Chris Vennes [ctb]

geosphere_1.6-0.tar.gz
geosphere_1.6-0.zip(r-4.6)geosphere_1.6-0.zip(r-4.5)geosphere_1.6-0.zip(r-4.4)
geosphere_1.6-0.tgz(r-4.6-x86_64)geosphere_1.6-0.tgz(r-4.6-arm64)geosphere_1.6-0.tgz(r-4.5-x86_64)geosphere_1.6-0.tgz(r-4.5-arm64)
geosphere_1.6-0.tar.gz(r-4.6-arm64)geosphere_1.6-0.tar.gz(r-4.6-x86_64)geosphere_1.6-0.tar.gz(r-4.5-arm64)geosphere_1.6-0.tar.gz(r-4.5-x86_64)
geosphere_1.6-0.tgz(r-4.5-emscripten)
geosphere.pdf |geosphere.html
geosphere/json (API)

# Install 'geosphere' in R:
install.packages('geosphere', repos = c('https://rspatial.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/rspatial/geosphere/issues

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:
  • merc - World countries
  • wrld - World countries

On CRAN:

Conda:

cpp

13.99 score 41 stars 127 packages 8.3k scripts 30k downloads 112 mentions 46 exports 1 dependencies

Last updated from:29413b5c34. Checks:13 OK. Indexed: yes.

TargetResultTotal timeArtifact
linux-devel-arm64OK132
linux-devel-x86_64OK129
source / vignettesOK250
linux-release-arm64OK121
linux-release-x86_64OK134
macos-devel-arm64OK90
macos-devel-x86_64OK212
macos-release-arm64OK93
macos-release-x86_64OK215
windows-develOK161
windows-releaseOK163
windows-oldrelOK168
wasm-releaseOK119

Exports:alongTrackDistanceantipodalantipodeareaPolygonbearingbearingRhumbcentroiddaylengthdestPointdestPointRhumbdist2gcdist2LinedistCosinedistGeodistHaversinedistmdistMeeusdistRhumbdistVincentyEllipsoiddistVincentySpherefinalBearinggcIntermediategcIntersectgcIntersectBearinggcLatgcLongcMaxLatgeodesicgeodesic_inversegeomeangreatCirclegreatCircleBearinghorizonlengthLinemakeLinemakePolymercatormidPointonGreatCircleOSGBperimeterplotArrowsrandomCoordinatesrefEllipsoidsregularCoordinatesspan

Dependencies:Rcpp

Introduction to the geosphere package

Rendered fromgeosphere.Rnwusingutils::Sweaveon Feb 21 2026.

Last update: 2026-02-20
Started: 2018-08-20

Readme and manuals

Help Manual

Help pageTopics
Geospheregeosphere-package geosphere
Along Track DistancealongTrackDistance
Antipodesantipodal antipode
Area of a longitude/latitude polygonareaPolygon areaPolygon,data.frame-method areaPolygon,matrix-method areaPolygon,sf-method areaPolygon,SpatialPolygons-method areaPolygon,SpatVector-method
Direction of travelbearing
Rhumbline directionbearingRhumb
Centroid of spherical polygonscentroid centroid,data.frame-method centroid,matrix-method centroid,SpatialPolygons-method
Daylengthdaylength
Destination given bearing (direction) and distancedestPoint
Destination along a rhumb linedestPointRhumb
Cross Track Distancedist2gc
Distance between points and lines or the border of polygons.dist2Line
'Law of cosines' great circle distancedistCosine
Distance on an ellipsoid (the geodesic)distGeo
'Haversine' great circle distancedistHaversine
Distance matrixdistm
'Meeus' great circle distancedistMeeus
Distance along a rhumb linedistRhumb
'Vincenty' (ellipsoid) great circle distancedistVincentyEllipsoid
'Vincenty' (sphere) great circle distancedistVincentySphere
Final directionfinalBearing
Intersections of two great circlesgcIntersect
Intersections of two great circlesgcIntersectBearing
Latitude on a Great CirclegcLat
Longitude on a Great CirclegcLon
Highest latitude on a great circlegcMaxLat
geodesic and inverse geodesic problemgeodesic geodesic_inverse
Mean location of sperhical coordinatesgeomean
Great circlegreatCircle
Great circlegreatCircleBearing
Distance to the horizonhorizon
Intermediate points on a great circle (sphere)gcIntermediate
Length of lineslengthLine
Add vertices to a polygon or linemakeLine makePoly
Mercator projectionmercator
Mid-pointmidPoint
Is a point on a given great circle?onGreatCircle
Ordnance Survey for Great Britain grid reference systemOSGB
Compute the perimeter of a longitude/latitude polygonperimeter perimeter,data.frame-method perimeter,matrix-method perimeter,SpatialLines-method perimeter,SpatialPolygons-method
PlotplotArrows
Random or regularly distributed coordinates on the globerandomCoordinates regularCoordinates
Reference ellipsoidsrefEllipsoids
Span of polygonsspan span,matrix-method span,sf-method span,SpatialPolygons-method span,SpatVector-method
World countriesmerc wrld

  • Image