org.opengis.geometry.coordinate
Interface HomogeneousDirectPosition

Show UML class diagram
All Superinterfaces:
DirectPosition, Position

@Draft
@UML(identifier="DirectPosition",
     specification=ISO_19107)
public interface HomogeneousDirectPosition
extends DirectPosition

A direct position adding another element to the coordinate array which carries a non-zero “weight”, and multiplies all other columns in the coordinate array by that weight. “Homogeneous coordinates” equates, for every w≠0, the coordinate (wx, wy, wz, w) in four-dimensional Euclidean space with the point (x, y, z) in three-dimensional Euclidean space. This mapping is used heavily in projective geometry which aids implementers in creating realistic perspective views of higher dimensional geometry, and will also be used here in the definition of rational splines.

Since:
3.1
Departure from OGC/ISO specification:
The ISO 19107 draft document defines a single interface, DirectPosition, with a isHomgeneous attribute. In GeoAPI, we keep the historical direct position interface mostly unchanged, defines the new properties in a separated type, and replace the isHomgeneous attribute by a instanceof check.

Method Summary
 CoordinateSystem getCoordinateSystem()
          The coordinate system in which the coordinate is given.
 int getDimension()
          The dimension of the associated coordinate system.
 double getWeight()
          Returns the weight value, which is the last value in the coordinate array.
 void setWeight(double weight)
          Sets the weight value, which is the last value in the coordinate array.
 
Methods inherited from interface DirectPosition
equals, getCoordinate, getCoordinateReferenceSystem, getOrdinate, hashCode, setOrdinate
 
Methods inherited from interface Position
getDirectPosition
 

Method Detail

getDimension

@UML(identifier="dimension",
     obligation=MANDATORY,
     specification=ISO_19107)
int getDimension()
The dimension of the associated coordinate system. If the DirectPosition is not homogeneous, dimension is equal to the length of the coordinate array. If the DirectPosition is in homogeneous format, this is one less than the length of the array.

Specified by:
getDimension in interface DirectPosition
Returns:
The dimensionality of this position.
TODO:
Move this definition in the geoapi normative module if approved.

getWeight

@Draft
@UML(identifier="weight",
     obligation=MANDATORY,
     specification=ISO_19107)
double getWeight()
Returns the weight value, which is the last value in the coordinate array.

Returns:
The weight as a positive real number.

setWeight

void setWeight(double weight)
Sets the weight value, which is the last value in the coordinate array. The given weight shall be grater than zero.

Parameters:
weight - The new weight value.

getCoordinateSystem

@Draft
@UML(identifier="coordinateSystem",
     obligation=MANDATORY,
     specification=ISO_19107)
CoordinateSystem getCoordinateSystem()
The coordinate system in which the coordinate is given. May be null if this particular DirectPosition is included in a larger object with such a reference to a coordinate system. In this case, the coordinate system is implicitly assumed to take on the value of the containing object's coordinate system. And the first in the sequence of coordinate systems must be the spatial CRS from 19111.

Returns:
The coordinate system, or null.
See Also:
DirectPosition.getCoordinateReferenceSystem()


Copyright © 1994-2012 Open Geospatial Consortium. All Rights Reserved.