TopographyDataset

A metatype for an ordered set of topography data.

Attributes

Name Type Description
[i] TopographyData The ith data member of the set.

Note

The structure of the set cannot be modified. The properties of its members are mutable however, e.g. their offset. The set also supports addition and subtraction operations with a number resulting in all its data members being offset.

Constructor

A TopographyDataset represents an union of various data referering to a same topography. It behaves as a TopographyData but considering the best data available in its set. The constructor takes a table of data as argument or a variable number of data arguments. Each data element can be either a TopographyData object or one of its constructor arguments, i.e. a path string or an offset number for a geoid. The order in which the data elements are specified in the constructor does matter. Elements defined first have precedence, e.g. when requesting the topography elevation.

Note

When providing a TopographyData argument a shallow copy is done. The set instance refers to the same input data but with an independent offset.

Synopsis

pumas.TopographyDataset(data, ...)

pumas.TopographyDataset{data, ...}

Arguments

Name Type Description
data number, string or TopographyData TopographyData or any argument refering to them as defined in the TopographyData constructor.

See also

constants, elements, materials, TopographyData.

TopographyDataset.clone

Get a shallow copy of the TopographyDataset. The cloned data members to the same data than in the initial set but with independent offsets. In order to get a deep copy of the data one should instead create a new instance with the constructor.

Synopsis

TopographyDataset:clone()

Arguments

None, except self.

Returns

Type Description
TopographyDataset Shallow copy of the topography dataset.

See also

elevation, ipairs.

TopographyDataset.elevation

Get the topography elevation at an Earth location using the first matching data of the set. The input location can be specified by providing its latitude and longitude or by providing a point instance (e.g. GeodeticPoint, CartesianPoint), as detailed in the synopsis below.

Synopsis

TopographyDataset:elevation(coordinates)

TopographyDataset:elevation(latitude, longitude)

Arguments

Name Type Description
coordinates Coordinates Point coordinates, in m.
latitude number Latitude, in deg.
longitude number Longitude, in deg.

Returns

Type Description
number or nil Topography elevation, in m, or nil if there are no data in the set for the requested location.

Note

Topography data are usually provided w.r.t. the sea level. In order to get the altitude w.r.t. the WGS84 ellipsoid (e.g. the GPS altitude) one needs to correct from the geoid undulations.

See also

clone, ipairs.

TopographyDataset.ipairs

Stateless iterator over the set data members. This method behaves as the ipairs Lua function.

Synopsis

TopographyDataset:ipairs()

Arguments

None, except self.

Returns

Type Description
function Stateless iterator over the set data members.

See also

clone, elevation.