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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether this encoder can export the specified model to the specified destination.booleanReturns whether this model encoder can save the specified model to the location it originally came from.voidExports the specified model to the specified destination.Returns a short, displayable name for the format thisILcdModelEncoderencodes to.Returns the output stream factory that is used.voidSaves the model to the location where it originally came from.voidsetOutputStreamFactory(ILcdOutputStreamFactory aOutputStreamFactory) Sets the output stream factory to be used.voidsetXOffset(long aXOfsset) Sets the offset for X-values.voidsetXYMultiplicationFactor(int aXYMultiplicationFactor) Sets this multiplication factor of the X- and Y-coordinates.voidsetYOffset(long aYOfsset) Sets the offset for Y-values.voidsetZMultiplicationFactor(double aXYMultiplicationFactor) Sets this multiplication factor of the Z-coordinates.voidsetZOffset(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:ILcdOutputStreamFactoryCapableSets the output stream factory to be used.- Specified by:
setOutputStreamFactoryin interfaceILcdOutputStreamFactoryCapable- Parameters:
aOutputStreamFactory- the output stream factory to be used.
-
getOutputStreamFactory
Description copied from interface:ILcdOutputStreamFactoryCapableReturns the output stream factory that is used.- Specified by:
getOutputStreamFactoryin interfaceILcdOutputStreamFactoryCapable- Returns:
- the output stream factory that is used.
-
getDisplayName
Description copied from interface:ILcdModelEncoderReturns a short, displayable name for the format thisILcdModelEncoderencodes to.- Specified by:
getDisplayNamein interfaceILcdModelEncoder- Returns:
- the displayable name of this
ILcdModelEncoder.
-
canSave
Description copied from interface:ILcdModelEncoderReturns 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:
canSavein interfaceILcdModelEncoder- Parameters:
aLcdModel- the model to be verified.- Returns:
trueif this encoder can save the model in the location where it originally came from,falseotherwise.- See Also:
-
save
Description copied from interface:ILcdModelEncoderSaves the model to the location where it originally came from.- Specified by:
savein 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:ILcdModelEncoderReturns 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:
canExportin interfaceILcdModelEncoder- Parameters:
aLcdModel- the model to be verified.s- the location where the model should be exported to.- Returns:
trueif this encoder can export the specified model to the specified location,falseotherwise.- See Also:
-
export
public void export(ILcdModel aModel, String aSourceName) throws IllegalArgumentException, IOException Description copied from interface:ILcdModelEncoderExports the specified model to the specified destination.- Specified by:
exportin 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.
-