The “Export to...” tool allows you to save the elements selected in a layer in a different format. If no elements have been selected the whole layer will be exported. At the time of going to press the export formats supported by gvSIG were shape, dxf, and postgis and gml.
Select the “Layer” option from the menu bar then go to “Export to…/shp”.
If you have selected elements in the layer to be exported, gvSIG will tell you how many elements are going to be exported and will ask for confirmation before carrying out the operation.
If you continue with the operation, a dialogue box will appear in which you will be asked to select the file the new shape is to be saved in.
When you have accepted, a new message will appear asking whether you wish to insert the new layer into the view.
If you click on “Yes”, the layer will be added to the active view.
Select the “Layer” option from the menu bar then go to “Export to…/dxf”.
Follow the same process used for exporting to shape.
Desde la barra de menú seleccione la opción “Capa/Exportar a.../postgis”.
Si tiene elementos seleccionados le mostrará una ventana informándole del número de elementos que se van a exportar (al igual que en exportar a shp y dxf).
Si pulsa sobre la opción “Sí” para continuar la exportación gvSIG, aparecerá un diálogo donde podrá seleccionar una conexión a PostGIS activa o crear una nueva.
A continuación podrá seleccionar el esquema (entre los existentes en la base de datos actualmente) y el nombre de la tabla donde debe guardarse la exportación. Recuerde que si la tabla existe en la base de datos, la información que contenga será borrada.
Cuando haya introducido el nombre de la tabla pulse el botón “Aceptar” para comenzar la exportación
Para exportar a Oracle Spatial el procedimiento es similar al antes descrito con una particularidad,para que la opción de conexión a una base de datos de Oracle Spatial esté disponible en la ventana de parámetros de conexión anterior, debemos en primer lugar descargar los drivers que le permiten este proceso siguiendo las instrucciones que encontrará en la web del proyecto y que se resumen a continuación:
Para acceder a bases de datos Oracle Spatial se han de instalar los drivers de Oracle. Hay que seguir los siguientes pasos:
Acceder a Oracle Database 10g Release 2 (10.2.0.3) drivers.
Aceptar los términos de licencia.
En la página siguiente, descargar el archivo ojdbc14.jar (1,545,954 bytes) - classes for use with JDK 1.4 and 1.5.
Nota: Es necesario registrarse para hacer efectiva la descarga
Mover el archivo a la siguiente carpeta:
Select the “Layer” option from the menu bar then go to “Export to…/gml”.
Follow the same process used for exporting to shp or dxf.
From the menu bar, select Layer > Export to... > Keyhole Markup Language (KML).
From here on the steps are exactly the same as for the Exporting to GML option.
This gvSIG tool makes advanced labelling easy.
The process creates a new layer which represents annotations.
The main features of this new layer can be summarised as follows:
To create an annotation layer, first select the layer from the ToC (Table of Contents).
In the menu bar, select the “Layer” option, then select “Export to” and finally select the “Annotation” option.
This option opens the wizard which will guide you through the steps required to create the annotation layer.
In the wizard’s first window, select the data which gvSIG requires to carry out the operation from the pull-down tab:
Duplicate control: Select either “None” or “Centred” to choose the position in which you wish the annotations to be inserted.
Centred: A label is created for each value and this will be inserted in the centre of all the labels which are the same.
None: A label is inserted for each value, even if these are repeated.
Select the field to be labelled: Choose the field which contains the text you wish the labels to show.
If you do not wish to modify the format of the annotations created by gvSIG and prefer a standard format, click on “Finish”. If you wish to customise the format, click on “Next”.
The wizard’s second window allows you to select the fields of attributes of a a table (if there are any) which contain the values which allow you to customise the labelling.
The following parameters can be customised.
Slope – the slope the annotation will have in the view.
Colour – annotation text colour.
Height – annotation text height.
Units – units in which the value assigned to the “Height” field are to be measured.
The options currently available are map units or pixels.
Font – annotation text font.
Set the values to be used for customising the required parameter (by pulling down the list).
Leave the default value in the fields you do not wish to customise.
Click on “Finish” when you have input these changes.
An annotation layer can be edited like any other layer. To start an editing session in gvSIG, select the layer in the Table of Contents and then select the option “Start edition”.
When you start an editing session, an option appears in the menu bar called “Modify annotation”. This will allow you to individually customise the annotation you wish to change.
When you click on this button, the appearance of the cursor will change. You may graphically select the annotation by clicking on the point associated with the text and then access a set of properties shown in the following image.
If we select the “Properties” option from the annotation layer contextual menu, the following box appears:
The “Layer properties” box has two tabs. The “General” tab allows you to access the general properties of the layer and the “Annotations” tab allows you to select: whether you wish the annotation text to be shown in pixels or metres in the view.
Whether you want only the text to appear (select the “Draw text only” option) or if you prefer the text to be accompanied by a location point (deselect the “Draw text only” option).
However, remember that this point is useful, for example, to move the annotation or to access the “Modify annotation” window.
If you wish to avoid overlays, activate the “Avoid overlays” option.
If you wish to eliminate overlaying annotations, activate the “Clear overlaying annotations” option.
To add an annotation layer, click on the “Add layer” button in the tool bar
and select the “Annotation” tab.
In the box you can select the annotation layer you wish to load, in addition to the units in which the annotations are displayed (pixels or metres) and the projection of the layer.
The following image shows how an annotation layer is created out of a polygon layer called “muni10000.shp” which contains all the towns in the Valencian Region.
In the first window of the wizard, insert the type of duplicate control you wish to use and select the field which contains the text to be shown.
This is the field in a layer’s table of attributes which contains the name of the town.
If you do not wish to customise the presentation, click on “Finish” and indicate where you wish the new annotation layer to be saved.
The following image shows the result (the rest of the fields in the wizard are left with their default values and this one is zoomed in) of creating the “annotation layer”.
The annotation layer which has been created is the one in red called “Towns” in the Table of Contents.
This tool allows you to extract portions of a raster layer using a selection in the view or by inputting the coordinates that define the portion to be extracted.
It allows the user to change the spatial resolution of the clipping or of the whole image, choose the bands to be extracted or generate a new raster layer for each of the original bands.
To access this option, go to the ToC and select the raster layer you wish to select a portion of.
Then go to the Layer/Export to menu and select the “Raster” option.
The following window appears:
Image clipping
There are two ways of selecting an area to be clipped from the original raster layer:
You can use the text boxes in the window to input the data which correspond to:
You can also make your selection directly from the view by clipping the whole image or selecting a part of it.
This button allows you to obtain a clipping from the whole image.
This button allows you to obtain a clipping from a selected area in the view. Place the cursor over the image, then click and drag. Check that the text boxes are automatically completed.
If you wish to save the raster layer clipping you have created, click on “Save” and select the location you wish to save this file in. The image will be saved in TIF format.
Changing spatial resolution
The controls that allow you to specify the clipping’s (or whole image) spatial resolution are located in the Clip table, with the additional options panel pulled down (to pull this panel down click on the button). You can define the resolution by specifying the Cell size or the Width and Height of the raster layer to be generated in pixels as well as choosing the interpolation method using the resolution change. At the moment, only the “Nearest neighbour” option is operational.
Band selection
The original raster layer’s band list appears at the bottom of the Clip table. You can use this list to choose the bands the output raster layer will have if you enable or disable the check boxes in the Bands column. If you check the Create one layer per band option, a new layer will be generated for each of the bands checked in the list. The new layers will be added to the ToC.
Saving and Adding a raster layer clipping to the current view.
When you have established all the parameters which define the raster layer clipping you have made, click on “Save”. This opens a dialogue box which allows you to search for a directory to save the clipping in. If you wish to add the layer to the view, go to the “Add layer” button in the tool bar once you have saved the clipping.
Example of a raster layer clipping
This example shows how a clipping is taken from an orthophoto.
First, select the area by defining a rectangle in the gvSIG view.
When you have finished, the coordinates will automatically be input into the text boxes based on the selection. You can fine tune these selected values from the view by inputting the new value directly into the text boxes containing the data.
Then pull down the box. As the resulting image is to be resampled, not as much resolution is required. Therefore, go to the “Spatial resolution” section and select “Width x Height”. This enables the text boxes so that you can input the output raster layer resolution.
When one value is input the other one is automatically completed when you press Enter or when you exit the field, as the proportions between the width and height must be maintained.
The cell size for the chosen output resolution is also calculated. If “Cell size” had been chosen, you would have had to specify the size in metres for each pixel and thus the width and height for the chosen cell size would have been calculated.
You now need to select the bands you want the output layer to have. In this case, select them all as this is a three-band orthophoto and we want to include them all.
Finally, for our example, the “Create a layer per band” option needs to be enabled to do just this.
Each new layer will have the same data type as the original image. If you click on “Save” a dialogue box opens to indicate the directory and image name.
To retrieve the layers you have created, go to the Add layer” button and then to the directory they were saved in.
"New layer with derived geometries" tool.
This tool allows users to generate geometries derived from points or lines in a vector layer, and to store them as a new shape layer.
Icon | Description |
---|---|
Derived geometries tool enabled if the TOC contains at least one visible point or line vector layer that is not in edit mode. | |
Derived geometries tool disabled if the TOC does not contain any visible point or line vector layers that are not in edit mode. |
The tool can be accessed from:
Via the menu: Layer / Derivative geometries
Layer selection dialog and process
Upon choosing the tool a dialog for selecting layers is displayed:
Source layer geometry type | Type of process | Target layer geometry type |
---|---|---|
Points | Points to line | Lines |
Points | Points to polygon | Polygons |
Lines | Close polylines | Polygons |
Process Control Panel
The control panel is associated with the layer and is shown every time the layer is activated in the TOC, as long as the layer is visible and not in edit mode.
The dialog has a semi-modal behavior in order to allow the user to continue working with gvSIG by using the minimize, maximize, resize and hide buttons (use the X, not the Cancel button, to hide the dialog).
The results of the completed process can be viewed by clicking on the "View Details" button. There are three types of data that are of interest here:
This information is recorded in the gvSIG log.
The control panel is hidden during the process but becomes visible again when the progress dialog is closed.
Control Panel Behaviour
The control panel is linked to the source layer from the time it is created until it is cancelled by clicking the cancel button.
Action | GUI Element | Description |
---|---|---|
Maximize | Resizes the dialog so that it fills all available space. | |
Minimize | Minimizes the control panel to a restore button. | |
Collapse | Control panel is hidden but remains linked to both the source and output layers. Further operations between these layers can be performed once the panel is restored. | |
Resize | The size of the control panel can be increased or reduced by selecting and dragging the edge of the panel. | |
Expand / Collapse splitter interface | These controls are used to display only the table of source layer features, or only the table of selected features and associated management controls, or both halves of the control panel interface. | |
Cancel | Closes the tool so that is no longer available for operations between the source and output layers. |
When the control panel is hidden it can be restored it by clicking on the source layer in the TOC.
If the View is closed when control panels are visible, the panels will be hidden and then restored when the View is reopened.
Geometries derived from points do not retain any attribute values but do maintain the columns. Those derived from lines, keep all attributes.
Removing the new layer associated with control panel will result in the tool being ended and a warning being displayed to the user.
Examples
This example will show how to generate a line layer showing the path followed from home to work, and back again. The example uses the following four shape layers:
Once all four layers have been loaded the "Derived Geometries" tool can be selected and the following values entered:
When "OK" is clicked the new process control panel appears. If a file with the same name as the new output layer already exists then the user is asked whether to continue or not. If yes, then the file will be overwritten.
Minimizing the control panel will reveal the View:
The geometries can be selected from the top table in the control panel.
We select the first seven geometry points (1st route: work to home).
Click "Create" to generate the first path:
Modify the symbology so that the route stands out as a thick line.
To generate the route back, activate the control panel and select the remaining points from the source layer so that the line can be generated:
Finally suppose we are interested in the polygon formed by the closure of the routes.
Cancel the tool and then reopen it but this time use the new layer as the source:
Select all the geometries (the two polylines) and generate the polygons.
Since the layer "Route: Work to Home" does not contain data due to the points to line process, we assign a distinguishing identifier to each by editing the layer.
Now apply some changes to the symbolology: