Package com.luciad.model
Interface ILcdModelReferenceDecoder
- All Known Implementing Classes:
TLcdCompositeModelReferenceDecoder
,TLcdEPSGModelReferenceDecoder
,TLcdModelReferenceDecoder
,TLcdRPCModelReferenceDecoder
,TLcdWKTModelReferenceDecoder
public interface ILcdModelReferenceDecoder
Decodes the
ILcdModelReference
that is associated with a data source.
Some formats do not include information about the coordinate system that is used in their data files. For these
formats, an additional model reference file may be placed next to the data file, providing information about the
coordinate system. ILcdModelDecoder
implementations for these formats often allow to configure an
ILcdModelReferenceDecoder
on them, providing the model decoder with the correct coordinate
system information.- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
A model reference paired with the source file from which it was decoded. -
Method Summary
Modifier and TypeMethodDescriptiondecodeModelReference
(String aDataSourceName) Returns the model reference, associated with the specified data source.findAndDecodeModelReference
(String aDataSourceName) Finds and decodes the model reference file, associated with the specified data source.
-
Method Details
-
decodeModelReference
Returns the model reference, associated with the specified data source.- Parameters:
aDataSourceName
- a data source for which to return the model reference; typically a file name or a URL.- Returns:
- the
ILcdModelReference
associated with the data source. Whilenull
is allowed, implementors are advised to throw an error instead. - Throws:
IOException
- if theILcdModelReference
cannot be decoded.
When the thread on which this method is called is interrupted, it is recommended to stop the decoding and throw anInterruptedIOException
. This same exception can also be used if the decoder shows UI to the user, and the user cancels the decoding through the UI.
-
findAndDecodeModelReference
default ILcdModelReferenceDecoder.ModelReferenceWithSource findAndDecodeModelReference(String aDataSourceName) throws IOException Finds and decodes the model reference file, associated with the specified data source. The default implementation delegates todecodeModelReference(java.lang.String)
and returns the resulting model reference, paired with anull
source, indicating that the source is unknown or does not exist.- Parameters:
aDataSourceName
- a data source for which to return the model reference; typically a file name or a URL.- Returns:
- the decoded
ILcdModelReference
and the location of the reference file. Nevernull
. - Throws:
IOException
- if no model reference file is found, or theILcdModelReference
cannot be decoded.
When the thread on which this method is called is interrupted, it is recommended to stop the decoding and throw anInterruptedIOException
. This same exception can also be used if the decoder shows UI to the user, and the user cancels the decoding through the UI.- Since:
- 2022.0
-