Note: This feature uses the Common Metadata Repository (CMR) and does not work for data sets stored elsewhere.
Each layer in Worldview can be mapped to a data product in the CMR. In the layer configuration, use the product attribute and provide the identifier for the downloadable product.
Each product is defined in the products section, keyed by identifier:
{
"products": {
"MYD04_L2": {
"name": "MODIS/Aqua Aerosol 5-Min L2 Swath 10km",
"handler": "AquaSwathMultiDay",
"query": {
"shortName": "MYD04_L2"
},
"nrt": {
"by": "value",
"field": "data_center",
"value": "LANCEMODIS"
},
"urs": {
"by": "value",
"field": "data_center",
"value": "LANCEMODIS"
}
}
}
}
Each product is assigned a handler that filters and processes the results from the CMR. The following handlers are available:
AquaSwathMultiDay
: Use for Aqua 5-minute data granules where today, yesterday, and tomorrow appear together on the same map.CollectionList
: Does not display any information on the map and presents a list. Use this for collections that do not have granules and only have a collection level entry.CollectionMix
: Handles layers which only have collection-level metadata and have different collections based on the selected date. Uses "science" and "nrt" query flags to distinguish between "old" and "new" collections, respectively.DailyAMSRE
: Displays a single entry for a daily AMSR-E product. Since the metadata is too exact, this omits granules that happen to contain a small fraction of the day.DailyGranuleList
: Similar toList
but also obtains granules three hours from yesterday and tomorrow. This handler is only used for MODIS Combined Value Added AOD and granules appear to be in six hour chunks. It isn't apparent why this handler was necessary.HalfOrbit
: Handles large granules that are broken up into an ascending and descending component.List
: Displays all granules for the given day listed in a dialog box and not displayed on the map.MODISGrid
: Maps MODIS H and V tiles to the sinusoidal grid.MODISMix
: Handles layers where near-real time data is blocked into five minute granules and where processed data is blocked into H and V sinusoidal grid tiles.MODISSwath
: Use for 5-minute data granules where only today is shown on the map.TerraSwathMultiDay
: Use for Terra 5-minute data granules where today, yesterday, and tomorrow appear together on the same map.WELDGranuleFootprints
: Use for the WELD product.
The query
configuration specifies the parameters sent in the CMR query.
The available options are:
shortName
: Short name used to identify this product. If more than one short name is required, for example,AIRIBRAD
andAIRIBRAD_NRT
, a list can be provided.dataCenterId
: Deprecated. Data center that provides this product. If more than one data center is required, for example,NSIDC_ECS
andLANCEMODIS
, a list can be provided. This parameter was used to speed up queries but now has the opposite effect and can break certain queries.dayNightFlag
: The value of the day/night flag, usually eitherDAY
orNIGHT
. Note that a granule that is both day and night is set toBOTH
which isn't currently handled. Some products may populate this field withUNSPECIFIED
collection
: Set totrue
when using theCollectionList
handler for when no granules exist.
If two queries need to be executed to obtain NRT and non-NRT products when
using the MODISMix
handler, the query is specified in the following manner:
"query": {
"science": {
"shortName": "MYD09GA",
"dataCenterId": "LPDAAC_ECS"
},
"nrt": {
"shortName": "MYD09",
"dataCenterId": "LANCEMODIS"
}
}
Each handler has a series of processors that change or filter each result. The result processors and configurations are as follows:
If a granule splits the anti-meridian, this processor creates two polygons,
one on each side of the map. The constructor takes a maxDistance
argument
that specifies a distance, in degrees. If a line segment in the polygon is
greater than maxDistance
, it's assumed to be crossing the anti-meridian.
If multiple granules exist for a given acquisition time, this attempts to
group the granule as either near-real time or science quality. The granule
should already be tagged for NRT before using this processor. One of the
granules will be marked as preferred as indicated by the prefer
variable
in the data download model. Use PreferredFilter
to select only one of these.
If multiple granules exist for a given acquisition time, this attempts to
group the granule by its version string. Use VersionFilter
to select
only one of these.
Uses the acquisition times to create connector lines to show the swath
ground track. Swaths are normally connected when the start time of one
granule matches the end time of another granule. If this is not the
case, use the delta
parameter to specify, in seconds, how much time should
be added to the start time to match the end time of another granule. For
VIIRS, this is -60.
Creates a label for this granule based on its acquisition date and time.
Not used at the moment.
For polygons that cross the anti-meridian, normalize and create a mutli-polygon with a polygon on each side. Uses code provided by the Earthdata Search client.
Excludes granules that do not intersect the extent
provided in the
constructor.
Converts a CMR geometry to an OpenLayers 3 geometry.
Creates a polygon footprint given a MODIS H and V tile number.
Creates a index value by combining the MODIS H and V tile numbers.
Creates a label for this granule based on the MODIS H and V tile numbers.
Filters out granules that are not available for download.
Filter by ascending or descending orbit. Configure with orbit
with the
following parameters:
type
: Alwaysregex_group
field
: The field to inspect to find the orbitregex
: The regular expression to match against, should have one group.match
: Keep the granule if it matches this value.
Example:
"orbit": {
"type": "regex_group",
"field": "producer_granule_id",
"regex": ".*([AD])\\.hdf$",
"match": "A"
}
Only keeps near-real time granules if the prefer
value passed in is nrt
,
otherwise keeps science-quality granules if science
.
Sets the label of the granule to the name
provided in the constructor.
Sets a scale value for the granule selection buttons. Useful for making the buttons smaller for dense datasets. For example, WELD uses a value of 0.35.
Forces the results to display in a dialog box list instead of on the map.
Mark granules as near-real time depending on the following nrt
configuration
parameters:
by
: Determine if this is NRT byvalue
orregex
field
: The field value to check againstvalue
: Field value must equal this exactly.regex
: Field value must match this regular expression.handler
: If the handler for this product isMODISMix
orCollectionMix
, the handler to use for the NRT query, for example,TerraSwathMultiDay
.
Example:
"nrt": {
"handler": "TerraSwathMultiDay",
"by": "value",
"field": "data_center",
"value": "LANCEMODIS"
},
Add a field to the granule result with the name of the product.
Mark granules as requiring URS access depending on the following urs
configuration parameters.
by
: Determine if this requires URS byvalue
,regex
, orconstant
field
: The field value to check againstvalue
: Field value must equal this exactly or the constant to set as.regex
: Field value must match this regular expression.
Parse out the version field into a numeric value that can used for comparison operations.
Use a regular expression to parse out a version into a numeric value that can used for comparison operations. Parameters:
field
: The name of the field that contains the versionnamedRegex
: UseMODISProducerGranuleID
to parse out the version from a MODIS producer granule ID in the form ofMOD04_L2.A2016137.2105.061.2017326151115.hdf
regex
: IfnamedRegex
is not used, a regular expression used to extract the versionparseVersion
: UseMODIS
to multiply version numbers below 10 by 10. This changes MODIS version numbers from 5, 51, 6, 61 to 50, 51, 60, 61.
Keep granules that meet the following values passed into the spec
constructor:
eastZone
: Minutes since UTC midnight to check for granules from the previous daywestZone
: Minutes since UTC midnight to check for granules from the next day.maxDistance
: Any line segment in a polygon that exceeds this distance, in degrees, is considered to have crossed the anti-meridian.
Creates a label for this granule based on its acquisition time only. Times that are not from the selected day are indicated with + or - day indicators.
Use the provided title in the metadata as the granule label.
Convert the EPSG:4326 coordinates into the other projections required for display.
Given a set of granules with different versions, only select the latest.
Only select granules with the exact version specified in the version
configuration item.