Presentation and options Dialog box of the application
Graphic examples Syntax

Presentation and options

Introduction

Conventional paper maps give us an enormous amount of information which can be incorporated in to a Geographic Information System (GIS). Although more and more maps are now generated digitally there are still many cases in which digital files are not available, either because we are dealing with documents of a certain age, or because they have been created using conventional analogue techniques, or simply because we don't have access to the original digital information.

In these cases, although digitisation using a digitising table may be a possibility it requires a laborious effort and a loss of detail compared to the possibility of scanning the digital document and proceeding to its digitisation on the computer screen.

MiraMon allows documents from practically any scanner (in formats BMP, TIFF, JPG, etc) to be transformed to IMG or JPG formats (if they were not already in one of these formats). Once in these formats it is possible to digitise over them the contour lines, roads, land use polygons, etc and convert them in to vector layers. As the scanned documents are still not georeferenced when we digitise directly over them the resultant vector coordinates will be in some arbitrary units (pixels) of the scanning system and not in the map units of the desired georeferenced coordinate system (for example, in meters in the UTM system). Although it is possible to proceed in this way and to georeference the resultant vector document after digitising using the MiraMon CorrGeom program, it is advisable to georeference the raster first and then to proceed to its digitisation. This will also allow map sheets to be scanned separately and then precisely mosaiced together as well as permitting them, once georeferenced, to be displayed with any other available digital vector information layer overlain for reference. Georeferencing of scanned raster files can also be performed using the MiraMon CorrGeom program. So, in summary, there are two alternatives for introducing vector layers into GIS from scanned paper documents using the CorrGeom MiraMon program:

In both cases the recommended method is the first order polynomial fit. In the very unlikely case, given the quality of modern scanners, that the scanned images show quadratic distortions, use the second order polynomial fit.

There exist a number of other interesting sources of information for incorporation in our GIS: such as raster layers like remotely sensed images and aerial photography. These data can be obtained directly in digital format (this is the case for the majority of remotely sensed images) or, alternatively, they may be available in paper or photographic form (the usual case for conventional aerial photography) which can be scanned to convert them into digital images.

Remotely sensed images present a series of geometric distortions produced by the rotation and curvature of the Earth, the irregularities of the platform's orbit, etc. The MiraMon CorrGeom program allows such images to be corrected to remove these distortions using conventional techniques based on first and second order polynomials. In the case of aerial photographs and remotely sensed images with a high level of detail (50m or smaller pixel size) it is advisable to perform corrections taking into account the effect of the relief of the land surface. CorrGeom offers the methods "polynomial fit with heights" for satellite images with small pixels (Landsat TM, SPOT XS and P, IRS LISS, etc) and "colinearity equations fit" for aerial photographs which applies fundamental photogrammetric equations. The images that have been corrected using information about the relief contained in a Digital Elevation Model (DEM) are known as orthoimages (or orthophotos in the case of aerial photos).

The CorrGeom program therefore allows the correction of these distortions (due to the platform's orbit, the relief, etc) and adapts the images to a known cartographic projection system, such as UTM. Once in the appropriate projection system the images can be overlain with other images and vector layers referenced to the same projection system.

Whether correcting raster or vector data it is usual to have a set of ground control points (GCP) which indicate a number of coordinate points in both the uncorrected original reference system and in the final, corrected, reference system. The GCPs can be input with a text editor or digitised as points in MiraMon and converted into GCPs with VECCOR (see below).
In the case of images acquired with a system for which the position and attitude of the sensor are known with precision (GPS+INS) it is possible to do the correction without GCPs.

To increase the statistical reliability of the geometric correction process CorrGeom allows a control points file to contain two subsets of points, one that is used to determine the transformation equations for the fit and the other, which we call the test points, that is used to estimate the error of the fit based on an independent set of points. For both sets of points CorrGeom provides the RMS error in X, Y and globally for each point as well as for the set of control points. Logically, if only one set of points is given then the RMS errors are only given for this set.

If the user wishes to change the projection system, whether of raster or vector datasets, once they have been georeferenced with MiraMon (or if they were imported into MiraMon with georeferences) then the MiraMon program CanviPrj can be used. Do not confuse the functions of CorrGeom that allows non-georeferenced layers to be georeferenced and CanviPrj that changes the projection of layers for which the georeference is already known.

NOTES:

  1. When we speak of a projection system we are referring to UTM, Lambert, etc, whilst when we speak of a reference system we are referring to, for example, UTM-31N-UB/ICC (ie. the UTM with huso 31, Northern hemisphere, European ED50 datum with the UB/ICC adjusted parameters), or Goode_Homolosine-WGS84 (Goode Homolosine WGS84 with the WGS 1984 datum), etc. (see the help on Geodesia for more information)
  2. From now on we refer to images and vectors that have been adapted to some reference system using CorrGeom as "corrected".

CorrGeom

The CorrGeom application allows the geometric correction of rasters (IMG and JPG: satellite images aerial photographs, scanned maps...) or vector layers (VEC, PNT, ARC and their derivatives POL and NOD) using a series of n known control points:

In addition, the program allows to apply affine transformations (translations, rotations, tilts, scaling and mirrors) and perspective to both rasters and vectors.

All the bands of a multiband raster (typically a 24 bit RGB or a multispectral satellite image) can be geometrically corrected simultaneosuly by using the /MULTIBANDA parameter or by activating the corresponding button. All the bands will then be corrected in a single operation whilst maintaining a multiband raster as the output. In this case we recommend editing the control points using the band with the highest resolution. If the correction requires the use of a digital elevation model (DEM) and the different bands have different pixel sizes it is possible to use a multiband DEM with as many bands as there are different pixel sizes by activating the parameter /MDE_MULTIBANDA.

The correction can be performed using various methods:


Note on the COR file format:

COR files contain the ground control points and, optionally, test points, in the following format:

 Number_of_points [Comments]
 X_OriSyst1 Y_OriSyst1 X_DestSyst1 Y_DestSyst1 [Z_DestSyst1] [Comments1]
     :          :          :           :            :            :

This format can be generated with a text editor or from a file of points digitised over the original file. This file can be easily transformed to COR format using the VECCOR program.


For raster images and for program options that do not require input of either the resolution or the bounding rectangle of the output file, these parameters are taken from the DEM documentation file. The maximum envelope values of the output file are adapted as a function of the value of the output resolution (res) using the following expression:

    Xmax = Xmin + res * rounding_by_ceiling (Xmax-Xmin/res)
    Ymax = Ymin + res * rounding_by_ceiling (Ymax-Ymin/res)

The number of rows and columns of the output image can be determined from:

    Ncolumns = rounding_by_ceiling (Xmin-Xmin/res)
    Nrows = rounding_by_ceiling (Ymax-Ymax/res)

The background or NoData value will be written in the corrected filewhen the uncorrected file has no data for the output cells in that position.The user may choose the NODATA value or allow the program to set this. Bydefault it will be the same as the input, if this exists or, if there are noNODATA values in the original data, the default is 255 for byte/byte-RELimages or the smallest allowable negative value for all other formats. If theimage to be corrected is byte/byte-REL and has no defined NODATA value, and ifwhen it is corrected NODATA values are generated then by default the originalvalid values that in the output correspond to NODATA will be saturated. In 24bit images reduced to 8 bits with an optimised palette this can lead to anincorrect visualisation so consequently an option is given for the program toreclassify these values to the closest colour index so that the displayremains practically unchanged.

The program supports digital elevation models of type BYTE, INTEGER (short) and REAL, compressed and uncompressed.


Dialog box of the application

CorrGeom dialog box


Graphic examples

First degree polynomial corrections

Detail of the placement of a control point at the UTM-06N coordinate (453000,7194000),
North America datum 1983, on a 1:25000 USGS topographic map in Alaska Fairbanks.
The careful placement of a point at each of the 4 ends of the map allows to obtain, georeferenced,
the cartographic document with an RMS that has an adjustment of 28 cm with the scanned document
(in reality, since the map is at a scale of 1:25000 the real RMS on the ground must be about 5 m).

Polynomial corrections with Z

Adjustment points located on a SPOT image ((c) SPOT-Image) General aspect of the correction of the previous SPOT image on
an ICGC orthophoto (areas with NoData are shown transparent).
Detail of the correction of the previous SPOT image compared to an image from the ICGC. The reference grid has a side of 1 km.

Corrections with collinearity equations

Adjustment (A) and test (T) points located in a frame from the Cartographic and Geological Institute of Catalonia (ICGC). Detail of the correction of the previous frame, converted into an orthophoto (left) compared with an orthophoto from the ICGC (right) in order to appreciate the very good geometric fit achieved. Each pixel in the image corresponds to 50 cm.

Syntax examples

For raster images:

For vector files

For geometric transformations (afines and perspective):

6.5 units translation in positive vertical direction:

7 units translation in negative horizontal direction:

45 degrees clockwise rotation:

45 degrees anticlockwise rotation:

Scaling ratio 2 (in both directions: vertical and horizontal) plus 90º clockwise rotation:

Slight inclination in horizontal right direction:

50% inclination in horizontal left direction:

Perspective of points in a raster which has a perspective (of 0.5).
Supose that the envelope of the raster is (XMIN, YMIN)=(0,10), (XMAX, YMAX)=(4500, 6000)

Rotation of points in a raster which has been also rotated (45º).

Supose that the envelope of the raster is (XMIN, YMIN)=(0,10), (XMAX, YMAX)=(4500, 6000)

Notice that if we don't apply the optative parameters, these points won't adapt to the modified raster.

Scaling from cm to m and after translate 4000000 m in Y's. The arguments of affine transformations are transformed for the program itself, so, we can think this operation as: Scaling from cm to m. Traslate 400000000 cms in Y's.

For adjustment based on reference points:


Syntax

Syntax:
Options for raster files (IMG):
CorrGeom  1/2  cor cor_s  f_i.img  f_s int xm  xM  ym  yM   res
CorrGeom 3/4/5 cor cor_s  f_i.img  f_s int MDE
CorrGeom   6   cor cor_s  f_i.img  f_s int MDE dpi iter op_posicio op_actitud op_focal op_ppral
CorrGeom   7   f_i.img  f_s int [T Tx Ty][E Ex Ey][I Id Ir][R g][P Pr][M Md][...]
Options for structured vector files (PNT, ARC):
(Note that the correction of POL and NOD files is achieved by correcting the corresponding ARC file)
CorrGeom 1/2 cor cor_s f_i.pnt f_s
CorrGeom 1/2 cor cor_s f_i.arc f_s
CorrGeom   7 f_i.pnt  f_s [T Tx Ty][E Ex Ey][I Id Ir][R g][P Pr][M Md][...]
CorrGeom   7 f_i.arc  f_s [T Tx Ty][E Ex Ey][I Id Ir][R g][P Pr][M Md][...]
Options for non-structured vector files (VEC):
CorrGeom 1/2 cor cor_s f_i.vec f_s [n_decimals]
CorrGeom   7 f_i.vec  f_s [T Tx Ty][E Ex Ey][I Id Ir][R g][P Pr][M Md][...]
Specific mandatory parameters for geometric transformations (related and perspective) Some examples of geometric transformations (related and perspective) are available below.

Optional parameters:

Optional parameters specific to the collinearity equations: