|
deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.coverage.raster.io.RasterIOOptions
public class RasterIOOptions
This class is a container for various RasterIO options.
Field Summary | |
---|---|
static String |
CREATE_RASTER_MISSING_CACHE_DIR
A key to signal the creation of missing raster dirs. |
static String |
CRS
This key will get the crs of the raster. |
static String |
DATA_LOADING_POLICY
This key will get the default loading policy (resulting in a RasterDataContainer) of the RasterDataFactory. |
static String |
GEO_ORIGIN_LOCATION
This key will get the location of the origin of a raster geo reference see RasterGeoReference.OriginLocation |
static String |
LOCAL_RASTER_CACHE_DIR
This key will get the local raster cache directory to be used inside the raster cache directory for the given raster. |
static String |
OPT_FORMAT
This key stores the (output) format. |
static String |
ORIGIN_OF_RASTER
Use this key to add the origin of the raster read, this might be handy if reading rasters from an URL (Stream) and the cache can use this id to load data from cache. |
static String |
RASTER_CACHE_DIR
The raster cache dir to be used. |
static String |
READ_WLD_FILE
This key is contained if the RasterReader should try to read the world file. |
Constructor Summary | |
---|---|
RasterIOOptions()
An empty constructor, nothing is set. |
|
RasterIOOptions(RasterGeoReference.OriginLocation originLocation)
|
|
RasterIOOptions(RasterGeoReference reference)
Use this constructor if you read your raster reference some place else, or if you are reading from a stream. |
|
RasterIOOptions(RasterGeoReference ref,
String format)
Set the default loading policy to one configured in the RasterDataContainerFactory |
Method Summary | |
---|---|
void |
add(String key,
String value)
|
boolean |
contains(String key)
|
void |
copyOf(RasterIOOptions otherOptions)
Copies the the values from the given options. |
static byte[] |
createNoData(String[] bandValues,
DataType type)
Create a noData array from the given strings. |
static RasterIOOptions |
forFile(File file)
Return a RasterIOOption object with the format set according to the given file. |
static RasterIOOptions |
forFile(File file,
RasterGeoReference envelope)
Return a RasterIOOption object with the format set according to the given file with an optional RasterGeoReference . |
String |
get(String key)
|
CRS |
getCRS()
|
RasterDataContainerFactory.LoadingPolicy |
getLoadingPolicy()
|
byte[] |
getNoDataValue()
Returns the no data value. |
RasterGeoReference |
getRasterGeoReference()
|
RasterGeoReference.OriginLocation |
getRasterOriginLocation()
|
boolean |
hasRasterGeoReference()
|
boolean |
readWorldFile()
|
void |
setNoData(byte[] noDataValue)
no data value. |
void |
setRasterGeoReference(RasterGeoReference geoRef)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String OPT_FORMAT
public static final String READ_WLD_FILE
public static final String DATA_LOADING_POLICY
public static final String GEO_ORIGIN_LOCATION
RasterGeoReference.OriginLocation
public static final String CRS
public static final String LOCAL_RASTER_CACHE_DIR
public static final String RASTER_CACHE_DIR
public static final String CREATE_RASTER_MISSING_CACHE_DIR
public static final String ORIGIN_OF_RASTER
Constructor Detail |
---|
public RasterIOOptions()
RasterDataContainerFactory
. Worldfile reading is on.
public RasterIOOptions(RasterGeoReference reference)
RasterDataContainerFactory
.
reference
- of the file/stream to read.public RasterIOOptions(RasterGeoReference ref, String format)
RasterDataContainerFactory
ref
- format
- of the raster to read, e.g. png, jpg, tiff..., may be null
public RasterIOOptions(RasterGeoReference.OriginLocation originLocation)
originLocation
- to be used for reading worldfiles.Method Detail |
---|
public void add(String key, String value)
key
- value
- public boolean contains(String key)
key
-
public String get(String key)
key
-
null
public static RasterIOOptions forFile(File file)
file
-
public static RasterIOOptions forFile(File file, RasterGeoReference envelope)
RasterGeoReference
.
file
- envelope
-
public String toString()
toString
in class Object
public boolean readWorldFile()
public RasterDataContainerFactory.LoadingPolicy getLoadingPolicy()
public boolean hasRasterGeoReference()
public RasterGeoReference getRasterGeoReference()
public void setRasterGeoReference(RasterGeoReference geoRef)
geoRef
- the raster geo reference to use for the loaded raster.public byte[] getNoDataValue()
RasterIOOptions
by using
setNoData(byte[])
. The byte[] can be created from an array of Strings by using the
createNoData(String[], DataType)
.
null
if no data was specified.public RasterGeoReference.OriginLocation getRasterOriginLocation()
RasterGeoReference.OriginLocation#CENTER
;public CRS getCRS()
public void setNoData(byte[] noDataValue)
createNoData(String[], DataType)
.
noDataValue
- containing byte representations of the rasters no data value.public static byte[] createNoData(String[] bandValues, DataType type) throws NumberFormatException
bandValues
- String representations of each bands no data value e.g {10.0, 80.5, -100} for a 3 band float raster.type
- of the no data values.
ByteBuffer
methods. If either the type or the array is null
null
will
be returned.
NumberFormatException
- if one of the Strings could not be decoded.public void copyOf(RasterIOOptions otherOptions)
otherOptions
-
|
deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |