gvSIG-Desktop 1.10. User Manual
Geographic Transformations
Geolocation
The Geolocation tool provides the ability to change the related transformation that is applied to a raster in its display. A raster could have coordinates that place it in a geographical position. This geographic location is only a change of position, scale and rotation of the image relative to an original position. These changes in position, scale and rotation are those that can be changed with this tool. This can be done numerically and by visual approximation.
This tool does not provide capabilities to deal with complex projections and georeferencing involving the need for resampling.
To launch the geolocation dialogue of the layer, the drop-down toolbar is used by selecting "Geographical Transformations" on the left button and "Geolocation" on the dropdown button on the right. Make sure that the text shows the name of the layer to which we like to assign the transformation.
Upon activating the geolocation tool on a raster layer, a small dialog will appear floating on the view with a series of text entries and a button bar. Also the raster layer that has been selected acquires the capacity to be moved, rotated or moved by clicking and dragging it to the right place on the view.
Transformation on the view
- Translation: When the geolocation tool is active you can move the mouse over the image on the screen and the cursor changes to a hand. This indicates that we can move by clicking and dragging on the raster view.
- Scaling: When the geolocation tool is active you can move the mouse over the edges of the image on screen and the mouse cursor will change. Depending on the chosen edge the cursor will take one form or another. If placed in the top or bottom borders the cursor will become a vertical arrow. This indicates that we can click and drag to scale the image from one side only. The scaling at all times keep the proportions of the raster. If we move the cursor around the side edges the pointer becomes a horizontal arrow now allowing us to scale laterally. In the case of the corners the cursor appears as an oblique arrow.
- Rotation: When the geolocation tool is active, we can move the mouse over the outer corners of the image and the cursor will change. This will appear as a circular arrow. This indicates that we can begin to rotate the raster from the selected corner.
- Shear: When the geolocation tool is active you can move your mouse over the outer side edges of the image and the mouse cursor will change. This will appear as an arrow with a symbol X or Y depending on whether the mouse is in the horizontal or vertical edges respectively. This indicates that we can begin to warp the raster in the direction of the X or the Y.
Transformation by introducing coordinates
From the geolocation floating box we can modify the transformation of the image on the view. The text entries marked as X, Y, Pix X, Pix Y, Rot X, Rot Y contain the current position in upper left X coordinate, upper left Y coordinate, pixel size in X, pixel size in Y, rotation in X and rotation in Y respectively. If we change these values from the keyboard these will be updated on the image by pressing the "Enter" key while the cursor is inside the text box or when it loses focus.
Controls of the geolocation box
Centering the raster layer in the view: With this button we center the raster in the current view regardless of zoom it has selected. The coordinates will be automatically calculated.
- Initialize the raster transformation: Resets all the transformations that have been applied to the cells back to the default.
- Go to the first processing: Assign the first transformation that was applied.
- Go to the previous transformation: Assign the previous transformation to the current that was applied.
- Go to the next transformation: Assigns the following to the current transformation.
- Upload georeferencing from tfw file: If we have a tfw file with georeferencing coordinates, these can be loaded with this option. A dialog to select the file you want will show up. The extension of the file must be tfw or wld.
- Save current transformation as the default for the raster: Applying this option saves the currently active transformation in the file .rmf attached to raster. Next time the raster is loaded will be with that transformation.
Georeferencing
Description
Direct traslation from Google traslator
To launch the georeferencing dialog it is used the dropdown toolbar selecting the "Geographic Transformations" button on the left and "Georeferencing" from the dropdown button on the right.
Initially we must decide what type of georeferencing to implement, "reference maps" or "without reference maps".
Georeferencing with "Mapping Reference"
Start Dialogue georeferencing
To implement this type of georeferencing is imperative that we have previously charged in a view mapping that we will provide a geographic reference for taking control points. In case of not having it will close the options dialog georeferencing and proceed to prepare for the hearing. Once we have the view with reference maps georeferencing tool launched will see that the option "reference maps" is checked by default. Below is a dropdown menu which lists the views that gvSIG has at that time. If you have several it must select a view which is our base mapping for decision-points.
In the panel marked "a georeferenced file" pops up a dialog for selecting the file for which you want to create checkpoints and later georeferencing.
The panel labeled "Output File" we must put the path and file name destination if the georeferencing is done with resampling. This option can vary from box options once we are inside the application, so it is not essential to a correct value at the moment, but if must be done before the end of the process.
The panel "georeferencing algorithm" select how we will get the output result. There are two possibilities, "affine transformation" and "polynomial transformation".
The affine transformation applied to raster an affine transformation only to the calculations performed with the control points taken. The affine transformation applied will be allocated "on the fly" for the display and the output image is the same as the input. The result of this transformation is therefore a georeferencing file. Keep in mind that this type of transformation is limited and the user will be responsible for selecting the most convenient transformation in each case.
The polynomial transformation involves a resampling of the input image taking into account the reference control points and obtaining an output image with deformations necessary to adapt to the new location. If you select this option we will be forced to decide the degree of transformation that we apply and the type of interpolation that we want to apply for calculating new pixels. Depending on whether you choose one degree or another need a minimum number of control points for them. This number of points required is given by the formula (order + 1) * (order + 2) / 2, ie for a polynomial of degree one will be needed at least three points, to grade two will need six points for third grade ten points ... The interpolation method affects the way we calculate the information that we have not. When an image georeferenced output image has deformations with respect to the original there are areas where no information is available. These can not be empty with what must be calculated from the areas where we know. These calculations can be performed by various methods, the simplest of these is "Nearest neighbor" which will be unknown pixel information closest known pixel. Other methods such as "bilinear" or "bicubic" make calculations using the known group of pixels surrounding the unknown. These other methods give a more relaxed but it is slower in its implementation. This option can vary from box options once we're inside the application.
The panel "Pixel Pitch" is the pixel size information of the output image. In principle this will be calculated from the input image but can be changed manually. This option can vary from box options once we are inside the application, so it is not essential to a correct value at this time.
The views
Executing the application are two views. The left contains the base mapping that we carry in the gvSIG view of the right and the image we want to georeference. Both have a control bar on the right for view actions. Also in the upper left corner are the coordinates of the mouse cursor. In reference mapping coordinates are those of the real world. In the image to be georeferenced coordinates in pixel coordinate on the upper left.
Cursor Zoom
In the central part appears a cursor with a central window. The window cursor is active when the view can be resized and moved. The contents of this window will be on display in the zoom windows. Ca da vista has its associated zoom window at the bottom. Par resize window cursor select the view you want by clicking on it then bring the mouse to the edges of the window until the pointer changes to horizontal or vertical arrows. Now we click and drag to force the resizing. To move the cursor window select the view you want by clicking on it then bring the mouse to the corners of the window until the pointer changes by crossed arrows. We must now drag and drop to force displacement.
View Controls
There are six controls to handle the zoom level and position of the view mapping Increase the level of zoom: the zoom level increases by multiplying by 2 the current level.
Decrease zoom level: it decreases the zoom level by dividing by 2 the current level.
Zoom area selection: Activates a tool on the hearing in order to make a rectangle the area we want to see enlarged.
Full Zoom: Put a zoom level so that you can view the entire mapping.
Zoom Previous: Sets the zoom level that you previously selected.
Displacement: clicking and dragging on the scroll view mapping.
Zoom controls
Each view has an associated georeferencing zoom window centered over the cursor. When we move the cursor on the sale of view varies the position where the zoom and focus when we change the window size changes the zoom level. In the upper left corner of the window coordinates of the mouse cursor as in the overview.
Checkpoints
A control point is an entity that provides a correspondence between a geographic coordinate and pixel coordinate. Control points are represented in raster geographic view as Blue-and red circles respectively. To add a new control point is selecting "New" in the table control. This makes a new entry in the table appears. A control point is associated with a table entry. By selecting "New" automatically creates a point at coordinates 0, 0 for both views and will activate the tool "move point". Now clicking on the view point where we will move puncture. We assign the coordinate point numerically by writing directly on the input value in the table (X for the geographic coordinates X, Y geographic coordinate for Y, X 'for X and Y pixel coordinate' for the pixel Y coordinate). The points can also be moved by clicking and dragging on them. This may be done both in hearings and in the zooms.
Options
The panel labeled "Output File" we must put the path and file name destination if the georeferencing is done with resampling.
The panel georeferencing algorithm "select how we will get the output result. There are two possibilities, "affine transformation" and "polynomial transformation".
The affine transformation applied to raster an affine transformation only to the calculations performed with the control points taken. The affine transformation applied will be allocated on the fly for the display and the output image is the same as the input. The result of this transformation is therefore a georeferencing file. Keep in mind that this type of transformation is limited and the user will be responsible for selecting the most convenient transformation in each case.
The polynomial transformation involves a resampling of the input image taking into account the reference control points and obtaining an output image with deformations necessary to adapt to the new location. If you select this option we will be forced to decide the degree of transformation that we apply and the type of interpolation that we want to apply for calculating new pixels. Depending on whether you choose one degree or another need a minimum number of control points for them. This number of points required is given by the formula (order + 1) * (order + 2) / 2, ie for a polynomial of degree one will be needed at least three points, to grade two will need six points for third grade ten points ... The interpolation method affects the way we calculate the information that we have not. When an image georeferenced output image has deformations with respect to the original there are areas where no information is available. These can not be empty with what must be calculated from the areas where we know. These calculations can be performed by various methods, the simplest of these is "Nearest neighbor" which will be unknown pixel information closest known pixel. Other methods such as "bilinear" or "bicubic" make calculations using the known group of pixels surrounding the unknown. These other methods give a more relaxed but it is slower in its implementation.
The panel "Pixel Pitch" is the pixel size information of the output image. In principle this will be calculated from the input image but can be changed manually.
The panel labeled "Options" contains settings of a different nature. Since we can change the background color of view, the text color of the views. The "show the number of graphically checkpoint" will be displayed or hidden by the control point a point that indicates the corresponding point number. "Add the CSV file errors" will be generated when this type of text files with all the control points we can ignore the file or add the calculated errors. The "Focus the selected point view" makes automatically every time we select a point on the table the view is focused on this. The effect is much as if the tool center point was always active. The "error threshold for the warning," assigns the value at which the error appears in red on the table.
Points Table
The points table is below the sights and initially will be empty. Each table entry corresponds to a checkpoint. It appears all the information related to a point. This table can see it folded its default state or maximized. In its maximized state are folded more information. On the left side of the row there is a check to activate and deactivate the current row. This means that this point will not be displayed graphically or be taken into account for calculation errors and will be prosecuted to do a test. The information can be found in the points table on each point:
- Number of point
- Real coordinate X
- Real coordinate y
- Coordinate pixel X
- Coordinate pixel Y
- Error in X
- Error in Y
- Total RMS error for that point
The quality of the geometric correction can be estimated based on the mean square error RMS error and the contribution of each point. When the contribution to RMS of a point is high, this may indicate that the correspondence of points was poorly selected and the point is not well suited to model transformation between image and map or other information used as reference. The points with high contribution that exceeds a certain threshold can be deleted or deactivated, and calculate the RMS. However, when we are fully confident of the location of a point, and to find you, the RMS is triggered, it may be possible that the geometric model does not resolve the local arrangements, for which they may need a better model, which means, put some more points, right on the problem area.
There is also a global RMS error in an external text field for all points.
Controls
Tool center point: When you press the focus control to the view point that is selected.
Georeferencing operation completes. Before you ask if we carry on the gvSIG view the results of the last trial. You'll also want confirmation of application output.
Launching the options dialog.
Make a test with the control points currently entered. If there are not enough for the specified algorithm will warn. The result is that applying the transformation and loading the transformed image on the view with the reference maps.
Save the control points in the metadata file attachment with the raster.
Retrieves the control points that are in the metadata file attached to raster.
Ends the test of processing the raster. Eliminate the test image loaded in the view with the mapping.
When the button "Select point" we are active, clicking on the view assigning the selected point on the table at that time to the position.
Sequence capture control points
There may be ways to capture control points with the tools available. An example would be the following sequence of actions:
- Click "New" in the table of control points. This will create a new row is selected in the table. In addition the tool "Move Point" is selected.
- Click with your mouse pointer over the view to locate the point raster.
- Click with your mouse pointer over the view with reference maps to locate the point.
- Push the button "Refocused selected view point" to place the checkpoint in the center and appears in the zoom window.
- With the tool of choice for area Zoom "or" increase the level of zoom "or" Decrease the zoom level "we can set the desired zoom level until the controls of" Zoom "we have an optimal resolution level approximate.
- Click and drag the control point in the zoom window to place it more precisely. The accuracy depend on how correct is selected previous zoom level.
- Use the zoom tools to return the view to a wider zoom level and to allow a new control point.
- To return to one point and reset the Selection Click on the row of the table, click "Center views the selected point, adjust the zoom level to zoom tools and we'll move the view by clicking and dragging on the window zoom for greater accuracy.
Georeferencing with resampling
Two types of processing for raster. If selected in the options the affine transformation the image obtained is not wide and applies an affine transformation on the view. This transformation is a scaling, displacement, rotation and deformation in the direction of axis X and / or Y axis The transformation with resampling involves generating a new image from the original on which areas can appear empty. These areas are due to the fact that the resulting image should be rectangular but the area covered by the data processing may not have applied this same way.
Once the process of georeferencing the raster generated and loaded in the view we can apply a transparency per pixel to eliminate the empty areas.
Georeferencing without "Mapping Reference"
The georeferencing without reference maps is useful when you do not have imagery that guide us to assign the control points. We will have to allocate the actual coordinates directly by typing its value. In this case it is useful in view of the left so it will allow more space for the raster and the points table. The operation is very similar to the two views just that when you select the point on the reference maps have to type the entry of the table directly.
The operation of other controls is the same as with reference maps.
Modifying georeferencing upon loading
When you load a file that is not georeferenced, gvSIG can prompt you to enter the coordinates manually. For this the option has to be activated in preferences, which is disabled by default. The option that needs to be activated is "Pedir las coordenadas al cargar un raster que no tiene georreferenciación".
In this case we will see a dialog with the message: "Name of layer. The layer has no georeferencing. Do you want to enter them manually?". If you answered "No", the load is carried out with the coordinates (0, 0) in the top left corner (width in pixels, height in pixels) in the lower right corner. If the answer is "Yes", then a dialog to enter the coordinates of the raster will show. In this one must be careful to enter valid data to avoid erroneous results. The dialog has two tabs from which we can enter the coordinates in the form of affine transformation or the upper-left and bottom-right corners. In the first mode will need the X and Y coordinates of the upper right corner of the original raster, the pixel size in X, the pixel size on Y, X rotation and the rotation Y.
In the second mode we only introduce the coordinates of the corners in the order indicated by the graphs.
Image reprojection
For the reprojection of raster layers, gvSIG uses the GDAL library. The reprojection process can be launched in two different ways: By activating the reprojection icon from the raster toolbar for images that have already been loaded to the view, or by reprojecting the layer before it is loaded to the view if this is needed.
The GDAL library does not support ecw, mrsid or jpeg2000 images and therefore images in these formats cannot be reprojected.
To launch the reprojection dialog from the raster toolbar, select "Geographic transformations" on the left drop-down button and "Reproject layer" on the drop-down button on the right. Make sure that the layer that you want to reproject is set as the current layer in the text box.
When launching the reprojection function from the raster toolbar, a dialog opens which shows the projection information of the input image as "source projection". The source projection cannot be changed as it is assumed that the input layer has been loaded into the view with the correct projection. Under "target projection" the projection of the output image can be set by the user through the standard gvSIG dialog for CRS and transformations. It should be noted that not all transformations are supported; the projection options depend on the GDAL reprojection library.
The output layer can be saved on disk or opened in memory as temporary file. When the first option (which is the default) is selected, the user is prompted for a file name and path. Then, the reprojection process starts and when this is finished, it will ask whether you want to add the new layer to the TOC.
NB: When reprojecting an image, the used transformation is "EPSG Transformation"; with raster layers the other transformations (manual, composed or grid) can not be used.
Images can also be reprojected before loading them to the view. To do this, you will need to have the option "Ask for projection when the raster loaded has different projection from view", located in the raster options section of the Preferences dialog, selected. If this option is selected and a raster with a different projection than the view is loaded, a dialog is opened with projection options. The default option is to load the layer while ignoring the projection, but you can reproject the layer by selecting the option "Reproject raster to the view projection". Then, the same Reprojection dialog is shown, but in this case the "target projection" is fixed to the projection of the view, and the "source projection" can be changed, as in some cases the projection of an image may not have been set correctly or the needed projection information maybe missing.
After accepting the settings, the reprojection process will start and the layer will be added to the TOC.