Class TLfnResolution

java.lang.Object
com.luciad.fusion.tilestore.metadata.TLfnResolution
All Implemented Interfaces:
Comparable<TLfnResolution>

public final class TLfnResolution extends Object implements Comparable<TLfnResolution>
This class represents the geospatial resolution of a raster in model coordinates, with an X- and Y- component. It replaces the legacy concept of a pixel density, which lacks the notion of X- and Y- components. For example, a data set with a spatial resolution of 3 arcseconds in both longitudinal and latitudinal directions corresponds to a resolution of 1 / 1200 = 0.000833333 x 0.000833333.

A resolution is comparable according to the natural order:

  • Low resolutions are less than high resolutions.
  • Low resolutions have lower density than high resolutions.
  • When two resolutions have an equal density, the one with the greatest X component is less than the other.

Since:
2016.0
  • Constructor Details

    • TLfnResolution

      public TLfnResolution(double aX, double aY)
      Constructs a new resolution from given X and Y components. The X and Y components are the distance between pixels in model coordinates. This means that higher resolutions have lower X and Y components.

      The allowed values for X and Y components are [0, +Infinity]. This constructor throws when one of the components is NaN or < 0.

      Parameters:
      aX - the X component, must be in the range [0, +Infinity]
      aY - the Y component, must be in the range [0, +Infinity]
  • Method Details

    • getX

      public double getX()
      The X component of the spatial resolution.
      Returns:
      the X component of the spatial resolution
    • getY

      public double getY()
      The Y component of the spatial resolution.
      Returns:
      the Y component of the spatial resolution
    • compareTo

      public int compareTo(TLfnResolution aOther)
      Compares this resolution to another. A resolution is less than another if it has a lower density than another, meaning that it has higher values for X and Y components. For example, resolution 0.5 x 0.5 is less than resolution 0.01 x 0.01.

      If two different resolutions have the same density, then the one with the greatest X component will be less than the other. For example, resolution 0.5 x 0.01 is less than 0.01 x 0.5.

      Specified by:
      compareTo in interface Comparable<TLfnResolution>
      Parameters:
      aOther - the resolution to compare this one to
      Returns:
      -1 if this resolution is less than the other, 0 if is equal, or 1 if it is greater than the other
    • equals

      public boolean equals(Object aObject)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object