Loading orthophotos in DigiNG.NET

October 29, 2012 2011 load_f load_raster orthophoto coordinate reference systems

DigiNG.NET considers orthophotos as another type of reference files, so we can load an orthophoto using the command LOAD_F (or using the menu File/Load reference file..., or pressing the corresponding button in the toolbar of the dockable pane Drawing file) and download them with the command LEAVE (or using the menu File/Unload reference file... or using the option Download this file of the context menu that appears when right-clicking on the name of the orthophoto in the pane Drawing file). The commands CARGA_RASTER and DEJAR_RASTER have been removed, so we cannot use them in DigiNG.NET.

Conditions for uploading an orthophoto

DigiNG.NET will allow us to load orthophotos as long as three requirements are met:a capable of recognizing the image format and as long as it knows to locate the georeference of the orthophoto.

  1. Recognize the extent of the image.
  2. That the geo-reference of the image can be located.
  3. That the coordinate system assigned to the drawing window is the same as the coordinate system of the image.

Image formats recognized by DigiNG.NET

DigiNG.NET allows uploading images of the following formats:

Image type **File Extension **
Images in TIFF format .tif
Images in ECW format .ecw
Images in JPEG format 2000 .jp2
Images in MrSID format .sid
Images in JPEG format .jpg
Images in BMP format .bmp

Geo-reference

The orthophoto must be geo-referenced, which means that somewhere information must appear that lets the program know the position of the image as well as its orientation and size.

Geo-referencing consists of informing the coordinates of the four corners of the image (or the coordinate of the first pixel of the image as well as its size and orientation), and the reference coordinate system to which that coordinate/s is referred.

Some image formats allow you to store the geo-reference of the image within the file itself, as metadata.

The formats that support this possibility are the following:

  • TIFF files (which when positioned are called GeoTIFF)
  • ECW Files
  • JPEG files 2000
  • MrSID Files

The other image formats, such as JPEG, BMP do not allow to store in the image itself the geo-reference. If the image does not have internally stored geo-reference information (either because the format does not allow it -such as .bmp- or because it simply does not have this information) an attempt will be made to locate a file World File. The World File file will be tried to locate in the same directory as the image, with the same name as this one, but with an extension that will depend on the extension of the image. There is a convention to name the extension of the World File files, and consists that the World File file has the extension formed by the first and third character of the extension of the image to which a "w" is chained at the end (the w is from World). Below is a table that defines the World File file extensions that DigiNG.NET will try to load if the image is not geo-referenced:

Image type World File file extension
Images in TIFF format (.tif) .tfw
Images in ECW format (.ecw) .eww
Images in JPEG format 2000 (.jp2) .j2w
Images in MrSID (.sid) format .sdw
Images in JPEG format (.jpg) .jg2
Images in BMP format (.bmp) .bpw

The disadvantage of the World File file is that it does not specify the coordinate system on which the coordinate of the center of the first pixel is defined, and as DigiNG.NET requires this data, in the case that the geo-referencement is extracted from a World File file it will be attempted to obtain from a Shapefile Projection Format file. This is a file with the extension .prj that defines the coordinate system on which the coordinate of the World File file is referenced. DigiNG.NET will try to locate that file in the same directory as the image and with the same name, but always with the extension .prj. If this file is not located, the coordinate will be assumed to be referred to a local reference coordinate system. A very important feature when loading the orthophoto is that DigiNG.NET only will allow us to load an orthophoto if its associated coordinate system matches the asset in the drawing window. This is very important: If we are viewing a file in projected (for example ETRS89/UTM Zone 30N) and try to load an orthophoto in geographic DigiNG.NET will not allow us, and will show an error box indicating that we have to change the coordinate system of the drawing window to be able to load that orthophoto. Once the orthophoto is loaded, it will appear as a file in the pane of Drawing file. If we expand the arrow to the left of the orthophoto name, the orthophoto display options will appear:

  • If we change the Visible property to false, the orthophoto will no longer be displayed.
  • If we change the value of Opacity we can make the orthophoto transparent (this option can be useful if we have several orthophotos loaded with overlap). If we put here a value 0 the image will be totally transparent and if we put 255 (which is the default value) it will be completely opaque.
  • If we change the value of Type of interpolation will modify the way in which the pixels are shown when you zoom out or zoom in the orthophoto. If we select the option Bilinear when we zoom in it will give us the false feeling that the image has more resolution. If we select Nearest Neighbor we will see the pixel.

Back to the blog