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

cross-street-indexer

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cross-street-indexer

Cross Street Indexer

  • 0.1.0
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Cross Street Indexer

Build Status npm version MIT licensed

Light weigth reverse geocoding for cross street 100% sourced from OSM QA Tiles.

image

Process

  • Step 1: Filter data from QA-Tiles (lib/qa-tiles-filter.js)
  • Step 2: Extract road intersections from QA-Tiles (lib/intersections.js)
  • Step 3: Normalize street name ABBOT AVE. => abbot avenue (lib/normalize.js)
  • Step 4: Convert intersections into multiple points using a combination of road & ref tags (lib/geocoding-pairs).
  • Step 5: Group all hashes into single Quadkey JSON object (lib/reducer.js)
  • Step 6: Publish to S3 or LevelDB

Features

  • Easy to use CLI
  • Node 6 & 7 compatible
  • Only uses Tile Reduce + Turf
  • Bundled 5MB QA-Tiles for testing purposes

Quickstart (in development)

$ npm install
$ npm test

CLI

$ cross-street-indexer --help

  Cross Street Indexer

  Usage:
    $ cross-street-indexer <qa-tiles>
  Options:
    --output    [cross-street-index] Filepath to store outputs
    --bbox      Excludes QATiles by BBox
    --tiles     Excludes QATiles by an Array of Tiles
    --debug     [false] Enables DEBUG mode
    --verbose   [false] Verbose output
  Examples:
    $ cross-street-indexer latest.planet.mbtiles cross-street-index/

OSM Attributes

  • name: Street name (Abbot Avenue)
  • ref Reference number normaly used to tag highways numbers
  • highway classification (residential, primary, secondary)
  • bridge yes/no
  • tunnel yes/no
  • @id OSM ID of street (way)

Normalization

Normalization should follow the following standards:

  • Drop any period if exists
    • ave. => avenue
  • Street suffix to full name
    • ave => avenue
    • CIR => circle
    • ln => lane
  • Name should be entirely lowercase
    • Parkside Avenue => parkside avenue
  • Direction to full word
    • N => north
    • S => south
    • NE => northeast

Debugging

Adding --verbose will stdout a JSON object for each QA-Tile with the following information:

{
  tile: [ 655, 1586, 12 ],
  quadkey: '023010221131',
  features: 9626,
  intersects: 1053
}

Adding --debug will store .geojson items for each process & for each QA-Tile:

  • debug/<quadkey>/features.geojson - raw GeoJSON of QA-Tile
  • debug/<quadkey>/lines.geojson - Filtered (Multi)LinesString from QA-Tile
  • debug/<quadkey>/intersects.geojson - Point which are intersecting roads

Limitations

Loops

Loops would return multiple cross street matches, only the last matched point is stored.

Turning Circles

Turning Circles without any names are exclude, thus not finding any matches.

image

References

  • Review/complete osmify to parse random address into an OSM friendly schema.
  • Use JWT as hash?
  • Natural Node to create hash
  • Carmen to normalize roads
  • LevelDB as storage
  • S3 Bucket Upload to hashes
  • Exact OSM match
  • Fuzzy OSM match
  • Use Map & Set

FAQs

Package last updated on 20 May 2017

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