libs/sensorml/src/lib/model/gml/Envelope.ts
Envelope defines an extent using a pair of positions defining opposite corners in arbitrary dimensions. The first direct position is the "lower corner" (a coordinate position consisting of all the minimal ordinates for each dimension for all points within the envelope), the second one the "upper corner" (a coordinate position consisting of all the maximal ordinates for each dimension for all points within the envelope).
Properties |
|
Methods |
Accessors |
Private _coords |
Default value : new Array<number>(4)
|
axisLabels |
Type : string[]
|
Decorators :
@DisplayName('Axis labels')
|
Inherited from
AbstractReferenced
|
Defined in
AbstractReferenced:12
|
srsDimension |
Type : number
|
Decorators :
@DisplayName('SRS dimension')
|
Inherited from
AbstractReferenced
|
Defined in
AbstractReferenced:9
|
srsName |
Type : string
|
Decorators :
@DisplayName('SRS name')
|
Inherited from
AbstractReferenced
|
Defined in
AbstractReferenced:6
|
uomLabels |
Type : string[]
|
Decorators :
@DisplayName('Unit of measure labels')
|
Inherited from
AbstractReferenced
|
Defined in
AbstractReferenced:15
|
toString |
toString()
|
Returns :
string
|
toString |
toString()
|
Inherited from
AbstractReferenced
|
Defined in
AbstractReferenced:17
|
Returns :
string
|
lowerCorner | ||||
getlowerCorner()
|
||||
setlowerCorner(c)
|
||||
Parameters :
Returns :
void
|
upperCorner | ||||
getupperCorner()
|
||||
setupperCorner(c)
|
||||
Parameters :
Returns :
void
|
coordinates | ||||
getcoordinates()
|
||||
setcoordinates(c)
|
||||
Parameters :
Returns :
void
|
import { AbstractReferenced } from './AbstractReferenced';
import { DisplayName } from '../../common/decorators/DisplayName';
/**
* Envelope defines an extent using a pair of positions defining opposite
* corners in arbitrary dimensions. The first direct position is the "lower
* corner" (a coordinate position consisting of all the minimal ordinates for
* each dimension for all points within the envelope), the second one the
* "upper corner" (a coordinate position consisting of all the maximal ordinates
* for each dimension for all points within the envelope).
*/
export class Envelope extends AbstractReferenced {
private _coords = new Array<number>(4);
@DisplayName('Lower corner')
get lowerCorner() {
return [this._coords[0], this._coords[2]];
}
set lowerCorner(c: [number, number]) {
this._coords[0] = c[0];
this._coords[2] = c[1];
}
@DisplayName('Upper corner')
get upperCorner() {
return [this._coords[1], this._coords[3]];
}
set upperCorner(c: [number, number]) {
this._coords[1] = c[0];
this._coords[3] = c[1];
}
@DisplayName('Coordinates')
get coordinates(): [number, number, number, number] {
return [
this._coords[0],
this._coords[1],
this._coords[2],
this._coords[3]
];
}
set coordinates(c: [number, number, number, number]) {
for (let i = 0; i < 4; ++i) {
this._coords[i] = c[i];
}
}
toString() {
return 'Envelope';
}
}