Class RegionMap

    • Constructor Detail

      • RegionMap

        public RegionMap()
    • Method Detail

      • getCols

        public int getCols()
        Getter for the region cols.
        Returns:
        the region cols or -1.
      • getRows

        public int getRows()
        Getter for the region rows.
        Returns:
        the region rows or -1.
      • getNorth

        public double getNorth()
        Getter for the region's north bound.
        Returns:
        the region north bound or HMConstants.doubleNovalue
      • getSouth

        public double getSouth()
        Getter for the region's south bound.
        Returns:
        the region south bound or HMConstants.doubleNovalue
      • getEast

        public double getEast()
        Getter for the region's east bound.
        Returns:
        the region east bound or HMConstants.doubleNovalue
      • getWest

        public double getWest()
        Getter for the region's west bound.
        Returns:
        the region west bound or HMConstants.doubleNovalue
      • getXres

        public double getXres()
        Getter for the region's X resolution.
        Returns:
        the region's X resolution or HMConstants.doubleNovalue
      • getYres

        public double getYres()
        Getter for the region's Y resolution.
        Returns:
        the region's Y resolution or HMConstants.doubleNovalue
      • getHeight

        public double getHeight()
        Getter for the region height.
        Returns:
        the region's height or HMConstants.doubleNovalue
      • snapToNextHigherInRegionResolution

        public org.locationtech.jts.geom.Coordinate snapToNextHigherInRegionResolution​(double x,
                                                                                       double y)
        Snaps a geographic point to be on the region grid.

        Moves the point given by X and Y to be on the grid of the supplied region.

        Parameters:
        x - the easting of the arbitrary point.
        y - the northing of the arbitrary point.
        Returns:
        the snapped coordinate.
      • toEnvelope

        public org.locationtech.jts.geom.Envelope toEnvelope()
        Create the envelope of the region borders.
        Returns:
        the envelope of the region borders.
      • toSubRegion

        public RegionMap toSubRegion​(double n,
                                     double s,
                                     double w,
                                     double e)
        Creates a new RegionMap cropped on the new bounds and snapped on the original grid.

        The supplied bounds are contained in the resulting region.

        Parameters:
        n - the new north.
        s - the new south.
        w - the new west.
        e - the new east.
        Returns:
        the new RegionMap.
      • toSubRegion

        public RegionMap toSubRegion​(org.locationtech.jts.geom.Envelope envelope)
        Creates a new RegionMap cropped on the new bounds and snapped on the original grid.

        The supplied bounds are contained in the resulting region.

        Parameters:
        envelope - the envelope to snap.
        Returns:
        the new RegionMap.
      • toStringJGT

        public String toStringJGT()