geosphere: Spherical Trigonometry

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

Install the latest version of this package by entering the following in R:
AuthorRobert J. Hijmans [cre, aut], Ed Williams [ctb], Chris Vennes [ctb]
Date of publication2016-06-15 12:26:37
MaintainerRobert J. Hijmans <>
LicenseGPL (>= 3)

View on CRAN

Man pages

alongTrackDistance: Along Track Distance

antipode: Antipodes

area: Area of a longitude/latitude polygon

bearing: Direction of travel

bearingRhumb: Rhumbline direction

centroid: Centroid of spherical polygons

data: World countries

daylength: Daylength

destPoint: Destination given bearing (direction) and distance

destPointRhumb: Destination along a rhumb line

dist2gc: Cross Track Distance

dist2line: Distance between points and lines or the border of polygons.

distCosine: 'Law of cosines' great circle distance

distGeo: Distance on an ellipsoid (the geodesic)

distHaversine: 'Haversine' great circle distance

distm: Distance matrix

distMeeus: 'Meeus' great circle distance

distRhumb: Distance along a rhumb line

distVincentyEllipsoid: 'Vincenty' (ellipsoid) great circle distance

distVincentySphere: 'Vincenty' (sphere) great circle distance

finalDirection: Final direction

gcIntersect: Intersections of two great circles

gcIntersectBearing: Intersections of two great circles

gcLat: Latitude on a Great Circle

gcLon: Longitude on a Great Circle

gcMaxLat: Highest latitude on a great circle

geodesic: geodesic and inverse geodesic problem

geomean: Mean location of sperhical coordinates

geosphere-package: Geosphere

greatCircle: Great circle

greatCircleBearing: Great circle

horizon: Distance to the horizon

intermediate: Intermediate points on a great circle (sphere)

makepoly: Add vertices to a polygon or line

mercator: Mercator projection

midPoint: Mid-point

onGreatCircle: Is a point on a given great circle?

perimeter: Compute the perimeter of a longitude/latitude polygon

plotArrows: Plot

randomCoordinates: Random or regularly distributed coordinates on the globe

refEllipsoids: Reference ellipsoids

span: Span of polygons


alongTrackDistance Man page
antipodal Man page
antipode Man page
areaPolygon Man page
areaPolygon,data.frame-method Man page
areaPolygon,matrix-method Man page
areaPolygon,SpatialPolygons-method Man page
bearing Man page
bearingRhumb Man page
centroid Man page
centroid,data.frame-method Man page
centroid,matrix-method Man page
centroid,SpatialPolygons-method Man page
daylength Man page
destPoint Man page
destPointRhumb Man page
dist2gc Man page
dist2Line Man page
distCosine Man page
distGeo Man page
distHaversine Man page
distm Man page
distMeeus Man page
distRhumb Man page
distVincentyEllipsoid Man page
distVincentySphere Man page
finalBearing Man page
gcIntermediate Man page
gcIntersect Man page
gcIntersectBearing Man page
gcLat Man page
gcLon Man page
gcMaxLat Man page
geodesic Man page
geodesic_inverse Man page
geomean Man page
geosphere Man page
geosphere-package Man page
greatCircle Man page
greatCircleBearing Man page
horizon Man page
makeLine Man page
makePoly Man page
merc Man page
mercator Man page
midPoint Man page
onGreatCircle Man page
perimeter Man page
perimeter,data.frame-method Man page
perimeter,matrix-method Man page
perimeter,SpatialLines-method Man page
perimeter,SpatialPolygons-method Man page
plotArrows Man page
randomCoordinates Man page
refEllipsoids Man page
regularCoordinates Man page
span Man page
span,matrix-method Man page
span,SpatialPolygons-method Man page
wrld Man page


R/dist2Line.R R/destPointRhumb.R R/greatCircleBearing.R R/distm.R R/bearingRhumb.R R/plotPoly.R R/pointsToMatrix.R R/distMeeus.R R/destPoint.R R/onGreatCircle.R R/alongTrack.R R/gcMaxLat.R R/horizon.R R/gcIntersectBearing.R R/gcLat.R R/distGeo.R R/distVincentySphere.R R/daylength.R R/antipodal.R R/gcIntersect.R R/greatCircle.R R/gcLon.R R/regularCoordinates.R R/distRhumb.R R/randomCoordinates.R R/geodesic.R R/dist2gc.R R/bearing.R R/old_destPoint.R R/midPoint.R R/gcIntermediate.R R/centroid.R R/distHaversine.R R/helper.R R/geomean.R R/makePoly.R R/distVincentyEllipsoid.R R/span.R R/perimeter.R R/areaPolygon.R R/geomedian.R R/distCosines.R R/refEllipsoids.R R/finalBearing.R R/mercator.R
man/destPoint.Rd man/onGreatCircle.Rd man/plotArrows.Rd man/geomean.Rd man/makepoly.Rd man/greatCircleBearing.Rd man/alongTrackDistance.Rd man/span.Rd man/dist2line.Rd man/gcIntersectBearing.Rd man/geodesic.Rd man/distHaversine.Rd man/gcMaxLat.Rd man/distMeeus.Rd man/bearing.Rd man/midPoint.Rd man/distVincentySphere.Rd man/randomCoordinates.Rd man/distGeo.Rd man/finalDirection.Rd man/perimeter.Rd man/geosphere-package.Rd man/dist2gc.Rd man/greatCircle.Rd man/mercator.Rd man/intermediate.Rd man/data.Rd man/bearingRhumb.Rd man/distVincentyEllipsoid.Rd man/horizon.Rd man/distm.Rd man/daylength.Rd man/gcIntersect.Rd man/gcLon.Rd man/distRhumb.Rd man/gcLat.Rd man/destPointRhumb.Rd man/antipode.Rd man/centroid.Rd man/distCosine.Rd man/refEllipsoids.Rd man/area.Rd
Spark Online Training by Edureka

Questions? Problems? Suggestions? or email at

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.