@planet/tessellator

0.3.1 • Public • Published

Tessellator

This is a module that, given a GeoJSON feature and a description of a set of dimensions will return an integer value representing a bitfield describing where the feature resides in the defined K-dimensional space.

Usage

npm install @planet/tessellator

const format =  {
  maxZoom: 13,  //Max zoom at which tiles will be built.
  dimensions: [ // Dimensions by which data can be filtered
    {
      name: 'acquired',
      path: 'acquired', //Field in the feature's `properties` object
      descr: 'Acquisition date',
      type: 'date', // Type of key
      range: ['2013/01/01', null], // Range of values
      granularity: 86400000 * 7, // Granularity of values
      primary: true //Primary dimension (one only) can be queried upon
    },
    {
      name: 'Item Type',
      path: 'item_type',
      descr: 'Item Type',
      type: 'list',
      values: ['REScene', 'PSScene3Band', 'PSScene4Band']
    },
    {
      name: 'Cloud Cover',
      path: 'cloud_cover',
      descr: 'Calculated Cloud Cover',
      type: 'numericRange',
      range: [0, 1],
      granularity: 0.25
    }
  ]
}

const tessellate = require('@planet/tessellator')(format);

let featureKey = tessellate(feature);

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.3.1
    0
    • latest

Version History

Package Sidebar

Install

npm i @planet/tessellator

Weekly Downloads

0

Version

0.3.1

License

ISC

Last publish

Collaborators

  • planetmilesm
  • bcvazquez
  • planet-admin
  • tschaub
  • planeto
  • primajin
  • theduckylittle