Class Projecter

    • Constructor Summary

      Constructors 
      Constructor Description
      Projecter()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      boolean allValid()
      Are all points in the projection plane valid?
      protected int getInputDimension()
      What is the input dimensionality of a projecter?
      protected int getOutputDimension()
      What is the output dimensionality of a projecter?
      double getXTiling()
      Some projections can tile the projection plane with repeated copies.
      double getYTiling()
      The tiling period in Y
      abstract Deprojecter inverse()
      Get the inverse
      double[] shadowPoint​(double x, double y)
      Return a shadowpoint for the input location.
      boolean straddle​(double[][] pnts)
      Does this pixel go wrap around the standard region of the image? E.g., does it straddle the 180 deg in a Car or Ait projection?
      boolean straddleable()
      Is it possible for a pixel to straddle the valid region.
      double[][][] straddleComponents​(double[][] pnts)
      If this is a straddling pixel, then return the straddle components
      double[] tissot​(double x, double y)
      Return the Tissot ellipse parameters for the projection.
      boolean validPosition​(double[] pos)
      Is this a valid position in the projection plane for this image.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Projecter

        public Projecter()
    • Method Detail

      • getOutputDimension

        protected int getOutputDimension()
        What is the output dimensionality of a projecter?
        Specified by:
        getOutputDimension in class Transformer
      • getInputDimension

        protected int getInputDimension()
        What is the input dimensionality of a projecter?
        Specified by:
        getInputDimension in class Transformer
      • getXTiling

        public double getXTiling()
        Some projections can tile the projection plane with repeated copies. This method gives the vectors along which the tiles repeat. Note that for azimuthal like (e.g., Mercator) projections, the tiling may be possible in the longitudinal direction, but not in the latitudinal direction. Some projections (e.g., CAR) can tile in both directions (but note that the periodicity for tiling is 360 degrees in both directions in the CAR projection since the latitudes will run ... -90 -80 ...0 ... 80 90 80 ... 0 ... -80 -90 -80 .... It's also conceivable that the projection tiling is along but we do not accomodate this.
        Returns:
        The period in X in radians. A value of 0 means that there is not periodicity.
      • getYTiling

        public double getYTiling()
        The tiling period in Y
        Returns:
        The tiling period in radians. A value of 0 means that there is no period.
      • validPosition

        public boolean validPosition​(double[] pos)
        Is this a valid position in the projection plane for this image. This default is appropriate for all projections where the projection plane is infinite.
      • allValid

        public boolean allValid()
        Are all points in the projection plane valid?
      • straddleable

        public boolean straddleable()
        Is it possible for a pixel to straddle the valid region.
      • straddle

        public boolean straddle​(double[][] pnts)
        Does this pixel go wrap around the standard region of the image? E.g., does it straddle the 180 deg in a Car or Ait projection?
      • straddleComponents

        public double[][][] straddleComponents​(double[][] pnts)
        If this is a straddling pixel, then return the straddle components
      • shadowPoint

        public double[] shadowPoint​(double x,
                                    double y)
        Return a shadowpoint for the input location. Shadowpoints are not defined for all projections.
      • tissot

        public double[] tissot​(double x,
                               double y)
        Return the Tissot ellipse parameters for the projection. This gives the axes and position angle of an ellipse that reflects the distotortion at the given point. If there is no distortion or rotation, then the values (1,1,0) are returned. If the major axis is aligned with latitude, then the angle (the third parameter) will be 0, or pi/2 if greater aligned with longitude. If the projection is equal-area then the first two parameters are multiplicative inverses. This implementation is a place holder which should be overriden by specific projections. It returns a set of NaNs to indicate that the calculation has not been done.
        Parameters:
        x - The X-value at which the Tissot indicatrix is to be calculated.
        y - The Y-value at which the Tissot indicatrix is to be calculated.
        Returns:
        A three element double vector [Semimajor, semiminor, position angle] with the axes size and positional angle of the ellipse.