Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cardboard

Package Overview
Dependencies
Maintainers
24
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cardboard

A library for storing and searching geographic features

  • 0.9.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
20
decreased by-39.39%
Maintainers
24
Weekly downloads
 
Created
Source

cardboard

build status

Cardboard provides the query, indexing, and storage logic for GeoJSON feature storage with CRUD on DynamoDB and S3.

install

npm install cardboard
# or globally
npm install -g cardboard

api

var c = Cardboard({
    accessKeyId: config.awsKey,
    secretAccessKey: config.awsSecret,
    sessionToken: config.sessionToken,
    table: config.DynamoDBTable,
    endpoint: 'http://localhost:4567',
    bucket: 'test',
    prefix: 'test'
});

accessKeyId, secretAccessKey, and sessionToken are optional. See Configuring the SDK in Node.js for more configuration options.

Initialize a new cardboard database connector given a config object that is sent to dyno.

c.createTable(tableName, callback);

Create a cardboard table with the specified name.

c.insert(primarykey: string, feature: object, layer: string, callback: fn);

Insert a single feature, indexing it with a primary key in a given layer.

// query a bbox, callback-return array of geojson
c.bboxQuery(bbox: array, layer: string, callback: fn);
// delete a feature
c.del(primarykey: string, layer: string, callback: fn);
c.dump(); // -> stream
c.export(); // -> stream
// get information about a dataset (feature count, size, extent)
c.getDatasetInfo(dataset: string, callback: fn);

Approach

This project aims to create a simple, fast geospatial index as a layer on top of DynamoDB. This means that the index will not be built into the database or contained in a single R-Tree - it will be baked into the indexes by which data is stored.

While the whole index in kept in DynamoDB, the larger geometries are stored on S3.

Support target:

Keywords

FAQs

Package last updated on 07 Nov 2014

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc