Cross Street Indexer
![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)
Light weigth reverse geocoding for cross street 100% sourced from OSM QA Tiles.
![image](https://cloud.githubusercontent.com/assets/550895/26235719/a8f8e7da-3c21-11e7-9240-c811f9b6a4aa.png)
Features
- Blazing fast 1/20th of a millisecond search (275,000 ops/sec)
- Processed United States OSM QA Tiles in 35m 13s (189714 tiles)
- Easy to use CLI to build index
- Node 6 & 7 compatible
- Only uses Tile Reduce + Turf
- Ready for S3 Upload or LevelDB
- Bundled 5MB QA-Tiles for testing purposes
Process
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 numbershighway
classification (residential, primary, secondary)bridge
yes/notunnel
yes/no@id
OSM ID of street (way)
Normalization
Normalization should follow the following standards:
- Drop any period if exists
- 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-Tiledebug/<quadkey>/lines.geojson
- Filtered (Multi)LinesString from QA-Tiledebug/<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](https://cloud.githubusercontent.com/assets/550895/26234213/d26554b4-3c17-11e7-8f89-bee790f7118c.png)
References