Class DefaultCoordinateSystemAxis.Order

java.lang.Object
org.apache.sis.io.wkt.FormattableObject
org.apache.sis.referencing.cs.DefaultCoordinateSystemAxis.Order
Enclosing class:
DefaultCoordinateSystemAxis

private static final class DefaultCoordinateSystemAxis.Order extends FormattableObject
The ORDER[…] element to be formatted inside AXIS[…] element. This is an element of WKT 2 only.
  • Field Details

    • index

      private final int index
      The sequence number to format inside the ORDER[…] element.
  • Constructor Details

    • Order

      private Order(int index)
      Creates new ORDER[…] element for the given sequential number.
  • Method Details

    • create

      static DefaultCoordinateSystemAxis.Order create(org.opengis.referencing.cs.CoordinateSystem cs, DefaultCoordinateSystemAxis axis)
      Creates a new ORDER[…] element for the given axis in the given coordinate system. If this method does not found exactly one instance of the given axis in the given coordinate system, then returns null. In the latter case, it is caller's responsibility to declare the WKT as invalid.

      This method is a little bit inefficient since the enclosing AbstractCS.formatTo(Formatter) method already know this axis index. But there is currently no API in Formatter for carrying this information, and we are a little bit reluctant to introduce such API since it would force us to introduce lists in a model which is, for everything else, purely based on trees.

    • formatTo

      protected String formatTo(Formatter formatter)
      Formats the ORDER[…] element.
      Specified by:
      formatTo in class FormattableObject
      Parameters:
      formatter - the formatter where to format the inner content of this WKT element.
      Returns:
      the CamelCase keyword for the WKT element, or null if unknown.
      See Also: