Our great sponsors
-
proj4js
JavaScript library to transform coordinates from one coordinate system to another, including datum transformations
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
For intersection, I guess you're interested in the area right ? If so you can try this : get the intersection using https://turfjs.org/docs/#intersect. Get the centroid of the result using https://turfjs.org/docs/#centroid . Get the UTM Zone of the centroid using : https://apollomapping.com/blog/gtm-finding-a-utm-zone-number-easily . Reproject the intersection polygon to that UTM Zone for maximum precision using https://github.com/proj4js/proj4js and calculate the area.
you're welcome. See also directly https://github.com/springmeyer/arc.js/ for creating the great circles (it's the lib used in turf.js)