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:
  • Method Details

    • decodeModelReference

      ILcdModelReference decodeModelReference(String aDataSourceName) throws IOException
      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. While null is allowed, implementors are advised to throw an error instead.
      Throws:
      IOException - if the ILcdModelReference cannot be decoded.
      When the thread on which this method is called is interrupted, it is recommended to stop the decoding and throw an InterruptedIOException. 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 to decodeModelReference(java.lang.String) and returns the resulting model reference, paired with a null 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. Never null.
      Throws:
      IOException - if no model reference file is found, or the ILcdModelReference cannot be decoded.
      When the thread on which this method is called is interrupted, it is recommended to stop the decoding and throw an InterruptedIOException. 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