@LcdService(service=ILcdModelEncoder.class, priority=20000) public class TLcdLRDBModelEncoder extends Object implements ILcdModelEncoder, ILcdStatusSource
ILcdRaster
s, ILcdMultiLevelRaster
s and
ILcdEarthTileSet
s to LRDB.
This format is intended for use only with existing Luciad applications and should not be used otherwise.
If you are looking for an SQLite-based exchange format, we advise to use OGC GeoPackage
instead.
Modifier and Type | Field and Description |
---|---|
static String |
IMAGE_FORMAT_JPEG
Constant for JPEG image compression.
|
static String |
IMAGE_FORMAT_PNG
Constant for PNG image compression.
|
static HashSet<ILcdEarthTileSetCoverage.CoverageType> |
SUPPORTED_COVERAGE_TYPES |
Constructor and Description |
---|
TLcdLRDBModelEncoder()
Creates a new
TLcdLRDBModelEncoder . |
Modifier and Type | Method and Description |
---|---|
void |
addStatusListener(ILcdStatusListener aStatusListener)
Registers the given listener so it will receive status events from this source.
|
boolean |
canExport(ILcdModel aModel,
String aDestination)
Returns whether this encoder can export the specified model to the specified destination.
|
boolean |
canSave(ILcdModel aILcdModel)
Returns whether this model encoder can save the specified model to the location it originally came from.
|
void |
export(ILcdModel aModel,
String aDestination)
Exports the specified model to the specified destination.
|
ILcdBounds |
getAreaOfInterest()
Returns the bounds of the area to encode.
|
ILcdGeoReference |
getAreaOfInterestReference()
Returns the reference the current area to encode is defined in.
|
float |
getCompressionQuality()
Returns the current image compression quality setting.
|
String |
getDisplayName()
Returns a short, displayable name for the format this
ILcdModelEncoder encodes to. |
String |
getImageCompressionFormat()
Returns the current image compression format.
|
int |
getMaximumTileLevel()
Returns the maximum tile level.
|
ILcdGeoReference |
getTargetReference()
Returns the reference rasters will be encoded in.
|
void |
removeStatusListener(ILcdStatusListener aStatusListener)
Removes the specified listener so it is no longer notified.
|
void |
save(ILcdModel aILcdModel)
Saves the model to the location where it originally came from.
|
void |
setAreaOfInterest(ILcdBounds aAreaOfInterest,
ILcdGeoReference aAreaOfInterestReference)
Define the area of the raster to encode.
|
void |
setCompressionQuality(float aCompressionQuality)
Sets the image compression quality setting between 0.0 and 1.0.
|
void |
setImageCompressionFormat(String aImageCompressionFormat)
Sets the format to use when compressing imagery data.
|
void |
setMaximumTileLevel(int aMaximumTileLevel)
Sets the maximum tile level.
|
void |
setTargetReference(ILcdGeoReference aTargetReference)
Sets the target reference to encode the raster in.
|
public static final String IMAGE_FORMAT_PNG
public static final String IMAGE_FORMAT_JPEG
public static final HashSet<ILcdEarthTileSetCoverage.CoverageType> SUPPORTED_COVERAGE_TYPES
public TLcdLRDBModelEncoder()
TLcdLRDBModelEncoder
.public float getCompressionQuality()
setCompressionQuality(float)
public void setCompressionQuality(float aCompressionQuality)
aCompressionQuality
- the new compression quality setting.getCompressionQuality()
public String getImageCompressionFormat()
setImageCompressionFormat(String)
public void setImageCompressionFormat(String aImageCompressionFormat)
aImageCompressionFormat
- the new image compression formatpublic void addStatusListener(ILcdStatusListener aStatusListener)
ILcdStatusSource
Registers the given listener so it will receive status events from this source.
In case you need to register a listener which keeps a reference to an object with a shorter life-time than this status source,
you can use a ALcdWeakStatusListener
instance as status listener.
addStatusListener
in interface ILcdStatusSource
aStatusListener
- The listener to be notified when the status has changed.public void removeStatusListener(ILcdStatusListener aStatusListener)
ILcdStatusSource
removeStatusListener
in interface ILcdStatusSource
aStatusListener
- The listener to remove.public ILcdGeoReference getTargetReference()
public void setTargetReference(ILcdGeoReference aTargetReference)
aTargetReference
- The new target reference.public ILcdBounds getAreaOfInterest()
(
public ILcdGeoReference getAreaOfInterestReference()
getAreaOfInterest()
public void setAreaOfInterest(ILcdBounds aAreaOfInterest, ILcdGeoReference aAreaOfInterestReference)
setTargetReference(com.luciad.reference.ILcdGeoReference)
. Typical input for this method will the bounds of the model
to encode, together with the geo reference of that model.aAreaOfInterest
- the new area to encode.aAreaOfInterestReference
- The reference of the provided bounds.public int getMaximumTileLevel()
public void setMaximumTileLevel(int aMaximumTileLevel)
aMaximumTileLevel
- the new maximum tile level.public boolean canSave(ILcdModel aILcdModel)
ILcdModelEncoder
canSave
in interface ILcdModelEncoder
aILcdModel
- the model to be verified.true
if this encoder can save the model in the location where it originally came from,
false
otherwise.ILcdModelEncoder.save(com.luciad.model.ILcdModel)
public void save(ILcdModel aILcdModel) throws IllegalArgumentException, IOException
ILcdModelEncoder
save
in interface ILcdModelEncoder
aILcdModel
- the model to be saved.IllegalArgumentException
- if the model cannot be saved by this encoder (!canSave(aModel)
).IOException
- if an I/O error occurs during encoding.public String getDisplayName()
ILcdModelEncoder
ILcdModelEncoder
encodes to.getDisplayName
in interface ILcdModelEncoder
ILcdModelEncoder
.public boolean canExport(ILcdModel aModel, String aDestination)
ILcdModelEncoder
canExport
in interface ILcdModelEncoder
aModel
- the model to be verified.aDestination
- the location where the model should be exported to.true
if this encoder can export the specified model to the
specified location, false
otherwise.ILcdModelEncoder.export(com.luciad.model.ILcdModel, java.lang.String)
public void export(ILcdModel aModel, String aDestination) throws IllegalArgumentException, IOException
ILcdModelEncoder
export
in interface ILcdModelEncoder
aModel
- the model to be exported.aDestination
- the location where the model should be saved. Typically, this is a name for the output
file, but it can also point to a file containing the required properties to create a set
of data files.IllegalArgumentException
- if the model cannot be saved by this encoder (!canExport(aModel, aDestinationName)
).IOException
- if an I/O error occurs during encoding.