Class AbstractDataRaster

    • Field Detail

      • width

        protected int width
      • height

        protected int height
    • Constructor Detail

      • AbstractDataRaster

        protected AbstractDataRaster()
      • AbstractDataRaster

        protected AbstractDataRaster​(int width,
                                     int height,
                                     Sector sector)
                              throws java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalArgumentException
      • AbstractDataRaster

        protected AbstractDataRaster​(int width,
                                     int height,
                                     Sector sector,
                                     AVList list)
                              throws java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalArgumentException
    • Method Detail

      • getWidth

        public int getWidth()
        Description copied from interface: DataRaster
        Returns the raster's width in raster units.
        Specified by:
        getWidth in interface DataRaster
        Returns:
        the raster's width in raster units.
      • getHeight

        public int getHeight()
        Description copied from interface: DataRaster
        Returns the raster's height in raster units.
        Specified by:
        getHeight in interface DataRaster
        Returns:
        the raster's height in raster units.
      • getSector

        public Sector getSector()
        Description copied from interface: DataRaster
        Returns the region covered be the data.
        Specified by:
        getSector in interface DataRaster
        Returns:
        a sector indicating the region covered by the raster.
      • setValue

        public java.lang.Object setValue​(java.lang.String key,
                                         java.lang.Object value)
        Description copied from interface: AVList
        Adds a key/value pair to the list. Replaces an existing key/value pair if the list already contains the key.
        Specified by:
        setValue in interface AVList
        Overrides:
        setValue in class AVListImpl
        Parameters:
        key - the attribute name. May not be null.
        value - the attribute value. May be null, in which case any existing value for the key is removed from the collection.
        Returns:
        previous value associated with specified key, or null if there was no mapping for key. A null return can also indicate that the map previously associated null with the specified key, if the implementation supports null values.
      • computeClipRect

        protected java.awt.Rectangle computeClipRect​(Sector clipSector,
                                                     DataRaster clippedRaster)
      • computeSourceToDestTransform

        protected java.awt.geom.AffineTransform computeSourceToDestTransform​(int sourceWidth,
                                                                             int sourceHeight,
                                                                             Sector sourceSector,
                                                                             int destWidth,
                                                                             int destHeight,
                                                                             Sector destSector)
      • computeGeographicToRasterTransform

        protected java.awt.geom.AffineTransform computeGeographicToRasterTransform​(int width,
                                                                                   int height,
                                                                                   Sector sector)
      • getSubRaster

        public DataRaster getSubRaster​(int width,
                                       int height,
                                       Sector sector,
                                       AVList params)
        Description copied from interface: DataRaster
        Returns a portion of this raster as another raster. The returned raster conforms to EPSG:4326 even if this raster does not.
        Specified by:
        getSubRaster in interface DataRaster
        Parameters:
        width - the width to make the returned sub-raster.
        height - the height to make the returned sub-raster.
        sector - the sector to copy.
        params - a list of parameters that specify the width, height and sector of the region to return. Specify these values using AVKey.WIDTH, AVKey.HEIGHT and AVKey.SECTOR.
        Returns:
        the requested raster, or null if the raster could not be created.
      • getSubRaster

        public DataRaster getSubRaster​(AVList params)
        Reads the specified region of interest (ROI) with given extent, width, and height, and type
        Specified by:
        getSubRaster in interface DataRaster
        Parameters:
        params - Required parameters are:

        AVKey.HEIGHT as Integer, specifies a height of the desired ROI AVKey.WIDTH as Integer, specifies a width of the desired ROI AVKey.SECTOR as Sector, specifies an extent of the desired ROI

        Optional parameters are:

        AVKey.BAND_ORDER as array of integers, examples: for RGBA image: new int[] { 0, 1, 2, 3 }, or for ARGB image: new int[] { 3, 0, 1, 2 } or if you want only RGB bands of the RGBA image: new int[] { 0, 1, 2 } or only Intensity (4th) band of the specific aerial image: new int[] { 3 }

        Returns:
        DataRaster (BufferedImageRaster for imagery or ByteBufferDataRaster for elevations)