tile-index
v1.1.1
Published
[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)
Downloads
4
Readme
Index set of GeoJSON features by the z/x/y tiles that contain them.
CLI Usage
cat my-geojson.geojson | tile-index -Z MINZOOM -z MAXZOOM -i ID_PROPERTY -f FORMAT > tile-index.json
FORMAT
can be 'indexed' (default), 'coordinates', 'geojson', 'quadkey'.
Example output:
{
"02":[0,1,2,3],
"15":[3,4],
"72":[],
"01":[5,6,7,8],
"05":[5],
"04":[9,10],
"06":[],
"08":[11,12,10,13],
"09":[14],
"tiles":{"0":[5,13,16],"1":[5,12,17],"2":[5,13,17],"3":[5,14,17],"4":[5,15,17],"5":[5,16,16],"6":[5,17,16],"7":[5,16,17],"8":[5,17,17],"9":[5,13,16],"10":[5,14,16],"11":[5,14,15],"12":[5,15,15],"13":[5,15,16],"14":[5,18,15]}
}
("02", "15", etc. are the feature 'id property' values, specified using the -i
option)
API
tileIndex
Returns the tile coordinates for tiles that contain the given feature.
Parameters