npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

geojson-reducer

v1.0.3

Published

GeoJson Reducer simplifies the coordinates of GeoJson data, in order to reduce the file/object size.

Readme

geojson-reducer

Foo

geojson-reducer is a node package that simplifies a Polygon or MultiPolyon feature within a GeoJson object.

This package helps ease the load time of geospatial web applications that are displaying complex Polygons. These Polygons may have thousands of coordinates, many of which may not be critical to achieve the basic shape of the Polygon. Perhaps the Polygons load slowly, or perhaps a file being requested is simply too large.

geojson-reducer takes a simple approach, by ejecting coordinates that it considers non-essential to the shape of the Polygon. The result is that the data set is reduced - by up to 50% if possible - while providing an identical experience to the end user of the application or data.

Installation


To install via npm, use the following command.

npm i -g geojson-reducer

Usage


Command line

A common use case for this package is the simply reduce the size of a large file. This can be done with the following command:

$ geojson-reducer ./filename.geojson

This command will result in a smaller file with the name filename-sm.geojson to be placed in your current directory.

Optional arugments
$ geojson-reducer ./filename.geojson -d specific-file-name.json

Give your new file a specific name with the -d destination flag.

$ geojson-reducer ./filename.geojson -v

Use the -v flag for a verbose printout of all the coordinates being removed from the Polygon.

Imported

Use this package in Node like so:

let geojsonReducer = require('geojson-reducer')

let reducedGeoJson = geojsonReducer.reduceCoordinates(originalGeoJson)

See it in action