What is georeferencing?

To visualize any data on a map, you need to provide positioning information to the geospatial application. To make the data available for geospatial visualization and analysis, LuciadLightspeed and LuciadFusion applications need to know the bounding box of the data, and the coordinate reference system in which these values have been specified. If the data does not provide that information in the file header or in an additional file, you will receive error messages when you try to decode the data. This is typically the case for raster-based images such as JPG or PNG files.

Using Lucy to specify the georeference

The easiest way to georeference your data is opening it in the Lucy application. Lucy will present you with a comprehensive list of georeferences to choose from. The georeferences can be grid references, for coordinates in meters, or geodetic references, for coordinates in degrees. You can save the reference as a file alongside the data.

Using a reference file

If you know the WKT string or EPSG code of the reference, you can store a .PRJ or .EPSG file next to your data. Most software based on LuciadLightspeed or LuciadFusion automatically picks up the file, and uses it to properly decode your data.

If you’re georeferencing one file, give the .PRJ or .EPSG file the same name as the data file. If you want to add a reference file for all the data files in a directory, call the reference file directory.PRJ or directory.EPSG.

For more information about the supported WKT and EPSG references, see the TLcdWKTModelReferenceDecoder and TLcdEPSGModelReferenceDecoder classes.

For a walkthrough of how to use a reference file with raster-based image files without a georeference, see How to add an image without a georeference to a view.

Using custom reference files

If you store the georeference information in a format that none of the standard ILcdModelReferenceDecoder instances can read, you can register your own implementation as a service, and our model decoders will pick it up.

  • For more information about using the @LcdService mechanism in LuciadLightspeed or LuciadFusion, see the Services Mechanism documentation.

Using a default reference

Some model decoders allow you to specify a default model reference. If the source data for a decoded model doesn’t specify a model reference, the model decoder assigns the default model reference to the model.