CONVERTIMAGE — Convert Image
Converts ECW, MrSID or JPEG 2000 images to GeoTIFF with GDAL and attaches them.
- Command:
CONVERTIMAGE· Global name:_CONVERTIMAGE· Alias:CONVERTIRIMAGEN - Ribbon: Insert › Image and tracing
Converts the attached images that LinceCAD cannot read (ECW, MrSID and JPEG 2000) to GeoTIFF and attaches the result in their place. In Spain, the CNIG's PNOA orthophotos are distributed as ECW: with this command they can be viewed and plotted.
The conversion is done by GDAL, installed separately as an external program: LinceCAD neither includes nor installs it.
Usage
- Enter CONVERTIMAGE or click the button on the Insert tab. It also opens from the warning shown when a drawing with such images is opened, and from the XREF window (the image's Convert with GDAL… button or its shortcut menu).
- The Convert Images with GDAL dialog shows the GDAL found and the drawing's images that cannot be read, all checked. Uncheck the ones you do not want to convert. In Standalone file: you can also convert a file that is not in the drawing (it is not attached).
- Click Convert. The conversion runs in the background, with its progress and Cancel: you can keep working meanwhile.
- When each image is done, its path in the drawing changes to the GeoTIFF and it is reloaded:
… converted to … (… MB) and attached.
Where GDAL is looked for
In this order: the GDAL_HOME variable, gdal_translate on the PATH, OSGeo4W (C:\OSGeo4W\bin and C:\OSGeo4W64\bin), QGIS (C:\Program Files\QGIS …\bin, the newest version) and the folder chosen with Choose GDAL folder…, which is saved in the preferences. Of those found, the first one that reads all the needed formats is used (gdalinfo --formats).
If there is no GDAL, the dialog says so and offers the download: QGIS (recommended, because its installer includes the ECW and MrSID drivers) at qgis.org/download or OSGeo4W at trac.osgeo.org/osgeo4w. After installing it, click Search again. If the GDAL found cannot read ECW, install QGIS or, in OSGeo4W, the gdal-ecw package.
The file created
- Tiled GeoTIFF (
TILED=YES,BIGTIFF=IF_SAFER) with DEFLATE compression and horizontal predictor: lossless and fast to read in tiles. - Same size in pixels and same georeferencing: the image covers exactly the same place in the drawing.
- Next to the original, with the same name and the
.tifextension (if it already exists, "name (2).tif": nothing is ever overwritten). If that folder is not writable, in the Output folder: folder. - The original is not deleted.
Notes
- The new path is of the same type as the image had: relative to the drawing's folder or full.
- The path change is undone with U like any other change; when saved, the drawing points to the
.tif. - In a script, without dialogs, CONVERTIMAGE directly converts all the images it can.
- Until it is converted, the image is shown as a frame with its name and the text "Unsupported format", different from that of a file that is not found.
See also
-IMAGE · IMAGEATTACH · GEOIMAGE · Raster images · Georeferencing