geojson-stats

0.0.2 • Public • Published

geojson-stats

Calculate statistics of GeoJSON data.

usage

as a command line tool:

npm install -g geojson-stats
geojson-stats file.geojson

as a library:

npm install geojson-stats

var stats = require('geojson-stats');
console.log(stats(geojson));

API

function( geojson, properties )

  • geojson: GeoJSON data. Can be a FeatureCollection, Feature or Geometry object.
  • properties: optional. An array of property names for which stats should be gathered (in addition to line lengths and polygon areas).

The result is an array of objects containing the stats for each requested variable.

Lengths and areas are approximate calculations and given in SI units.

Package Sidebar

Install

npm i geojson-stats

Weekly Downloads

1

Version

0.0.2

License

MIT

Last publish

Collaborators

  • tyr_asd