geo

Points on the Earth, as plain functions

geo gives the distance, the bearing, the area that holds a place, the box and the geohash. It has no dependencies on a map library. Move the place, turn the globe, or draw an area.

pnpm add @mark1russell7/geo

What the package has

Distance and bearing
distanceKm initialBearing destinationKm centralAngleRadians
Places and areas
locatePoint distanceToGeometryKm polygonsIntersect polygonIntersectsBBox
Boxes
bboxOfPoints bboxOfGeoJson bboxContains bboxIntersects bboxCenter
Geohash
geohash decodeGeohash geohashNeighbors geohashesInBBox
GeoJSON
parseGeoJson parseGeometry rewind ringWinding
Maps of regions
simplifyRegions regionSimplifier

Each edge of a polygon is a straight line in longitude and latitude, as RFC 7946 tells. Releases shows each version, and Status shows the open work.