Some data formats do not specify the geographic reference although they may contain geospatial data. Although you can have a GIF file of a map that represents geospatial data, the GIF format does not contain any provisions for embedding the information of the model reference inside the file.

In such cases, you need to store the model reference information at another location, which implies that it must also be decoded from that location. This is the purpose of the ILcdModelReferenceDecoder.

If you need to decode the model reference in some system-specific manner, you can write your own implementation of ILcdModelReferenceDecoder to implement the specific behavior, and add that to the Lucy back-end using addModelReferenceDecoder. Your add-on and other add-ons can then use the composite model reference decoder — which you can retrieve through getCompositeModelReferenceDecoder-- to decode the model reference of files that do not have this information embedded.

This mechanism gives you and other add-on writers the ability to decode the model references in a system-agnostic manner. For example, a system running your Lucy application may store the model references in a central database. The specifications for retrieving the georeference from this database may not be available, so you cannot write code that accesses this database. In Lucy, it is sufficient for the users of this system, who do have access, to write and register an implementation of ILcdModelReferenceDecoder that accesses the database and retrieves the model reference.

Lucy already comes with several model reference decoders: one that can decode the model reference from a .ref file next to the actual data file, one that can decode coordinate reference systems in the Well-Known Text format, and one that presents the user with a dialog to enter the information.