EarthGeometry
A metatype for representing an Earth geometry as stacked topography layers.
Attributes
Name | Type | Description |
---|---|---|
date | string or nil |
Date (time) of the simulation encoded as a 'dd/mm/yy' string. |
geoid_undulations | TopographyData or nil |
Map of geoid undulations w.r.t. the WGS84 ellipsoid. |
layers | Readonly | Table containing the TopographyLayers indexed by number. Note that the 1st layer is on top. |
magnet | boolean , string or nil |
Flag for switching the default geomagnetic field (IGRF13) or path to an alternative model specified as a COF file. |
Note
The layers structure can not be modified after creation. The properties of a layer can be modified however, e.g. the medium density of a layer or its topography offset. The other attributes: date, geoid_undulations and magnet can be modified as specified in the constructor below.
Constructor
The EarthGeometry constructor accepts an arbitrary number of TopographyLayers to be provided. Note that the order of these arguments matters. Layers provided first are above others. Extra options can also be set as keyword arguments, e.g. the geomagnetic field at a given date or geoid undulations.
Synopsis
pumas.EarthGeometry(layer, ...)
pumas.EarthGeometry{layer, ..., (date)=, (geoid_undulations)=, (magnet)=}
Arguments
Name | Type | Description |
---|---|---|
layer | table or TopographyLayer |
TopographyLayer or a table argument consistent with the constructor of the latter, e.g. {medium, data} . |
(date) | number or string |
Date (time) of the simulation encoded as a number since the epoch or as a 'dd/mm/yy' string. |
(geoid_undulations) | TopographyData | Map of geoid undulations w.r.t. the WGS84 ellipsoid. |
(magnet) | boolean or string |
Flag for switching the default geomagnetic field (IGRF13) or path to an alternative model sepcified as a COF file. |
See also
EarthGeometry.insert
Insert a daughter geometry into the EarthGeometry. This
method behaves as the table.insert
Lua function. If no index is specified
the daughter geometry is appended as the last element.
Synopsis
EarthGeometry:insert(daughter)
EarthGeometry:insert(index, daughter)
Arguments
Name | Type | Description |
---|---|---|
index | number |
Table index of the inserted geometry. |
daughter | Geometry | Daughter geometry to insert. |
Returns
nil
See also
EarthGeometry.remove
Remove a daughter geometry from the EarthGeometry given its
index. If no index is provided the last daughter geometry is removed. This
method behaves as the table.remove
Lua function.
Synopsis
EarthGeometry:remove((index))
Arguments
Name | Type | Description |
---|---|---|
(index) | number |
Table index of the daughter geometry to remove. |
Returns
Type | Description |
---|---|
Geometry | The removed geometry. |