Class Projection

    • Constructor Detail

      • Projection

        public Projection()
    • Method Detail

      • initTransformTable

        public void initTransformTable()

        Initialize transform parameters, set offset to center of image (plus shifts), set scale

      • setScale

        protected abstract void setScale()
      • projectY

        public abstract double projectY​(double pY)

        Project 3D point on y axis.

      • inverseProjectY

        public abstract double inverseProjectY​(double pY)
      • projectX

        protected abstract double projectX​(double pX,
                                           double pZ)

        Project 3D point on x axis.

      • inverseProjectX

        public abstract double inverseProjectX​(double pX)
      • isVisible

        public abstract boolean isVisible​(Point3D pPoint)
      • isWithinImage

        public boolean isWithinImage​(Point2D pPoint)
      • getLocation

        public abstract Coordinate getLocation​(int pX,
                                               int pY)

        Translate screen point into coordinate on Earth.

        Parameters:
        pX -
        pY -
        Returns:
      • project2D

        public Point2D project2D​(Point3D pPoint)

        Imagine view the globe, N is up, S is down, and N0E0 is in the center. x is right/left, y is up/down, and z is front/rear.

        Map points are located on the surface of a unit sphere (diameter = 1). Latitude is the angle between x and y or z and y. Longitude is the angle between x and z.

        Why? The way we choose our global coordinate system, longitude circles (latidude variable) always have the same size while the size of latidude circles (longitude variable) depends on the latitude.

        Parameters:
        pPoint -
        Returns:
      • finalizeX

        public double finalizeX​(double pX)

        Since the final mapping is relative to the center of the image -PI and PI get mapped to the left and right border respectively. But see ProjectionOrtho.setScale().

      • finalizeY

        public double finalizeY​(double pY)

        Since the final mapping is relative to the center of the image -PI and PI get mapped to the bottom and top border respectively. But see ProjectionOrtho.setScale().

      • inverseFinalizeX

        public double inverseFinalizeX​(double x)

        Transform screen to image coordinates.

      • inverseFinalizeY

        public double inverseFinalizeY​(double y)

        Transform screen to image coordinates.

      • rotate

        public Point3D rotate​(Point3D pPoint)

        Rotate the point according to the current rotation of Earth.

      • getScale

        public double getScale()
      • setViewMagnification

        public void setViewMagnification​(double pViewMagnification)
      • setViewPos

        public void setViewPos​(Coordinate pViewPos)
      • setShiftX

        public void setShiftX​(int pX)
      • setShiftY

        public void setShiftY​(int pY)
      • setViewRotation

        public void setViewRotation​(double pViewRotation)
      • setImageWidth

        public void setImageWidth​(int pImageWidth)
      • setImageHeight

        public void setImageHeight​(int pImageHeight)