New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

shapes-bufferer

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

shapes-bufferer

Helper classes to add a buffer to a GeoJSON or BBox

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
271
188.3%
Maintainers
1
Weekly downloads
 
Created
Source

shapes-bufferer

Apply a distance buffer to a GeoJSON, BBox, or geohash

Installation

Using npm npm i shapes-bufferer

Using yarn yarn add shapes-bufferer

Usage

In CommonJS env

const { bufferFeature } = require('shapes-bufferer');

const geojson = {
  type: 'Feature',
  geometry: {
    type: 'Polygon',
    coordinates: [
      [
        [-3.687352, 40.440563],
        [-3.674112, 40.445444],
        [-3.66824, 40.434788],
        [-3.686987, 40.429722],
        [-3.687352, 40.440563],
      ],
    ],
  },
};

// Apply a 1km buffer around the GeoJSON
const buffered = bufferFeature(geojson, 1);

Using imports

import { bufferBBox } from 'shapes-bufferer';

bufferBBox([-3.707651, 40.423234, -3.679004, 40.437593], 1);

Documentation

See DOCS

Keywords

shape

FAQs

Package last updated on 03 Jun 2022

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