cmr.ous.util.geog

Documentation forthcoming

-format-opendap-lat-lon

(-format-opendap-lat-lon lookup-record [lon-name lat-name] stride)

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 reversed?)(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 of false when 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 the reversed? parameter.

  • Pass the reversed? parameter with a value of true when 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).

create-opendap-bounds

(create-opendap-bounds bounding-box)(create-opendap-bounds bounding-box opts)(create-opendap-bounds {lon-max :Longitude, lat-max :Latitude, :as dimensions} bounding-box opts)

Documentation forthcoming

default-dim-stride

Documentation forthcoming

default-lat-lon-stride

Documentation forthcoming

extract-bounding-info

(extract-bounding-info entry bounding-box)

This function is executed at the variable level, however it has general, non-variable-specific bounding info passed to it in order to support spatial subsetting

extract-dimensions

(extract-dimensions entry)

Documentation forthcoming

extract-indexranges

(extract-indexranges entry)

Documentation forthcoming

format-opendap-bounds

(format-opendap-bounds bounding-info)(format-opendap-bounds {bound-name :name, :as bounding-info} 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-dims

(format-opendap-dims bounding-info)(format-opendap-dims bounding-info stride)

Documentation forthcoming

format-opendap-lat-lon

(format-opendap-lat-lon bounding-info)(format-opendap-lat-lon bounding-info stride)

Documentation forthcoming

get-lat-lon-names

(get-lat-lon-names bounding-info)

Documentation forthcoming

lat-dim

(lat-dim dim)

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.metadata.proxy.concepts.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.metadata.proxy.concepts.variable/create-opendap-lookup-reversed).

lat-lon-type?

Documentation forthcoming

lat-reversed?

(lat-reversed? lo-lat hi-lat)

Documentation forthcoming

lat-type

Documentation forthcoming

lat-type?

Documentation forthcoming

lon-dim

(lon-dim dim)

Documentation forthcoming

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

lon-type

Documentation forthcoming

lon-type?

Documentation forthcoming

normalize-lat-lon

(normalize-lat-lon dim)

This function normalizes the names of lat/lon in order to simplify internal, CMR-only logic. The original dimension names are recorded, and when needed, referenced.

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.

parse-coord-part

(parse-coord-part value default-value)

Documentation forthcoming

parse-lat-high

(parse-lat-high value)

Documentation forthcoming

parse-lat-low

(parse-lat-low value)

Documentation forthcoming

parse-lon-high

(parse-lon-high value)

Documentation forthcoming

parse-lon-low

(parse-lon-low value)

Documentation forthcoming

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.

replace-defaults-lat-lon

(replace-defaults-lat-lon bounding-info stride [k v])

Documentation forthcoming

restructure-dim

(restructure-dim dim)

Documentation forthcoming

restructure-dims

(restructure-dims dims)

Documentation forthcoming