Use this file to discover Exa products, pricing, evaluations, comparisons, use cases, agent interfaces, and technical documentation before exploring further.
JavaScript geospatial libraries measure, transform, and analyze geographic coordinates and shapes. A coordinate system defines how each longitude and latitude maps to a position on the Earth or on a flat map. These libraries calculate the distances, delivery zones, map projections, and boundary checks in mapping and location apps.
Popularity
d3-geo has the most monthly downloads in this comparison, at 205.4M.
export function fromProjectionDefinition(def) {
const proj4 = registered;
if (!proj4) {
throw new Error('Proj4 must be registered first with register(proj4)');
}
// Fallback code is the whole def... let code = JSON.stringify(def);
proj4.defs(code, def);
const proj4Def = proj4.defs(code);
if (proj4Def.title) {
// ...but use authority:code if available proj4.defs(code, /** @type {?} */ (null));
code = proj4Def.title;
const projection = getCachedProjection(code);
if (projection) {
return projection;
}
proj4.defs(code, def);
}
register(proj4);
const projection = getCachedProjection(code);
if (!projection) {
throw new Error('Projection not found after registration');
}
return projection;
}
cheap-ruler
Approximates common geographic measurements.
Downloads / mo
9.1M
Stars
434
Last release
4.1.1
License
ISC
Strengths
Precise at city scale.Under 500 km and away from the poles, results stay within 0.1% of Vincenty's formulae.
Limitations
Reuse one ruler per area.Create a ruler once for an area and reuse it across calculations.
Turf fits analysis of GeoJSON features, such as distances and point-in-polygon tests. Proj4js converts coordinates between coordinate systems, and d3-geo projects geographic shapes onto a flat map.
GeoJSON is a JSON format for geographic features such as points, lines, and polygons, each with its coordinates and properties. Turf and JSTS read GeoJSON directly.
Geolib calculates distances, bearings, and boundary checks from plain coordinate pairs. It works in two dimensions and ignores altitude.
h3-js is the pure JavaScript version of Uber's hexagon-based geographic grid system. Its latLngToCell function turns a latitude and longitude into a hexagon index at a chosen resolution.
Proj4js transforms point coordinates from one coordinate system to another, including datum transformations. It expects longitude before latitude unless enforceAxis is set.
TopoJSON stores geographic shapes with shared borders as arcs. TopoJSON Client converts TopoJSON back to GeoJSON for rendering with tools such as d3-geo.
For coding agents
Found your geospatial library? Help your agent use it.
Connect Exa so your coding agent can find the library’s documentation, check its API, and look up implementations while you build.