@Draft @UML(identifier="GM_Permutation", specification=ISO_19107) public interface PermutationRepresents the rearrangement of a list, or a projection. The main usage of this interface is to determine the differences in the order in which a
CoordinateSystemaxes are defined and the order in which they are used in a
DirectPosition.Note: This is helpful, because forcing the coordinate reference system to be in the
CoordinateSystemas the first coordinate offsets will often force the system to be left handed. Using a odd-permutation on the spatial offsets will flip this to a right handed system, and allow graphics-based or engineering-based software to deal with coordinate as stored in the
DirectPositionwithout the worry of mirror images, which is the result of getting the handedness of a coordinate system wrong. The usual permutation with simply flip the first and second offset.
All Methods Instance Methods Abstract Methods Modifier and Type Method Description
getNewOrder()describes the new ordering of offsets in terms of offset indexes of the original ordering.
isEven()Determines whether the permutation is representable as an even or odd number of transposition (2 element swaps).
@Draft @UML(identifier="newOrder", obligation=MANDATORY, specification=ISO_19107) int getNewOrder()describes the new ordering of offsets in terms of offset indexes of the original ordering. The offsets shall be represented as a 0-up index; so a n-dimension array in original order would be (0, 1, 2, … , n-1); the index will always ranges up to one less than the cardinality of the array. If the array length is less than the dimension of the coordinate, then all offsets beyond the length of the array will be unmoved by the permutation.Note: Because of its definition, the
newOrderarray will normally be a rearrangement of the integer between 0 and n-1 where n is the dimension of the
CoordinateSystemin which the permutation appears. Since the most common issue is that the use of “lat-long” is left handed, the most common new order will be (1, 0) which simply flips the order of the latitude and longitude offsets of a geographic coordinate system.
- Returns a new order or the same order as in
@Draft @UML(identifier="isEven", obligation=MANDATORY, specification=ISO_19107) boolean isEven()Determines whether the permutation is representable as an even or odd number of transposition (2 element swaps). Even permutation preserve handedness and odd ones do not.Note: Under usual circumstances, the only reason to use a permutation is to change a spatial coordinate reference system from left handed to right handedness. A
nullpermutation is even, and the usual (1, 0) swap is odd (1 transposition).
trueif permutation is even, or