Skip to content

Generate raster pixel resolutions that are snapped to mercator tile resolutions.

Notifications You must be signed in to change notification settings

mapbox/colonel-mercator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@mapbox/colonel-mercator

Build StatusCoverage Status

Gets raster pixel resolutions, and optionally snaps them to mapnik-omnivore tiling thresholds. Also, generates "metatile" zooms - the tile sizes at which a given input resolution would be over a size threshold based on an "upzoom" (the resolution of zoom levels "up")

image

Install

npm install colonel-mercator
npm link

Usage - resolution

colonel-mercator resolution <raster> --maxres <float> --snap

Arguments

<raster> [path]: an input tiff to get the resolution of

Options

--maxres [float]: the floor at which to set resolution; if maxres > the file's resolution, returns maxres. [DEFAULT=NONE] --snap [flag]: snap to mercator tiling thresholds [BETA] [DEFAULT=FALSE]

Usage - metatile

colonel-mercator metatile <resolution> --zoombreaks '[<int>, <int>, ...]' --upzoom <int>

Arguments

<resolution> [float]: the resolution to evaluate

Options

--zoombreaks [array of ints]: the metatile sizes to create [DEFAULT=[13, 10, 7, 4]]

--upzoom [int]: the number of zoom levels up at which to derive threshold from zoombreaks

About

Generate raster pixel resolutions that are snapped to mercator tile resolutions.

Topics

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •