nqm-geojson-tools.js
Nqm-GeoJSON-Tools is a JavaScript module for working with geojson data of NquiringMinds Ltd.
Installation
Install node.js, then:
npm install nqm-geojson-tools
usage
var geoDataInOut = ; .......................................... // get the geojson points in a geojson polygon/multipolygon, also return the points out of this polygonvar pointsInOut = geoDataInOut;var pointsIn = pointsInOut0;var pointsOut = pointsInOut1; .......................................... // get the geojson points in a circle, also return the points out of this circlevar pointsInOut = geoDataInOut; // radius--kmvar pointsIn = pointsInOut0;var pointsOut = pointsInOut1; .......................................... // get the distance between two geojson pointsvar distance = geoDataInOut; // km .......................................... // get boundary box of a geojson object or an array with geojson objectsvar bbox = geoDataInOut;.......................................... // get the centre of a geojson object or an array with geojson objects, based on the boundary boxvar centre = geoDataInOut; .......................................... // save json data to outPathgeoDataInOut;