Git Product home page Git Product logo

tile-index's Introduction

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'

tile-index's People

Contributors

anandthakker 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.