Gridded (Tiler) and Polygonal (Featurizer) Common Usage Guide
- Domain Portfolio: Weather Imagery
- Domain: Common
- API Name: Data Visualization - Common Usage Guide
Standard HTTP Cache-Control headers are used to define caching length. The TTL value is provided in the HTTP Header as an absolute time value using the “Expires” parameter. Example: “Expires: Fri, 12 Jul 2013 12:00:00 GMT”.
Overview
The ‘Tiler’, and ‘Featurizer’ products support data visualization and analytics.
Using the Tiler and Featurizer products require a multi-step workflow to retrieve the necessary data for the specific product data request. Steps 2a, and 2b are dependent on which type you are requesting (i.e. Tiler Data or Featurizer Tile. Both step 2a, and step 2b require the ‘t’ parameter values as input into the ‘t’ parameter for the subsequent request (v2/tiler/data, and v2/featurizer/tile).
|
Conceptual Visualization Gridded Data from Tiler |
Conceptual Visualization Vector Data from Featurizer Area with values ≥ 2.0 |
URL Construction
Step 1: Get Tiler Info |
|
The [v2/tiler/info?] request response provides the ‘t’ parameter value required as input for the subsequent [v2/tiler/data?] request as well as a subsequent [v2/featurizer/tile?] request. If the product is an ‘Observation/Current Condition’ type then it will return a ‘t’ parameter value; if the product is a ‘Forecast’ type then it will return both a ‘t’ parameter value and ‘rt’ parameter value.
The meta=true additional information helps to provide available lod, x, and y parameters to use in subsequent requests. |
https://api.weather.com/v2/tiler/info?products=17:VAR00198FROM25501heightaboveground&meta=true&apiKey=yourApiKey |
Step 2a: Get Tiler Data |
Tiler Data - Observations: Required Parameters: products, t, lod, x, y, apiKey=yourApiKey https://api.weather.com/v2/tiler/data?products=<productNumber>:<variableID>&t=<t>&lod=<lod>&x=<x>&y=<y>&apiKey=yourApiKey |
https://api.weather.com/v2/tiler/data?products=17:VAR00198FROM25501heightaboveground&t=1474300200000&lod=1&x=0&y=0&apiKey=yourApiKey |
Tiler Data - Forecast: Required Parameters: products, rt, t, lod, x, y, apiKey=yourApiKey https://api.weather.com/v2/tiler/data?products=<productNumber>:<variableID>&rt=<rt>&t=<t>&lod=<lod>&x=<x>&y=<y>&apiKey=yourApiKey |
https://api.weather.com/v2/tiler/data?products=49:Temperatureheightaboveground&rt=1474375500000&t=1474400700000&lod=1&x=0&y=0&apiKey=yourApiKey |
Step 2b: Get Featurizer Tile |
Featurizer Tile - Observations: Required Parameters: product, t, lod, x, y, apiKey=yourApiKey || Optional Parameters: threshold https://api.weather.com/v2/featurizer/tile?product=<productNumber>:<variableID>&t=<t>&lod=<lod>&x=<x>&y=<y>&apiKey=yourApiKey |
https://api.weather.com/v2/featurizer/tile?product=17:VAR00198FROM25501heightaboveground&t=1474300200000&lod=4&x=2&y=4&threshold=280&apiKey=yourApiKey |
Featurizer Feature (Native Resolution) - Observations: Required Parameters: product, t, apiKey=yourApiKey || Optional Parameters: threshold https://api.weather.com/v2/featurizer/feature?product=<productNumber>:<variableID>&t=<t>&apiKey=yourApiKey |
https://api.weather.com/v2/featurizer/feature?product=17:VAR00198FROM25501heightaboveground&t=1474300200000&threshold=280&apiKey=yourApiKey |
Featurizer Tile - Forecast: Required Parameters: product, rt, t, lod, x, y, apiKey=yourApiKey || Optional Parameters: threshold https://api.weather.com/v2/featurizer/tile?product=<productNumber>:<variableID>&rt=<rt>&t=<t>&lod=<lod>&x=<x>&y=<y>&apiKey=yourApiKey |
https://api.weather.com/v2/featurizer/tile?product=49:Temperatureheightaboveground&rt=1474375500000&t=1474400700000&lod=1&x=0&y=0&threshold=280&apiKey=yourApiKey |
Featurizer Feature (Native Resolution) - Forecast: Required Parameters: product, rt, t, apiKey=yourApiKey || Optional Parameters: threshold https://api.weather.com/v2/featurizer/feature?product=<productNumber>:<variableID>&rt=<rt>&t=<t>&apiKey=yourApiKey |
https://api.weather.com/v2/featurizer/feature?product=49:Temperatureheightaboveground&rt=1474375500000&t=1474400700000&threshold=280&apiKey=yourApiKey |
Using Tiler Info & Parameters
The Tiler Info API is used to retrieve current details about one or more products. By calling the v2/tiler/info API with the optional parameter ‘meta=true’, the details about each requested product’s native projection and valid Web Mercator tiles are delivered in the response.
-
NOTE: All API requests for this endpoint are required to include the following header, prompting the system to compress the response: “Accept-Encoding: gzip”.
-
The ‘products’ parameter can accept up to fifteen (15) comma-delimited values:
-
Example: products=1:Precipitationtypesurface,6:VAR01515FROM25011surface,19,20
-
Sample: https://api.weather.com/v2/tiler/info?products=1:Precipitationtypesurface,6:VAR01515FROM25011surface,19,20&apiKey=yourApiKey
-
-
To retrieve the details on exactly one type of data from a product number, include the product number and the variable ID separated by a colon:
-
Example: products=300:tdprob
-
Sample: https://api.weather.com/v2/tiler/info?products=300:tdprob&apiKey=yourApiKey
-
-
To retrieve the details on all data associated with a product number, include this number while omitting any variable IDs:
-
Example: products=300
-
Sample:
https://api.weather.com/v2/tiler/info?products=300&apiKey=yourApiKey
-
Using Tiler Data & Parameters
The Tiler Data API retrieves tiles of meteorological data from one or more products.
-
NOTE: All API requests for this endpoint are required to include the following header, prompting the system to compress the response: “Accept-Encoding: gzip”.
-
products: the ‘products’ parameter for this endpoint must include both the product number and the variable ID, separated by a colon:
-
Example: products=300:PrecipIntensity
-
Sample: https://api.weather.com/v2/tiler/data?products=300:PrecipIntensity&t=1451606400000&lod=4&x=4&y=6&apiKey=yourApiKey
-
-
dimension: the dimensions vary by API product, and valid dimensions can be found by calling /tiler/info
-
lod, x, y: the combination of these tile parameters must correspond to a tile within the product’s tileset, found by calling /tiler/info?meta=true
-
For the product’s native resolution, set lod to -1, and for the Web Mercator projection, use any valid lod value where lod ≥ 0
Using Tiler Byte & Parameters
The Tiler Byte API retrieves a byteset object that contains information regarding the values contained in each tile at all levels of detail for a single time value. Data includes minimum value and maximum value for the tile and whether there are empty cells (NaN values) in the tile.
-
NOTE: All API requests for this endpoint are required to include the following header, prompting the system to compress the response: “Accept-Encoding: gzip”.
-
products: the ‘products’ parameter for this endpoint must include both the product number and the variable ID, separated by a colon:
-
Example: products=300:PrecipIntensity
-
Sample: https://api.weather.com/v2/tiler/byte?products=300:PrecipIntensity&t=1451606400000&raw=false&apiKey=yourApiKey
-
-
dimension: the dimensions vary by API product, and valid dimensions can be found by calling /tiler/info
-
If raw is true, then the native layer byteset is returned. If raw is not given or is false, then the Web Mercator byteset for the pyramid is returned.
The entire pyramid (all LODs) of the tiles is returned concatenated in ascending raster-order (i.e. info for lod=0,x=0,y=0 (0,0,0) followed by lod=1,x=0,y=0 (1,0,0), (1,0,1), (1,1,0), (1,1,1), (2,0,0) and so on. Each tile is described by a record of up to 3 floating point values. If the first 4 bytes make up a floating point value of not-a-number, then the record is only 4 bytes long and the tile has no data. Calling Tiler API for such tiles should result in a 400 response. If the first 4 bytes do not make up a not-a-number value, then the record is 9 bytes long and should be decoded as follows.
-
The first 4 bytes make up the floating point value for the minimum value in the tile.
-
The second 4 bytes make up a floating point value that is the maximum value in the tile.
-
The last byte is a boolean that describes if any cells in the tile are empty, that is, the cell value is not-a-number.
Using Tiler Coverage & Parameters
The Tiler Coverage API retrieves a bitset object that contains a single bit for each tile at all levels of detail for a single time value. This bit flag denotes whether the given tile exists at that LOD and x, y.
-
NOTE: All API requests for this endpoint are required to include the following header, prompting the system to compress the response: “Accept-Encoding: gzip”.
-
products: the ‘products’ parameter for this endpoint must include both the product number and the variable ID, separated by a colon:
-
Example: products=300:PrecipIntensity
-
Sample: https://api.weather.com/v2/tiler/coverage?products=300:PrecipIntensity&t=1451606400000&apiKey=yourApiKey
-
-
dimension: the dimensions vary by API product, and valid dimensions can be found by calling /tiler/info
-
If raw is true, then the native layer bitset is returned. If raw is not given or is false, then the Web Mercator bitset for the pyramid is returned. Note that coverage data is typically not produced for the native layer. The API allows such requests, but a response will often be an error.
The entire pyramid (all LODs) of the tiles is returned concatenated in ascending raster-order (i.e. info for lod=0,x=0,y=0 (0,0,0) followed by lod=1,x=0,y=0 (1,0,0), (1,0,1), (1,1,0), (1,1,1), (2,0,0) and so on. Each tile is described by a single bit packed in reverse order into bytes.
Using Tiler Extras Data & Parameters
The Tiler Extras Data API returns the same data as the /tiler/data call discussed above except that it allows the user to choose to receive data only over the oceans or only over land. This API may also be used to provide interpolated tile data at LODs otherwise not supported for a given product. See “Geographic Coverage” for more information on LODs available.
-
NOTE: All API requests for this endpoint are required to include the following header, prompting the system to compress the response: “Accept-Encoding: gzip”.
-
products: the ‘products’ parameter for this endpoint must include both the product number and the variable ID, separated by a colon:
-
Example: products=300:PrecipIntensity
-
Sample:
https://api.weather.com/v2/tiler/extras/data?products=300:PrecipIntensity&stencil=true&interpolation=bicubic&t=1451606400000&lod=4&x=4&y=6&apiKey=yourApiKey
-
-
dimension: the dimensions vary by API product, and valid dimensions can be found by calling /tiler/info
-
lod, x, y: the combination of these tile parameters must correspond to a tile within the product’s tileset, found by calling /tiler/info?meta=true
-
Optional Parameters: stencil, interpolation
-
This API should only be used for the Web Mercator projection, i.e. lod value ≥ 0
Using Featurizer Tile & Parameters
The Featurizer Tile API retrieves a polygon or line tracing a particular threshold for a product’s data, for a single tile in Web Mercator projection.
-
NOTE: All API requests for the first endpoint are required to include the following header, prompting the system to compress the response: “Accept-Encoding: gzip”.
-
product: the ‘product’ parameter must include both the product number and the variable ID, separated by a colon:
-
Example: product=300:PrecipIntensity
-
Sample: https://api.weather.com/v2/featurizer/tile?product=300:PrecipIntensity&t=1451606400000&lod=4&x=4&y=6&apiKey=yourApiKey
-
-
<dimensions>: dimensions vary by API product, and valid dimensions can be found by calling /tiler/info
-
lod, x, y: the combination of these tile parameters must correspond to a tile within the product’s tileset, found by calling /tiler/info?meta=true
-
The lod parameter must indicate the Web Mercator projection, where lod ≥ 0
-
To request the product’s native resolution, use the featurizer/feature endpoints
-
-
Optional Parameters: operation, threshold, replacement, geometryType, crs, bbox
The API returns a geographic feature, namely a polygon or line as defined by the geometryType parameter. The API examines each pixel in the requested tile against the operation and threshold values, and the resulting feature corresponds to the area where the comparison evaluates to “true.”
The type of the response depends on the specific endpoint that is called, as documented below.
REQUIRED: All API responses must be compressed. The kmz, XZipped shp, and
mvt file formats are compressed by definition; API requests for JSON objects, GeoJSON objects, and
arrays of primitive data types must include the following HTTP header:
“Accept-Encoding: gzip
".
Endpoint | Response | MIME Content-Type |
---|---|---|
/tile | GeoJSON | application/json (gzipped) |
/tile:kmz | .kmz | application/vnd.google-earth.kmz |
/tile:shp | XZipped .shp | application/x-zipped-shp |
/tile:mvt | .mvt | application/x-vector-tile |
Using Featurizer Feature & Parameters
The Featurizer Feature API retrieves a polygon or line tracing a particular threshold for a product’s data, for all data in the product’s native projection.
-
products: for this endpoint, this parameter must include both the product number and the variable ID, separated by a colon:
-
Example: products=300:PrecipIntensity
-
Sample: https://api.weather.com/v2/featurizer/feature?product=300:PrecipIntensity&t=1451606400000&apiKey=yourApiKey
-
-
<dimensions>: dimensions vary by API product, and valid dimensions can be found by calling /tiler/info
-
Optional Parameters: operation, threshold, replacement, geometryType, crs, bbox
The API returns a geographic feature, namely a polygon or line as defined by the geometryType parameter. The API examines each pixel in the product’s native projection against the operation and threshold values, and the resulting feature corresponds to the area where the comparison evaluates to “true.”
The type of the response depends on the specific endpoint that is called, as documented below.
REQUIRED: All API responses must be compressed. The .kmz, XZipped.shp,
and .mvt file formats are compressed by definition; API requests for JSON objects, GeoJSON objects,
and arrays of primitive data types must include the following HTTP header:
“Accept-Encoding: gzip
".
Endpoint | Response | MIME Content-Type |
---|---|---|
/feature | GeoJSON | application/json (gzipped) |
/feature:kmz | .kmz | application/vnd.google-earth.kmz |
/feature:shp | XZipped .shp | application/x-zipped-shp |
Using Featurizer Isoband & Parameters
The Featurizer Isoband API retrieves polygons containing all data between a lower and upper threshold, for all data in the product’s native projection.
-
NOTE: All API requests for the first endpoint are required to include the following header, prompting the system to compress the response: “Accept-Encoding: gzip”.
-
product: the ‘product’ parameter must include both the product number and the variable ID, separated by a colon:
-
Example: product=6:VAR01515FROM25011surface
-
Sample: https://api.weather.com/v2/featurizer/isoband?product=6:VAR01515FROM25011surface&threshold=35.0:40.0&t=1451606400000&apiKey=yourApiKey
-
-
<dimensions>: dimensions vary by API product, and valid dimensions can be found by calling /tiler/info
-
threshold: this should be two floating point values for lower and upper bounds, separated by a colon, e.g. threshold=35.0:40.0
-
Optional Parameters: replacement, crs, bbox, format
-
Unsupported parameters: lod, x, y
Query Parameter Elements & Definitions
Parameter Name | Description | Is Required | Sample |
---|---|---|---|
apiKey | Client's API Key | Required | apiKey=yourApiKey |
lod |
Level of Detail (LOD), also known as the zoom level. The metadata found by calling /tiler/info provides more details about the valid ranges of lod, x, and y for a particular product.
The single image tile at lod=0 encompasses the entire globe in Web Mercator projection, and each subsequent LOD doubles:
|
Required | lod=4 |
rt | "Run time" Timestamp, in milliseconds - Required parameter for 'Forecast' type products. | Required | rt=1451649600000 |
t | Timestamp, in milliseconds | Required | t=1451649600000 |
x | Horizontal tile position | Required | x=4 |
y | Vertical tile position | Required | y=6 |
Tiler APIs - Parameters Unique To Tiler | |||
Parameter Name | Description | Is Required | Sample |
products | Products (plural) used in the tiler APIs. Specific API products, where each is typically referenced with a colon-separated Product Number and Variable ID | Required | products=303:tdprob |
meta |
Request to display metadata, for /tiler/info The metadata found by calling /tiler/info provides more details about the valid ranges of lod, x, and y for a particular product. For example, a geographically limited product may further restrict the valid ranges for x and y to include only those tiles that cover the product’s region. |
Optional | meta=true |
Featurizer APIs - Parameters Unique To Featurizer | |||
Parameter Name | Description | Is Required | Sample |
product | Product (singular) Specific API product requested in the featurizer APIs | Required | product=303:tdprob |
bbox |
Comma-delimited string of decimal pair of x-y coordinates, restricting the area subject to analysis by Featurizer. These coordinates set the lower-left (southwest) and upper-right (northeast) corners of the rectangular bounding box that Featurizer will examine, and its values must be (long,lat,long,lat), with the lower-left corner defined first. NOTE that the order of the coordinates is (x,y) -- longitude, latitude -- which is consistent with the GeoJSON convention. |
Optional | bbox=-129.4,21.37,-64.56,50.35 |
crs |
Type of coordinate reference system used to define the projection of the GeoJSON geometry object returned by Featurizer Default Value: EPSG:4326 Accepted Values: Any EPSG code, such as EPSG:4326 or EPSG:3857 The default crs value of EPSG:4326 corresponds to WGS 84, a standard established in 1984 as part of the the World Geodetic System developed by the US Department of Defense. Information on EPSG codes can be found at http://spatialreference.org/. |
Optional | crs=EPSG:4326 |
geometryType |
Type of GeoJSON object to be returned by Featurizer. Default Value: linestring Accepted Values: linestring, polygon The GeoJSON polygon object is guaranteed to be a closed object, but the linestring object may be open. If the user is in doubt about which geometryType to use, we recommend explicitly using the polygon type, geometryType=polygon. Information on the GeoJSON format can be found at http://geojson.org |
Optional | geometryType=polygon |
operation |
Mathematical operator used with threshold to determine which data points are included within the Featurizer line or polygon. Default Value: greaterThan Accepted Values: lessThan, lessThanOrEqual, greaterThan, greaterThanOrEqual For example, if data records current temperatures in degrees Fahrenheit, the user can retrieve a linestring or polygon containing freezing temperatures by submitting an operation value of “lessThanOrEqual” and a threshold value of 32.0. |
Optional | operation=lessThanOrEqual |
replacement |
Value to be used with Featurizer, when a pixel has no data. Default Value: 0.0 Carefully chosen with the operation and threshold parameters in mind, the replacement parameter can cause missing data to be included within or excluded from the polygon or linestring returned by Featurizer. For example, if data records current temperatures in degrees Fahrenheit, and if the user retrieves a polygon or linestring containing freezing temperatures, the user can exclude missing data by setting a replacement value of 40.0 or any other value above the freezing mark. |
Optional | replacement=40.0 |
threshold |
Value used with operation to determine which data points are included within the Featurizer linestring or polygon. Default Value: 25.0 Float value used with the operation value to determine which data points are included within the polygon or linestring returned by Featurizer. The threshold’s units are determined by the product being evaluated. For the /featurizer/isoband call, this parameter should be two floating point values, separated by a colon, to determine the lower and upper bounds of the values to include in the generated polygon(s), respectively. |
Optional |
threshold=32.0 For Isoband: threshold=25.0:32.0 |
stencil (extras/data only) |
Accepted Values: true, false, or compliment. Default Value: false If true then the oceans will be removed. If false, no stenciling is done (same as /tiler/data). If compliment, then the land will be removed. |
Optional | stencil=true |
interpolation (extras/data only) |
Which interpolation algorithm to use when providing data at higher LODs than available in a product’s /tiler/info data. Default Value: bicubic Accepted Values:
|
Optional | interpolation=bicubic |
format (isoband only) |
Return a response in this format. This may be json for GeoJSON, kml for KML, kmz for a zipped KML, shp for a Shapefile or mvt for a Mapbox Vector Tile. Default Value: json |
Optional | format=shp |
Examples Using Select Parameters for Featurizer
For sample request: https://api.weather.com/v2/featurizer/tile?product=34:VAR0191200FROM25501heightaboveground&t=1451606400000&lod=4&x=4&y=6
&operation=greaterThanOrEqual&threshold=6.0&replacement=3.0&geometryType=polygon&apiKey=yourApiKey
Goal for Geometry Object Returned by Featurizer | Value for operation | Value for threshold | Value for replacement |
---|---|---|---|
Product data: temperature in degrees Fahrenheit | |||
Goal area with temperatures strictly below freezing, excluding missing data | lessThan | 32.0 | 32.0 or higher (ex. 40.0) |
Goal area with triple-digit temperatures, including missing data | greaterThanOrEqual | 100.0 | 100.0 or higher (ex.101.0) |
Product data: UV index measuring ultraviolet (UV) exposure, where 0-2 is Low, 3-5 is Moderate, 6-7 is High, 8-10 is Very High, and 11 is Extreme | |||
Goal area with UV index of “High” or greater, excluding missing data | greaterThan | 5.0 | 5.0 or lower (ex. 3.0) |
Alternate approach: Goal area with UV index of “High” or greater, excluding missing data |
greaterThanOrEqual | 6.0 | 5.0 or lower (ex. 3.0) |
Data Elements & Definitions
Note: The table below does not necessarily represent the sort order of the API response.
Field Name | Description | Type | Range | Sample |
---|---|---|---|---|
Tiler Info: v2/tiler/info | ||||
<productNumber> | Object containing a child element for one or more variable ID's associated with the product number | object | 303: { tdprob: { }, mhrprob: { }, ... } | |
<variableID> | Object containing details on the data that can be retrieved from a given product | object | tdprob: { dimensions: [ ], meta: { } } | |
dimensions | Array of unnamed JSON objects, one for each set of current dimensions for the product number and variable ID, typically timestamps. The dimensions include the ‘t’ and ‘rt’ parameter values for the products requested in the ‘tiler/info’ request. | [ object ] | dimensions: [ {rt: [ ], t: [ ]}, {rt: [ ], t: [ ]}, ... ] | |
t | Array of timestamps, in milliseconds, where each is generally the start time for the period covered by the product's data | [epoch] | rt: ["1471824000000"] | |
rt | Array of "run time" timestamp, in milliseconds, where each is generally when a forecast was generated | [epoch] | t: ["1473120000000", "1473033600000", ... ] | |
meta | Object containing metadata for the given product number and variable ID | object | meta: { data-href, data-aggregate-href, ... } | |
data-href | URL for the /tiler/data API call | string | Request API URL | data-href: "https://api.weather.com/v2/tiler/data?products=303:tdprob&rt={rt}&t={t}&lod={lod}&x={x}&y={y}&apiKey={apiKey}" |
data-aggregate-href | URL for the /tiler/data-aggregate API call | string | Request API URL | data-aggregate-href: "https://api.weather.com/v2/tiler/data-aggregate?products=303:tdprob&rt={rt}&t={t}&lod={lod}&x={x}&y={y}&apiKey={apiKey}" |
cover-href | URL for the /tiler/coverage API call | string | Request API URL | cover-href: "https://api.weather.com/v2/tiler/coverage?products=303:tdprob&rt={rt}&t={t}&apiKey={apiKey}" |
label | Variable ID | string | Any valid variable ID | label: "tdprob" |
missingValue | Placeholder, equivalent to NaN (Not a Number) and useful for working with tiler/coverage | string | missingValue: "v=-34||v=-35" | |
attributes | Object containing various metadata values, typically from the ingest source | object | attributes: {Grib2_Level_Type, Grib2_Parameter, .... } | |
dimensions | Dimensions for the data associated with the product number and variable ID | [string] | dimensions: ["rt", "t", "geox", "geoy"] | |
dimension | Details for the entries listed in the dimensions array | object | dimension: { rt: {}, t: {}, geox: {}, geoy: {} } | |
<dimension> | Details for a single dimension | object | rt: {id, primary, type, unit} | |
id | Dimension ID: t for the timestamp of the observation or forecast, rt for the forecast run time, geox for the x-axis location, geoy for the y-axis location, elevation for the geographic height (elsewhere known as the z-axis location), ensemble for the runtime iteration | string | t, rt, geox, geoy, elevation, ensemble | id: "rt" |
primary | Indicator for the outermost dimension | boolean | true, false | primary: true |
type | Dimension's data type | string | type: "long" | |
unit | Dimension's unit of measurement | string | unit: "time in epoch" | |
tilesets | List of tilesets for the data associated with the product number and variable ID | [string] | Native, Web Mercator | tilesets: ["Native", "Web Mercator"] |
tileset | Details for the entries listed in the tilesets array | object | tileset: { Native: {}, Web Mercator: {} } | |
<tileset> | Details for a single tileset | object | Native: { name, crs, ... } | |
name | Tileset ID, matching an element in the tilesets array and tileset object | string | Native, Web Mercator | name: "Web Mercator" |
crs | Coordinate Reference System, such as “EPSG:3857” for Web Mercator | string | Any EPSG code or Well Known Text (WKT) | crs: "EPSG:4326" |
envelope | Bounding box defining the region covered by the tileset | object | envelope: { minX, minY, maxX, maxY} | |
minX | Longitude value for the envelope bounding box: degrees or some other measure, depending on the crs value | decimal | minX: "-100.0" | |
minY | Latitude value for the envelope bounding box: degrees or some other measure, depending on the crs value | decimal | minY: "0.0" | |
maxX | Longitude value for the envelope bounding box: degrees or some other measure, depending on the crs value | decimal | maxX: "-5.0" | |
maxY | Latitude value for the envelope bounding box: degrees or some other measure, depending on the crs value | decimal | maxY: "50.0" | |
pixel | Object defining the dimensions, in pixels, for the data covered by the tileset | object | pixel: { w: 8192, h: 4096 } | |
tile | Object defining the dimensions, in pixels, for a single data tile produced by the tile set | object | tile: { w: 256, h: 256 } | |
w | Width for the pixel object or tile object | integer | >0 | w: 8192 |
h | Height for the pixel object or tile object | integer | >0 | h: 4096 |
tiles | Array of unnamed JSON objects defining the valid set of data tiles at each lod level of detail, for each tileset | [ object ] | tiles: [ {x, y, width, height, lod}, ... ] | |
x | Zero-based horizontal location of the first tile at a particular lod value, starting at the far left (west) | integer | >=0 | x: 0 |
y | Zero-based vertical location of the first tile at a particular lod value, starting at the top (north) | integer | >=0 | y: 1 |
width | Number of tiles across the horizontal length of the data set at a particular lod value | integer | >0 | width: 2 |
height | Number of tiles down the vertical length of the data set at a particular lod value | integer | >0 | height: 1 |
lod |
Level of detail, where -1 indicates the Native Resolution, and 0 and above indicates Web Mercator, where each subsequent LOD value doubles a) the zoom, b) the range of possible x values, and c) the range of possible y values. These ranges are defined below. For any lod value z, where z ≥ 0, 0 ≤ x ≤ (2^z)-1, and 0 ≤ y ≤ (2^z)-1 |
integer | -1 to 9 | lod: 2 |
ttl | Time to live; the minimum length of time that the data will be available in the system, from its publication to its expected roll-off in seconds | integer | >0 | ttl: 7200 |
updateFrequency | Frequency in which new data will be provided in seconds | integer | >0 | updateFrequency: 900 |
Appendix: Tiler Info meta=true
By calling the v2/tiler/info API with the optional parameter ‘meta=true’, the details about each requested products native projection and valid Web Mercator tiles are delivered in the response.
Example | Section | Notes | |||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
tilesets:[ "Native", "Web Mercator" ], tileset:{ Native:{ name:"Native", crs:"EPSG:4326", envelope:{ minX:"-39.3695068359375", minY:"0.005500791594386101", maxX:"50.6195068359375", maxY:"89.99449920654297" }, pixel:{ w:8192, h:8192 }, tile:{ w:256, h:256 }, tiles:[ { x:0, y:0, width:32, height:32, lod:-1 } ] }, Web Mercator:{ name:"Web Mercator", crs:"EPSG:3857", tile:{ w:256, h:256 }, tiles:[ { x:0, y:0, width:1, height:1, lod:0 }, { x:0, y:0, width:2, height:1, lod:1 }, { x:1, y:0, width:2, height:2, lod:2 }, { x:3, y:0, width:3, height:4, lod:3 }, { x:6, y:0, width:5, height:8, lod:4 }, { x:12, y:0, width:9, height:16, lod:5 }, { x:25, y:0, width:16, height:32, lod:6 }, { x:50, y:0, width:32, height:64, lod:7 } ] } }, |
tilesets | This section has two tilesets, one for each projection, “Native” and “Web Mercator.” | |||||||||||||||||||||||||||||||||||
tileset.Native |
The native projection for this particular incoming data was given in the World Geodetic System developed by the US Department of Defense (officially identified as EPSG:4326, as indicated in the crs field). The data was limited to an envelope in the Northern Hemisphere, encompassing the prime meridian:
(More details about the approximate coverage of Global Radar Tile 2 can be found in Appendix B.) |
||||||||||||||||||||||||||||||||||||
tileset.Native.pixel |
The original data was given in a grid of pixels, 8192 pixels on each side, and each pixel contains a single point of data. Not all native-resolution grids will be squares, with the same height and width. |
||||||||||||||||||||||||||||||||||||
tileset.Native.tile | The original data was split into tiles, each tile containing the standard 256x256 pixels. | ||||||||||||||||||||||||||||||||||||
tileset.Native.tiles |
The original data was divided into tiles of 256x256 pixels, and these tiles were mapped onto a grid, 32 tiles on each side. The grid is assigned a level of detail indicating that the grid is in the native resolution, lod=-1.
As with the original grid, the native-resolution tiles will not always form a square, with the same height and width. The original data will not always fit exactly into a whole number of 256x256 pixels, so there can be tiles with partial data. For example, consider this separate set of Native details from the following API call.
pixel:{ w:3000, h:2008 }, tile:{ w:256, h:256 }, tiles:[ { x:0, y:0, width:12, height:8, lod:-1 } ] The original grid of 3000x2008 pixels is split in tiles of 256x256 pixels, for a grid of 12x8 tiles.
|
||||||||||||||||||||||||||||||||||||
tileset.Web Mercator |
Taking the standard approach for all products provided through Tiler and Featurizer, the system converts the incoming data from its native projection to the Web Mercator projection (officially identified as EPSG:3857, as indicated in the crs field). Even when the data is limited to a smaller area -- as is the case here -- the tile scheme for this projection encompases almost the entire globe, limited only by the fact that Web Mercator projects both poles at infinity.
Because the Web Mercator tiles are consistent, the envelope information is neither needed nor explicitly provided. The pixel information is also omitted for the Web Mercator projection, but it can be calculated for each lod level of detail. |
||||||||||||||||||||||||||||||||||||
tileset.Web Mercator.tile | For each lod value, the data is split into tiles, each tile containing the standard 256x256 pixels. | ||||||||||||||||||||||||||||||||||||
tileset.Web Mercator.tiles |
The system converts the data from its native projection into the Web Mercator projection at one or more lod value, and the set of valid tiles is defined for each level of detail. For each lod value, the set of valid tiles will contain the envelope of data from the native projection. A valid tile may contain partial data -- and a tile may not always contain data for every timestamp -- but all data will be limited to valid tiles. For each level of detail, the possible x and y coordinates range between 0 and 2z-1, where z = lod.
The following table summarizes this particular product’s valid tile locations at each lod value for the Web Mercator projection.
|
Appendix: Geographical Coverage
Data Tiles - Native Resolution, and Web Mercator Projection:
Each product used by Tiler and Featurizer uses data that was originally received in a native projection and then converted into the Web Mercator projection. Users can typically retrieve data and in either projection. There are more details on the lod parameter and the related parameters x and y in the section on API String Parameters, each projection and each level of detail value is summarized in the table below.
-
The /tiler/data endpoint, the query string parameters lod, x, and y are used to retrieve individual tiles in both projections.
-
The /featurizer/tile endpoints, the query string parameters lod, x, and y are used to retrieve geographic features for individual tiles only in the Web Mercator projection.
-
The /featurizer/feature set of endpoints produce geographic features for all data in the native projection, without partitioning the data into tiles.
lod Level of Detail |
Tile Size (pixels) |
Length (tiles) = 2z, where z = lod and z ≥ 0 |
Width (tiles) = 2z, where z = lod and z ≥ 0 |
Total Number of Tiles = Length x Width |
Total Number of Pixels = Total Number of Tiles x Tile Size |
Approximate Ground Resolution at the Equator |
---|---|---|---|---|---|---|
Native projection: amount of data and resolution varies with each product | ||||||
-1 | 256 x 256 | varies | varies | varies | varies | varies |
Web Mercator projection: number of lod values depends on the resolution for the Native projection | ||||||
0 | 256 x 256 | 1 | 1 | 1 | 65,536 | 160 km / pixel |
1 | 256 x 256 | 2 | 2 | 4 | 262,144 | 80 km / pixel |
2 | 256 x 256 | 4 | 4 | 16 | 1,048,576 | 40 km / pixel |
3 | 256 x 256 | 8 | 8 | 64 | 4,194,304 | 20 km / pixel |
4 | 256 x 256 | 16 | 16 | 256 | 16,777,216 | 10 km / pixel |
5 | 256 x 256 | 32 | 32 | 1,024 | 67,108,864 | 5 km / pixel |
6 | 256 x 256 | 64 | 64 | 4,096 | 268,435,456 | 2 km / pixel |
7 | 256 x 256 | 128 | 128 | 16,384 | 1,073,741,824 | 1 km / pixel |
8 | 256 x 256 | 256 | 256 | 65,536 | 4,294,967,296 | 0.5 km / pixel |
9 | 256 x 256 | 512 | 512 | 262,144 | 17,179,869,184 | 0.25 km / pixel |
Appendix: Global Radar Tiles
For some sets of radar products, data is partitioned into Global Radar Tiles, where eight adjacent tiles of roughly equal size provide combined coverage for the entire globe. Two of these tiles span the International Date Line, so the data for each of these tiles is partitioned into two products to eliminate any possible ambiguity about the data’s time and date. The following table summarizes the approximate coverage for the Global Radar Tiles, including the split tiles that span the International Date Line. Ranges run west to east and north to south.
TILE 4 WEST | TILE 1 | TILE 2 | TILE 3 | TILE 4 EAST |
---|---|---|---|---|
Alaska, North Pacific Ocean 180° to 130°W 90°N to 0° |
North America, Caribbean 130°W to 40°W 90°N to 0° |
Europe, Middle East, North Africa 40°W to 50°E 90°N to 0° |
India, China, Central Asia 50°E to 140°E 90°N to 0° |
E. Russia, E. Japan, N. Pacific Ocean 140°E to 180° 90°N to 0° |
TILE 8 WEST | TILE 5 | TILE 6 | TILE 7 | TILE 8 EAST |
Cook Islands, South Pacific Ocean 180° to 130°W 0° to 90°S |
South America 130°W to 40°W 0° to 90°S |
Southern Africa 40°W to 50°E 0° to 90°S |
Western Australia, Indian Ocean 50°E to 140°E 0° to 90°S |
Eastern Australia, South Pacific Ocean 140°E to 180° 0° to 90°S |
Appendix: Global Satellite Tiles
For some sets of satellite products, data is provided in Global Satellite Tiles, where ten adjacent tiles of various sizes provide coverage for the entire globe between 67°N to 67°S. The following table summarizes the approximate coverage for the Global Satellite Tiles, including the split tiles that span the International Date Line. Ranges run west to east and north to south.
TILE 1 | TILE 2 | TILE 3 | TILE 4 | TILE 5 |
---|---|---|---|---|
North America West (Alaska) 180° to 125°W 67°N to 13°N |
North America East (CONUS) 125°W to 39°W 67°N to 13°N |
Europe 39°W to 60°E 67°N to 13°N |
Asia West 60°E to 100°E 67°N to 0° |
Asia East 100°E to 180° 67°N to 0° |
TILE 6 | TILE 7 | TILE 8 | TILE 9 | TILE 10 |
Southern Pacific 180° to 120°W 13°N to 66°S |
South America 120°W to 20°W 13°N to 66°S |
Africa 20°W to 60°E 13°N to 66°S |
Indian Ocean (“Western Australia”) 60°E to 100°E 0° to 66°S |
Australia (“Eastern Australia”) 100°E to 180° 0° to 66°S |
Appendix: Aggregation
This endpoint returns up to four aggregated tiles. Subsequent tiles are requested by appending comma separated arguments to query arguments. The number of comma separated arguments to each query argument must be equal or the request is invalid. The aggregate tile response is composed of one flag float value optionally followed by a 256x256 float length tile. If the flag float value is 0x00000000 then no tile exists for the combination of comma separated arguments given, and therefore no tile data follows the flag. If the value of negative infinity is given, then a tile follows the flag.
-
For example, /tiler/data-aggregate?products={pn1:vid1},{pn2:vid2},{pn:vid3},{pn4:vid4}&t={t1},{t2},{t3},{t4}&lod={lod1},{lod2},{lod3},{lod4}&x={x1},{x2},{x3},{x4}&y={y1},{y2},{y3},{y4}
-
Here, pn is the product number, vid is the variable ID, and t is the “t” (time) dimension; lod, x, and y are the tile coordinates
-
-
Because the order is mandatory, the user should only aggregate products that use the same dimensions.
-
The user could aggregate observation products that all use just the t dimension.
-
The user could aggregate forecast products that all use t and rt dimensions.
-
The user should not aggregate a combination of the two types of products.
-
Examples
Adjacent tiles for the same product:
-
https://api.weather.com/v2/tiler/data-aggregate?products=300:PrecipIntensity,300:PrecipIntensity&t=1451606400000,1451606400000&lod=4,4&x=3,4&y=6,6&apiKey=yourApiKey
Identical tiles for different products:
-
https://api.weather.com/v2/tiler/data-aggregate?products=77:GOESNA1kmVSIRTOAV2,78:GOESNA4kmIR108TOAV2&t=1451606400000,1451606400000&lod=4,4&x=4,4&y=6,6&apiKey=yourApiKey
Response
The API returns a binary file with the MIME Content-Type “application/octet-stream”,
compressed in response to the following mandatory header in the request:
“Accept-Encoding: gzip
”.
-
The response is a gzipped float array, where there are 4 bytes per float in BIG_ENDIAN order.
-
The results within the response will be ordered to match the comma-delimited list in the request’s parameters.
For each requested tile, the API returns one of the following.
Condition | Response | Notes |
---|---|---|
The requested tile is available |
Boundary marker, followed by data
|
The value of -Infinity is equivalent to the value returned by Float.intBitsToFloat(0xff800000). Data is sequenced in rows, left to right (west to east), beginning with the top (northmost) row. Since each tile is defined to contain 256 x 256 pixels, and each pixel corresponds to a 4-byte float, the data for each tile will contain 262,144 bytes. |
The requested tile is NOT available |
Boundary marker, without data
No other data is returned for the requested tile |
If this response is for the last requested tile, the data stream will end with this “Failure” boundary marker. Otherwise, the next 4-byte float will be the “Success” or “Failure” boundary marker for the next requested tile. |
Examples
-
Two tiles requested, both tiles are successfully returned: 524,296 bytes in the response
-
Tile 1: 4-byte float of -Infinity followed by 262,144 bytes of data
-
Tile 2: 4-byte float of -Infinity followed by 262,144 bytes of data
-
-
Two tiles requested, first tile is missing: 262,152 bytes in the response
-
Tile 1: 4-byte float with the value 0x00000000
-
Tile 2: 4-byte float of -Infinity followed by 262,144 bytes of data
-
-
Two tiles requested, both tiles are missing: 8 bytes in the response
-
Tile 1: 4-byte float with the value 0x00000000
-
Tile 2: 4-byte float with the value 0x00000000
-
Document Revision History
Revision | Date | Notes |
1.0 | Dec 7, 2018 | Initial versioned document; addition of Document Revision History |
2.0 | Jun 7, 2022 | Added information for /tiler/byte, /tiler/coverage, /tiler/extras/data, and /featurizer/isoband endpoints |