public class GDALDataRaster extends AbstractDataRaster implements Cacheable
| Modifier and Type | Field and Description | 
|---|---|
| protected GDAL.Area | area | 
| protected static int | DEFAULT_MAX_RASTER_SIZE_LIMIT | 
| protected org.gdal.gdal.Dataset | dsVRT | 
| protected File | srcFile | 
| protected org.gdal.osr.SpatialReference | srs | 
| protected Object | usageLock | 
height, width| Constructor and Description | 
|---|
| GDALDataRaster(org.gdal.gdal.Dataset ds) | 
| GDALDataRaster(Object source)Opens a data raster | 
| GDALDataRaster(Object source,
              boolean quickReadingMode)Opens a data raster | 
| Modifier and Type | Method and Description | 
|---|---|
| protected org.gdal.gdal.Dataset | buildNonNorthUpDatasetFromOverview(int bestOverviewIdx,
                                  int destWidth,
                                  int destHeight) | 
| protected org.gdal.gdal.Dataset | buildNorthUpDatasetFromOverview(Sector reqSector,
                               int reqWidth,
                               int reqHeight,
                               int bestOverviewIdx,
                               int srcWidth,
                               int srcHeight) | 
| protected String | composeExceptionReason(Throwable t) | 
| protected static String | convertAVListToString(AVList list) | 
| protected org.gdal.gdal.Dataset | createCompatibleDataset(int width,
                       int height,
                       Sector sector,
                       AVList destParams) | 
| protected org.gdal.gdal.Dataset | createMaskDataset(int width,
                 int height,
                 Sector sector) | 
| void | dispose()Disposes of any internal resources allocated by the object. | 
| protected void | doDrawOnTo(DataRaster canvas) | 
| protected DataRaster | doGetSubRaster(int roiWidth,
              int roiHeight,
              Sector roiSector,
              AVList roiParams) | 
| void | drawOnTo(DataRaster canvas)Copies this raster into a specified raster. | 
| protected static org.gdal.gdal.Band | findAlphaBand(org.gdal.gdal.Dataset ds) | 
| protected org.gdal.gdal.Dataset | getBestSuitedDataset(int reqWidth,
                    int reqHeight,
                    Sector reqSector)The purpose of this method is to create the best suited dataset for the requested area. | 
| protected static int | getMaxRasterSizeLimit() | 
| AVList | getMetadata() | 
| long | getSizeInBytes()Retrieves the approximate size of this object in bytes. | 
| DataRaster | getSubRaster(AVList params)Builds a writable data raster for the requested region of interest (ROI) | 
| protected void | init(org.gdal.gdal.Dataset ds,
    boolean quickReadingMode)Extracts metadata and sets next key/value pairs:
 
 
 
 AVKey.WIDTH - the maximum width of the image
 
 AVKey.HEIGHT - the maximum height of the image
 
 AVKey.COORDINATE_SYSTEM - one of the next values: AVKey.COORDINATE_SYSTEM_SCREEN
 AVKey.COORDINATE_SYSTEM_GEOGRAPHIC AVKey.COORDINATE_SYSTEM_PROJECTED
 
 AVKey.SECTOR - in case of Geographic CS, contains a regular Geographic Sector defined by lat/lon coordinates of
 corners in case of Projected CS, contains a bounding box of the area | 
| protected boolean | intersects(Sector reqSector) | 
| protected org.gdal.osr.SpatialReference | readSpatialReference(org.gdal.gdal.Dataset ds) | 
| void | setSector(Sector sector)Set a new extent to the data raster. | 
| String | toString() | 
computeClipRect, computeGeographicToRasterTransform, computeSourceToDestTransform, getHeight, getSector, getSubRaster, getWidth, setValueaddPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getBooleanValue, getBooleanValue, getChangeSupport, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getRestorableStateForAVPair, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValuesclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValuesprotected GDAL.Area area
protected static final int DEFAULT_MAX_RASTER_SIZE_LIMIT
protected org.gdal.gdal.Dataset dsVRT
protected File srcFile
protected org.gdal.osr.SpatialReference srs
protected final Object usageLock
public GDALDataRaster(org.gdal.gdal.Dataset ds)
               throws IllegalArgumentException
IllegalArgumentExceptionpublic GDALDataRaster(Object source) throws IllegalArgumentException, FileNotFoundException
source - the location of the local file, expressed as either a String path, a File, or a file URL.IllegalArgumentException - if the source is nullFileNotFoundException - if the source (File) does not existpublic GDALDataRaster(Object source, boolean quickReadingMode) throws IllegalArgumentException, FileNotFoundException
source - the location of the local file, expressed as either a String path, a File, or a file
                         URL.quickReadingMode - if quick reading mode is enabled GDAL will not spend much time on heavy calculations,
                         like for example calculating Min/Max for entire elevation rasterIllegalArgumentException - if the source is nullFileNotFoundException - if the source (File) does not existprotected org.gdal.gdal.Dataset buildNonNorthUpDatasetFromOverview(int bestOverviewIdx,
                                                                   int destWidth,
                                                                   int destHeight)
protected org.gdal.gdal.Dataset buildNorthUpDatasetFromOverview(Sector reqSector, int reqWidth, int reqHeight, int bestOverviewIdx, int srcWidth, int srcHeight)
protected org.gdal.gdal.Dataset createCompatibleDataset(int width,
                                                        int height,
                                                        Sector sector,
                                                        AVList destParams)
protected org.gdal.gdal.Dataset createMaskDataset(int width,
                                                  int height,
                                                  Sector sector)
public void dispose()
Disposabledispose in interface Disposableprotected void doDrawOnTo(DataRaster canvas)
protected DataRaster doGetSubRaster(int roiWidth, int roiHeight, Sector roiSector, AVList roiParams)
public void drawOnTo(DataRaster canvas)
DataRasterdrawOnTo in interface DataRastercanvas - - the raster to copy into.protected static org.gdal.gdal.Band findAlphaBand(org.gdal.gdal.Dataset ds)
protected org.gdal.gdal.Dataset getBestSuitedDataset(int reqWidth,
                                                     int reqHeight,
                                                     Sector reqSector)
reqWidth - width of the requested areareqHeight - height of the requested areareqSector - sector of the requested areaprotected static int getMaxRasterSizeLimit()
public AVList getMetadata()
public long getSizeInBytes()
CacheablegetSizeInBytes in interface CacheableCacheable object's size in bytespublic DataRaster getSubRaster(AVList params)
getSubRaster in interface DataRastergetSubRaster in class AbstractDataRasterparams - 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 }protected void init(org.gdal.gdal.Dataset ds,
                    boolean quickReadingMode)
ds - GDAL's DatasetquickReadingMode - if quick reading mode is enabled GDAL will not spend much time on heavy calculations,
                         like for example calculating Min/Max for entire elevation rasterprotected boolean intersects(Sector reqSector)
protected org.gdal.osr.SpatialReference readSpatialReference(org.gdal.gdal.Dataset ds)
public void setSector(Sector sector) throws IllegalArgumentException
sector - A valid sector instanceIllegalArgumentException - if the Sector is null