1.0.0 • Published 9 years ago

node-geojson-grid v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

GeoGrid

Used to create a grid on the provided GeoJSON. The module can be used ad a CLI or as a module.

Install

To install and use it as module

npm install node-geojson-grid -g

as CLI

node-grid -h
node-grid -v
node-grid -p 5000 milan.geo.json grid.geo.json

as Module

var grid = require( 'node-geojson-grid' );
var pointsGrid = grid.createPointsGrid( points, geoJson, options );
var distanceGrid = grid.createDistanceGrid( mpp, geoJson, options );

API

Possible options are:

  • interleaved: The grid rows will be interleaved

.createDistanceGrid( mpp, area, options )

Creates a grid on the provided area, each point will be offsetted by mpp meters.

.createPointsGrid( points, area, options )

Creates a grid on the provided area with about points.

.json( config )

Creates a multilevel grid. The config objects is as follows:

[
    {
        // One of those two properties
        mpp: 300, // Meters offset per Point
        points: 3000, // Total number of points
        
        options: {}, // Options
        
        area: GeoJSON // Valid GeoJSON
    },
    ...
]
1.0.0

9 years ago

0.3.1

9 years ago

0.3.0

9 years ago

0.2.0

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago