Giter VIP home page Giter VIP logo

sharedstreets-pbf's Introduction

SharedStreets PBF Parser

npm version Build Status

Reads SharedStreets Protobuf buffers.

Install

In Node.js

$ npm install sharedstreets-pbf

CommonJS

const sharedstreetsPbf = require('sharedstreets-pbf');

Typescript

import * as sharedstreetsPbf from 'sharedstreets-pbf';

In Browser

For a full list of web examples, check out SharedStreets examples.

How to build

sharedstreets-pbf uses submodules, make sure to include --recursive when cloning the repo.

$ git clone --recursive [email protected]:sharedstreets/sharedstreets-pbf.git
$ cd sharedstreets-pbf
$ yarn
$ npm run build
$ npm test

API

Table of Contents

geometry

Geometry Pbf

Parser for SharedStreets Geometry Pbf Buffers

Parameters

Examples

const buffer = fs.readFileSync('z-x-y.geometry.pbf')

const geoms = sharedstreetsPbf.geometry(buffer)
geoms[0].id // => '81f666c5e1e4de0f7df4fbd793d909b2'

Returns Array<SharedStreetsGeometry> An Array of SharedStreet Geometry

intersection

Intersection Pbf

Parser for SharedStreets Intersection Pbf Buffers

Parameters

Examples

const buffer = fs.readFileSync('z-x-y.intersection.pbf')

const intersections = sharedstreetsPbf.intersection(buffer)
intersections[0].id // => '8037a9444353cd7dd3f58d9a436f2537'

Returns Array<SharedStreetsIntersection> An Array of SharedStreet Intersections

reference

Reference Pbf

Parser for SharedStreets Reference Pbf Buffers

Parameters

Examples

const buffer = fs.readFileSync('z-x-y.reference.pbf')

const references = sharedstreetsPbf.reference(buffer)
references[0].id // => '41d73e28819470745fa1f93dc46d82a9'

Returns Array<SharedStreetsReferencePbf> An Array of SharedStreet References

metadata

Metadata Pbf

Parser for SharedStreets Metadata Pbf Buffers

Parameters

Examples

const buffer = fs.readFileSync('z-x-y.metadata.pbf')

const metadatas = sharedstreetsPbf.metadata(buffer)
metadatas[0].geometryID // => '81f666c5e1e4de0f7df4fbd793d909b2'

Returns Array<SharedStreetsMetadata> An Array of SharedStreet Metadatas

sharedstreets-pbf's People

Contributors

deniscarriere avatar kpwebb avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.