Find a projection for easy cartesian calculations, given a GeoJSON in WGS84.
Problem: you have geographic data in WGS84 of limited extent, but arbitrary location, and you need to work with the data in a cartesian system (use euclidean distance, etc.)
Solution: feed your data to
local-proj, and it will hand you a suitable projection
independent of geographic location
npm install --save local-proj
var localProj = ;var geojson = ...var projection = localProj;var cartesian = projection;
To reproject your GeoJSON to the projection, you might want to look at reproject.
Finds a local projection that is suitable for projecting the
geojson to cartesian
The returned projection is a proj4 projection object (
you can use to create transforms to and from other projections.
Note that the local coordinate system will only work as expected for datasets up to a couple of hundred kilometers in size.
Currently, the returned projection will always be a transverse mercator projection.