Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

geojson-stats

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

geojson-stats

Calculates some stats for GeoJSON input.

latest
Source
npmnpm
Version
0.0.2
Version published
Weekly downloads
5
150%
Maintainers
1
Weekly downloads
 
Created
Source

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.

Keywords

geojson

FAQs

Package last updated on 19 Mar 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts