Package com.luciad.format.gdf
Class TLcdGDFModelEncoder
java.lang.Object
com.luciad.format.gdf.TLcdGDFModelEncoder
- All Implemented Interfaces:
ILcdOutputStreamFactoryCapable
,ILcdModelEncoder
,Serializable
@LcdService(service=ILcdModelEncoder.class,
priority=20000)
public class TLcdGDFModelEncoder
extends Object
implements ILcdModelEncoder, ILcdOutputStreamFactoryCapable
This ILcdModelEncoder encodes GDF models.
- Since:
- 5.1
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns whether this encoder can export the specified model to the specified destination.boolean
Returns whether this model encoder can save the specified model to the location it originally came from.void
Exports the specified model to the specified destination.Returns a short, displayable name for the format thisILcdModelEncoder
encodes to.Returns the output stream factory that is used.void
Saves the model to the location where it originally came from.void
setOutputStreamFactory
(ILcdOutputStreamFactory aOutputStreamFactory) Sets the output stream factory to be used.void
setXOffset
(long aXOfsset) Sets the offset for X-values.void
setXYMultiplicationFactor
(int aXYMultiplicationFactor) Sets this multiplication factor of the X- and Y-coordinates.void
setYOffset
(long aYOfsset) Sets the offset for Y-values.void
setZMultiplicationFactor
(double aXYMultiplicationFactor) Sets this multiplication factor of the Z-coordinates.void
setZOffset
(long aZOfsset) Sets the offset for Z-values.
-
Constructor Details
-
TLcdGDFModelEncoder
public TLcdGDFModelEncoder()
-
-
Method Details
-
setXYMultiplicationFactor
public void setXYMultiplicationFactor(int aXYMultiplicationFactor) Sets this multiplication factor of the X- and Y-coordinates. Each X- and Y-coordinate will be multiplicated by the given multiplication factor when it is stored to disk. The multiplication factor should be a given as the 10LOG of the intended multiplication factor. E.g., for a multiplication factor 100000, 5 should be given as an argument. (required by the GDF specification).- Parameters:
aXYMultiplicationFactor
- the multiplication factor for X- and Y-coordinates.- Throws:
IllegalArgumentException
- ifaXYMultiplicationFactor < -9 || aXYMultiplicationFactor > 9
.
-
setZMultiplicationFactor
public void setZMultiplicationFactor(double aXYMultiplicationFactor) Sets this multiplication factor of the Z-coordinates. Each Z-coordinate will be multiplicated by the given multiplication factor when it is stored to disk. The multiplication factor should be a power of 10 (1,10,100,1000,...) (required by the GDF specification).- Parameters:
aXYMultiplicationFactor
- the multiplication factor forZ-coordinates.
-
setXOffset
public void setXOffset(long aXOfsset) Sets the offset for X-values. Each X-value will be decreased by the given offset before it is stored to disk.- Parameters:
aXOfsset
- the offset for X-values.
-
setYOffset
public void setYOffset(long aYOfsset) Sets the offset for Y-values. Each Y-value will be decreased by the given offset before it is stored to disk.- Parameters:
aYOfsset
- the offset for X-values.
-
setZOffset
public void setZOffset(long aZOfsset) Sets the offset for Z-values. Each Z-value will be decreased by the given offset before it is stored to disk.- Parameters:
aZOfsset
- the offset for X-values.
-
setOutputStreamFactory
Description copied from interface:ILcdOutputStreamFactoryCapable
Sets the output stream factory to be used.- Specified by:
setOutputStreamFactory
in interfaceILcdOutputStreamFactoryCapable
- Parameters:
aOutputStreamFactory
- the output stream factory to be used.
-
getOutputStreamFactory
Description copied from interface:ILcdOutputStreamFactoryCapable
Returns the output stream factory that is used.- Specified by:
getOutputStreamFactory
in interfaceILcdOutputStreamFactoryCapable
- Returns:
- the output stream factory that is used.
-
getDisplayName
Description copied from interface:ILcdModelEncoder
Returns a short, displayable name for the format thisILcdModelEncoder
encodes to.- Specified by:
getDisplayName
in interfaceILcdModelEncoder
- Returns:
- the displayable name of this
ILcdModelEncoder
.
-
canSave
Description copied from interface:ILcdModelEncoder
Returns whether this model encoder can save the specified model to the location it originally came from. Often this will only be a simple test, for example checking the type of the model's model descriptor.- Specified by:
canSave
in interfaceILcdModelEncoder
- Parameters:
aLcdModel
- the model to be verified.- Returns:
true
if this encoder can save the model in the location where it originally came from,false
otherwise.- See Also:
-
save
Description copied from interface:ILcdModelEncoder
Saves the model to the location where it originally came from.- Specified by:
save
in interfaceILcdModelEncoder
- Parameters:
aLcdModel
- the model to be saved.- Throws:
IllegalArgumentException
- if the model cannot be saved by this encoder (!canSave(aModel)
).IOException
- if an I/O error occurs during encoding.
-
canExport
Description copied from interface:ILcdModelEncoder
Returns whether this encoder can export the specified model to the specified destination. This method will typically check whether the contents of the specified model are compatible with the format this encoder is written for.- Specified by:
canExport
in interfaceILcdModelEncoder
- Parameters:
aLcdModel
- the model to be verified.s
- the location where the model should be exported to.- Returns:
true
if this encoder can export the specified model to the specified location,false
otherwise.- See Also:
-
export
public void export(ILcdModel aModel, String aSourceName) throws IllegalArgumentException, IOException Description copied from interface:ILcdModelEncoder
Exports the specified model to the specified destination.- Specified by:
export
in interfaceILcdModelEncoder
- Parameters:
aModel
- the model to be exported.aSourceName
- 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.- Throws:
IllegalArgumentException
- if the model cannot be saved by this encoder (!canExport(aModel, aDestinationName)
).IOException
- if an I/O error occurs during encoding.
-