cmr.opendap.ous.util.geog
Documentation forthcoming
adjusted-lat
(adjusted-lat lat)(adjusted-lat lat resolution)Documentation forthcoming
adjusted-lon
(adjusted-lon lon)(adjusted-lon lon resolution)Documentation forthcoming
bounding-box->lookup-indices
(bounding-box->lookup-indices bounding-box)(bounding-box->lookup-indices bounding-box index-names)(bounding-box->lookup-indices bounding-box reversed? index-names)(bounding-box->lookup-indices bounding-box reversed? index-names stride)(bounding-box->lookup-indices lon-max lat-max bounding-box reversed? index-names stride)Documentation forthcoming
bounding-box->lookup-record
(bounding-box->lookup-record bounding-box reversed?)(bounding-box->lookup-record lon-max lat-max [lon-lo lat-lo lon-hi lat-hi :as bounding-box] reversed?)Documentation forthcoming
create-array-lookup
(create-array-lookup lon-lo lat-lo lon-hi lat-hi)(create-array-lookup lon-lo lat-lo lon-hi lat-hi reversed?)This is the convenience constructor for the ArrayLookup record, taking latitude and longitude values and outputing a data structure that can be used for creating the lookup indices for OPeNDAP dimensional arrays. It has can create output for both normal and reversed latitudinal arrays:
-
Pass the
reversed?parameter with a value offalsewhen latitude -90N is stored at the 0th index and 90N is stored at the highest index (whose actual number will varry, depending upon the resolution of the data). This is the default, when no value is passed for thereversed?parameter. -
Pass the
reversed?parameter with a value oftruewhen latitude 90N is stored at the 0th index and -90N is stored at the highest index (whose actual number will varry, depending upon the resolution of the data).
default-dim-stride
Documentation forthcoming
default-lat-lon-stride
Documentation forthcoming
format-opendap-dim
(format-opendap-dim min stride max)Documentation forthcoming
format-opendap-dim-lat
(format-opendap-dim-lat lookup-record)(format-opendap-dim-lat lookup-record stride)Documentation forthcoming
format-opendap-dim-lon
(format-opendap-dim-lon lookup-record)(format-opendap-dim-lon lookup-record stride)Documentation forthcoming
format-opendap-lat-lon
(format-opendap-lat-lon lookup-record [lon-name lat-name] stride)Documentation forthcoming
lat-hi-phase-shift
(lat-hi-phase-shift lat-max lat-hi)This is used for reading values from OPeNDAP where -90N is stored at the zero (first) index in the array.
lat-hi-phase-shift-reversed
(lat-hi-phase-shift-reversed lat-max lat-lo)This is used for reading values from OPeNDAP where 90N is stored at the zero (first) index in the array.
Note that this must also be used in conjunction with the hi and lo values for latitude in the OPeNDAP lookup array being swapped (see cmr.opendap.ous.variable/create-opendap-lookup-reversed).
lat-lo-phase-shift
(lat-lo-phase-shift lat-max lat-lo)This is used for reading values from OPeNDAP where -90N is stored at the zero (first) index in the array.
lat-lo-phase-shift-reversed
(lat-lo-phase-shift-reversed lat-max lat-lo)This is used for reading values from OPeNDAP where 90N is stored at the zero (first) index in the array.
Note that this must also be used in conjunction with the hi and lo values for latitude in the OPeNDAP lookup array being swapped (see cmr.opendap.ous.variable/create-opendap-lookup-reversed).
lon-hi-phase-shift
(lon-hi-phase-shift lon-max lon-hi)Documentation forthcoming
lon-lo-phase-shift
(lon-lo-phase-shift lon-max lon-lo)Documentation forthcoming
offset-index
(offset-index max default-max)(offset-index max default-max resolution)OPeNDAP indices are 0-based, thus gridded longitudinal data with 1x resolution is stored at indices from 0 to 359 and similar latitudinal data is stored at indices from 0 to 179. The max values for lat and lon are stored in the UMM-Var records as part of the dimensions. Sometimes those values are pre-decremented for use in OPeNDAP, sometimes not (e.g., sometimes max longitude is given as 359, sometimes as 360). This function attempts to ensure a consistent use of decremented max values for indices.
phase-shift
(phase-shift degrees-max default-abs-degrees-max default-degrees-max degrees adjust-fn round-fn)Longitude goes from -180 to 180 and latitude from -90 to 90. However, when referencing data in OPeNDAP arrays, 0-based indices are needed. Thus in order to get indices that match up with degrees, our longitude needs to be phase-shifted by 180 degrees, latitude by 90 degrees.