tile-index
[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)
Last updated 4 years ago by anandthakker .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install tile-index 
SYNC missed versions from official npm registry.

js-standard-style

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

  • feature Feature A geojson feature
  • options object
    • options.minzoom number
    • options.maxzoom number
    • options.buffer number
    • options.format string 'coordinates', 'quadkey', or 'geojson'

Current Tags

  • 1.1.1                                ...           latest (4 years ago)

3 Versions

  • 1.1.1                                ...           4 years ago
  • 1.1.0                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (6)
Dev Dependencies (7)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |