cmr.opendap.ous.core
Documentation forthcoming
apply-bounding-conditions
(apply-bounding-conditions search-endpoint user-token coll {:keys [bounding-box variables], :as params})There are several variable and bounding scenarios we need to consider:
- no spatial subsetting and no variables - return no query string in OPeNDAP URL; this will give users all variables for the entire extent defined in the variables’ metadata.
- variables but no spatial subsetting - return a query string with just the variables requested; a
Latitude,Longitudewill also be appended to the OPeNDAP URL; this will give users just these variables, but for the entire extent defined in each variable’s metadata. - variables and spatial subsetting - return a query string with the variables requested as well as the subsetting requested; this will give users just these variables, with data limited to the specified spatial range.
- spatial subsetting but no variables - this is a special case that needs to do a little more work: special subsetting without variables will link to an essentially empty OPeNDAP file; as such, we need to iterate through all the variables in the metadata and create an OPeNDAP URL query string that provides the sensible default of all variables.
For each of those conditions, a different value of vars will be returned, allowing for the desired result. Respective to the bullet points above:
vars- empty vectorvars- metadata for all the specified variable idsvars- metadata for all the specified variable idsvars- metadata for all the variables associated in the collection
apply-level-conditions
(apply-level-conditions coll params)bbox->bounding-info
(bbox->bounding-info coll bounding-box)Documentation forthcoming
bounding-infos->opendap-query
(bounding-infos->opendap-query coll bounding-infos)(bounding-infos->opendap-query coll bounding-infos bounding-box)Documentation forthcoming
data-file->opendap-url
(data-file->opendap-url data-file)Documentation forthcoming
data-files->opendap-urls
(data-files->opendap-urls params data-files query-string)Documentation forthcoming
fallback-pattern
Documentation forthcoming
fallback-replacement
Documentation forthcoming
format-opendap-lat-lon
(format-opendap-lat-lon coll bounding-infos bounding-box)Documentation forthcoming
get-opendap-urls
(get-opendap-urls component user-token raw-params)Documentation forthcoming
replace-double-slashes
(replace-double-slashes url)Documentation forthcoming
stage1
(stage1 component search-endpoint user-token raw-params)Documentation forthcoming
stage2
(stage2 component search-endpoint user-token params coll-promise grans-promise)Documentation forthcoming
stage3
(stage3 component coll search-endpoint user-token bounding-box service-ids vars)Documentation forthcoming
stage4
(stage4 coll bounding-box services-promise bounding-infos)Documentation forthcoming