The gvSIG geoprocessing extension allows you to apply a series of standard processes to the vector information layers loaded in the layer tree in a gvSIG view (ToC), thus creating new vector information layers which will provide new information for the source layers.
The following geoprocesses have been implemented in the first version of the geoprocessing extension:
The output layer can take one of the output formats supported by gvSIG (it can only be saved in shp format at the moment).
When some geoprocessing tools are applied (for example, Clip) a window appears in which a spatial index can be created for the input layer. This is an internal process which is only carried out once per layer and per new project and speeds up the spatial intersection processes.
To create a spatial index for the input layer which can be used by the geoprocesses, click on “Yes”.
You can run the geoprocesses available in gvSIG with the geoprocessing wizard by clicking on the following tool bar button:
The “Geoprocess toolbox” will appear and you can use it to select the geoprocess you require. To access the different geoprocesses, pull down the tree in the window shown below (double click with the left button of the mouse on the "Geoprocesses" folder and the rest of the folders will appear).
When you have found the geoprocess you wish to use, click on the “Open geoprocess” button.
This geoprocess generates “areas of influence” around the vector element geometries (points, lines and polygons) of an “input layer”, thus creating a new polygon vector layer.
Several equidistant concentric radial rings can be generated around the input geometries. Moreover, in the case of polygon input geometries, the area of influence can be outside the polygon, inside the polygon or both inside and outside it. Some examples of the creation of areas of influence include:
When you click on the “Geoprocessing wizard” button, the following dialogue appears:
If you select “Buffer” and click on the “Open geoprocess” button, the window associated with this process is shown:
The form is divided into the following parts:
Selecting the elements whose buffer is to be computed. This is a pull-down list in which you can select the vector layer the calculation is to be applied to. If you wish, you can enable the “Use selected features only” check box so that the process only computes the buffer of the elements currently selected in the specified layer.
Inputting the features of the buffer to be computed. You can choose to input the buffer defined by distance (in the first text box) or to input a field in the input layer, from which the buffer radius value to be applied will be taken. This second option allows you to apply different buffer radii to different vector elements (whilst the first option applies the same radius to all the elements in the input layer). When the buffer of all the input layer elements has been generated, the “Dissolve features” option allows you to merge the elements whose geometries touch each other in a second iteration.
The “Rectangle end cap" option allows you to generate buffers with perpendicular edges (not rounded). Selecting the number of concentric buffers and their situation regarding the original geometry. The gvSIG “Buffer” geoprocess allows you to generate several equidistant areas of influence of the original geometry (for example, if the buffer distance to be applied is 200m and you choose to generate two concentric radial rings, the buffer distance of the second ring will be between 200-400m. Currently, you can only generate a maximum of three concentric radial buffer rings for efficiency reasons. If the vector layer we are working on is a polygon layer, the “Create Buffer…” option will be enabled, thus allowing the user to generate buffers outside, inside and both inside and outside the original polygon.
Introducing the result layer characteristics. Currently, the result of running a geoprocess can only be saved as an shp file. Thus, gvSIG allows you to select an existing shp file to overwrite it or to specify a new one. As new formats are supported to save the result of the geoprocesses, wizards will be provided to indicate the characteristics of these formats.
When you have input all the necessary information to compute the buffer, and clicked on the “Ok” button, a check routine is carried out to ensure that the information input is correct: whether the radius distance is numerical, whether the attribute from which the buffer radii are taken are numerical, whether a result file has been input, etc. If the check routine is not correct, a dialogue box appears so that the input data can be corrected.
If the input information that you have entered is correct, a window with a progress bar appears, in which the buffer processing rate is shown.
The process can be cancelled at any time by clicking on the “Cancel” button. As a consequence, the result file and any other intermediate product generated as a result of running the process are deleted. Whilst the buffer computing process is underway, other tasks can be carried out, such as changing the zoom or adding new layers to the layer tree in the gvSIG view. Other tasks can be carried out because all the geoprocessing extension geoprocesses are run in the background. When the process has finished, the new result layer is added to the layer tree in the active view. It is made up of buffer polygons with a specified radius based on the source layer.
Finally, the “Dissolve elements” option can be useful in specific situations (such as when the aim of computing the buffer polygons is to determine the total surface area affected by a phenomenon: quarantine areas, etc.), because when the generated polygons are merged the surface area covered by the buffer will be a real surface area, i.e. the sum of two buffers will not have any overlays.
The above image shows non-merged overlay polygons. The total area covered by the phenomenon does not coincide with the sum of the individual areas.
However, this second image shows merged overlay polygons. The total area covered by the phenomenon is real. When the buffer computing process includes the merger of overlay areas (dissolve) we cannot predict its exact duration (we do not know how many polygons will touch each other a priori). This is why the gvSIG geoprocessing extension does not show us a progress bar as such, it shows us a bar which periodically reaches the end and then goes back to the beginning. This type of process is called an “indeterminate” process.
This geoprocess operates on two layers, the “input layer” and the “overlay layer”, whose geometries can be polygons, lines or points.
It calculates the intersection with the different geometries in the “overlay layer” for each geometry in the “input layer”, thus creating a new element for each intersection. This element will take all the alphanumerical attributes in the geometries that created it (input and overlay). This is why (it models space areas which comply with the condition of belonging to the two polygons, lines or points that created it) this geoprocess is known as “Spatial AND" operator.
An example of how this geoprocess can be applied:
Given a land use layer (e.g. Corine2000), and a national geological map layer, you can obtain a polygon layer with homogeneous information on land use and geological material.
After selecting the "Intersection" geoprocess, the following dialogue appears:
Select the input layer and the overlay layer. You must also specify a file in which to save the results. Finally, click on "Ok" and the geoprocess will be run.
In this case, we will use a very simple example to better understand the function of the geoprocess. The previous figure shows two overlaying polygons. The result of launching the “Intersection” geoprocess with these layers as parameters is as follows:
This geoprocess allows you to limit the working area of a vector layer (points, lines or polygons), and to extract an area of interest from it.
To do so, you need an “input layer” (the layer you will use to extract an area) and a “clipping layer” so that the union of the geometries included in the "clipping layer" defines the working area.
The geoprocess checks all the vector elements in the “input layer” and will calculate the intersections for the vector elements contained in the working area defined by the “clipping layer”, so that in the "result layer" only the vector elements of our working area will appear. The geometry portion that lies outside the working area will be clipped. The alphanumeric schema of the input layer remains intact.
Examples of use:
Setting up a local GIS would allow you to include national or regional maps and then to delimit the city or town as the working area.
When the "Clip" geoprocess has been selected, the following dialogue appears.
This dialogue allows you to select which layer you wish to clip, and gives you the chance to only clip the elements which are selected in the layer.
It allows you to select which layer will be used as the clipping layer and whether you wish to use the union of all the polygons in the clipping layer as the clipping polygon or just the selected elements.
Finally, as in the case of the other geoprocesses in gvSIG's geoprocessing extension, you can define how the result layer will be saved (at present you can only save it as a shp file).
As a result of running the geoprocess, you will have a new layer in which only the geometries which came under the union of the clipping geometries have been kept.
This geoprocess only acts on one “input layer”. The process analyses each entity in the "input layer" and merges the elements that have an identical value for a specific field into one element. Moreover, it allows you to involve spatial criteria in the decision to merge several features. This allows you to establish that for two elements to be merged, they must be adjacent to each other in addition to having the same value in the specified attribute.
Example: We have a polygon layer which represents the municipalities of a particular autonomous region and we need a polygon layer with the provinces which make up this region. We can generate a province layer by launching the “Dissolve” geoprocess and specifying that the polygons that have the same value for the "PROV" field in which a unique code for the province is specified are merged.
Using the previous example, we start by taking a "local layer" which we wish to convert into a "provincial layer".
When the "Dissolve" geoprocess has been selected, the following window appears:
Firstly, select the layer you wish to dissolve (you can only work with a selection of elements in this layer).
You then need to specify the attribute of this layer which is going to be used as the criterion to merge the adjacent polygons. In our example, we must choose the “PROV” attribute.
The polygons to be merged must have the same value for the dissolving attribute and in addition, you can choose whether they are adjacent to each other (spatial criteria). If you wish to choose this option, enable the "Only dissolve adjacents" check box. The gvSIG geoprocessing module allows you to keep a summary of the input layer polygon attributes once they have been merged. To do so, the “Summary function” concept is introduced. As each polygon of the “Dissolve” geoprocess result layer is the product of joining several input layer polygons, a summary function on the numerical attributes of the merged polygons can be applied.
If you click on the button with the "<-" icon, a dialogue will be shown in which you can choose one of several summary functions for a selected attribute.
The summary functions supported are maximum, minimum, average and summatory. A field will be included in the result layer for each summary function selected for the numerical attributes you have selected a summary function for.
When you have specified the field you wish to merge and the numerical attributes you wish to obtain a summary value for in the result layer, you are ready to run the geoprocess.
This geoprocess acts on one or several layers, generating a new layer which joins all the geometries in the “input layer”. The "result layer" of this geoprocess will keep the attributes of the "input layer" specified by the user. For the rest of the layers which have not been selected, the attributes whose name and type of data coincide with any of the attributes in the selected layer will be kept.
Example:
When a cartographic series arrives which is separated into sheets and you wish to join the content of the different sheets in one layer. This is the case of the Magna series of sheets, published by the Spanish Technological and Geomining Institute (ITGME).
If you select the “Merge” geoprocess, the following dialogue appears:
The geoprocess allows any of the layers loaded in the layer tree in the gvSIG active view as an input layer. To run the process, first select the layers you wish to merge in the "Input layers" text box. Then, click on the "Select” button. A new window will open in which you can give the new layer file a name or choose a target file.
Click on the "Save" button when you have finished and gvSIG will return you to the geoprocess window. Click on the "Ok" button. This will start the geoprocess.
A new layer will be created at the end of the process which will be added to the view.
However, in the example of the sheets in a cartographic series, it would be awkward to load all the pages in the series one by one. Thus, there is an extra option to select a directory and to add all the layer files (with extensions supported by gvSIG) contained in this directory to the geoprocess input layer list. The only layer files currently supported are shp format files. If you click on the “Folder with files...” button and select a directory, a list of the layer files contained in it are shown and can be selected as part of the geoprocess input layers.
Until you select at least one layer to merge with one of the two possible lists (the layer list in the gvSIG layer tree and the layer list contained in the specified directory), no layer will be shown in the pull-down list. This list allows you to select which layer is going to define the attributes of the result layer’s attributes. When you select the layers to merge in one of the two lists, the layer whose attributes we wish the result layer to have and when you have specified the file you wish to save the result layer in, you can run the geoprocess. An initial requirement is that all the geoprocess input layers have the same type of geometries.
The result will be a new layer with all the input layer geometries.
This geoprocess calculates the “Convex hull”, or the smallest convex polygon which surrounds all the vector elements in an “input layer”.
It only works with an “input layer” whose geometry type can be any type (point, line or polygon). There are different types of applications for this geoprocess: Determining the coverage area for a specific geographical phenomenon.
Calculating the diameter of the area covered by a series of geometries, etc.
If you select the “Convex hull” geoprocess, the following dialogue appears:
After selecting the layer whose “Convex Hull” you wish to calculate and specifying an shp result file, you can run the geoprocess and generate a new result layer.
The following image shows the convex hull created which surrounds all the points in the input layer.
The “Difference” geoprocess works with two layers, the “input layer” and the “overlay layer”. It is known as “Spatial NOT” and allows you to obtain the areas in a layer which are not present in the other layer. The geometries in both the “input layer” and the “overlay layer" must be polygons, lines or points. The alphanumerical schema of the “input layer” will remain intact in the "result layer", as in the end it gives more information about it.
This geoprocess is very useful in numerous situations. For example, it can be used to complement the "Clip" geoprocess. If “Clip” allows you to exclude everything that does not belong to a geographical area under study, "Difference" allows you to do exactly the opposite; exclude a specific area from our working layer.
A useful example:
Transferring territorial jurisdiction between different governing bodies. Thus, if the national government transfers certain jurisdiction to a regional authority, it can decide to exclude the geographical area of the transfer in question from its data bases.
Running the “Difference” geoprocessClick on the “Open Geoprocess” button to access the dialogue window which allows you to run the "Difference" geoprocess.
You can enable the “selected features” check boxes at this point of the geoprocess for the input layer and the overlay layer. If you click on the “Ok” button, the geoprocess will be run.
In the following image, the “Difference” geometry appears in black between a flood zone and one of the selected cities or towns. In this case, the new layer resulting from the calculation of the difference will take the schema (alphanumerical attributes) of the geoprocess input layer.
This geoprocess is similar to the “Intersection” and "Difference" geoprocesses in that it operates on two polygon, line or point layers to obtain their intersections (this is why these three geoprocesses are known as “overlay geoprocesses”).
The "Union" geoprocess is known as "Spatial OR", because the result layer is made up of the geometries which appear in the two layers (intersections between the polygons, lines or points), plus the geometries which only appear in one of the two associated layers.
This means that the geoprocess carries out three analyses:
the first time it calculates the intersection of both layers, the second time it calculates differences between the first layer and the second, and the third time it calculates the differences between the second layer and the first.
This geoprocess may be of interest if you wish to generate new layers which show the occurrence of two phenomena so that the occurrence of one of the two or of both is highlighted.
If you select the “Union” option, the following dialogue appears:
When you have selected the input layer, the clip layer and an output layer, click on "Ok".
The result layer will have all the intersections and differences between the two layers. If you click on the “Information” button and then on the different polygons in the result layer, you will see that the intersections have all the attributes, whilst the differences only have the attributes of the layer that created them.
This geoprocess allows you to transfer the attributes of one layer to another based on a common element. In contrast to the join sql operator in the relational data bases, in this case, the common element is not that a field of the two tables takes the same value, but that the related elements in the two layers meet some spatial criteria.
The “Spatial join” geoprocess allows you to follow two types of spatial criteria to establish the spatial link:
Nearest neighbour (1->1 relationship). This assigns the attributes of the nearest element in the related layer to an element in the source layer.
If the nearest element intersects (or in the case of polygons is “Contained in”) with the source element, the algorithm will take the first element analysed in the possible intersections.
Contained in (1->M relationship). This relates an element in the source layer with several elements in the destination layer (in particular, with those that intersect).
In this case, the source layer will not inherit the related layer’s attributes, but the operation will be very similar to the "Dissolve" geoprocess.
The user can choose one or several summary functions (average, minimum, maximum, summatory) to be applied on the numerical attributes of the related layer for the M elements related to an element in the source layer.
When you have selected the "Spatial join" option, the following window appears:
This window is practically the same as the windows in the overlay geoprocesses (Union, Difference, Intersection) with one difference.
It allows you to choose whether you want to run a 1-1 relationship (using the nearest neighbour spatial criterion) or run a 1-N relationship (using the “Intersect” or “Contained in” spatial criterion).
The choice can be made by enabling or disabling the "Use nearest geometry" check box. If when you have selected the source layer and the layer to be related, the geoprocess is launched and you have not enabled the "Use nearest geometry" check box, a window appears in which you can select the summary functions you wish to apply for each numerical attribute of the layer to be related:
The summary functions are the same as in the “Dissolve” geoprocess:
Thus, the attributes transferred to the source layer will be the result of the summary functions selected for each numerical field. If you run the geoprocess and the “Use nearest geometry” option is enabled, this window does not appear.
This geoprocess allows a translation transformation to be applied to all the points, lines and polygons of the geometries in the input layer. The geoprocess can be applied to all types of vector layers (shp, dgn, dxf…). To do so, the movement on X and Y must be specified.
This geoprocess is extremely useful when combining cartographies which come from different sources, a process which is referred to as conflation. Bear in mind that although translations can be carried out on all types of vector layers (shp, dgn, dxf, dwg…), the resulting output layer will always be a shape file. In other words, the input layer can be a shp, dxf or dgn file, but when translation is applied to these layers, the result will be one or various different output layers which are always shape files.
When a translation is carried out in which the input layer is a vector layer which is not a shape file, the result of the translation will be three layers in SHP format (one line layer, one point layer and one polygon layer).
If, for example, the input layer to which the translation is applied contains only points and lines, the polygon .shp file will be created but it will be empty.
NB. At the end of this section there is a table giving details of the relationship between the type of input file and the resulting output layer.
Firstly, load a vector layer in gvSIG and then click on the geoprocessing wizard in the tool bar.
Select the option “2D Translation” from the “Data Conversion” folder. Click on the “Open Geoprocess” button and the geoprocess data input window opens. For the input layer, select the vector layer (dgn, dxf, dwg, shp…) you wish to translate and introduce the values corresponding to X and Y. Select an output layer and click on “Ok”.
The following image shows the result of applying the translation process.
Relationship between the type of layer before and after translation.
Input cover | Output cover/s | |
---|---|---|
Point Shp file | Point Shp file | |
Multipoint Shp file | Multipoint Shp file | |
Line Shp file | Line Shp file | |
Polygon Shp file | Polygon Shp file | |
Dxf (points, lines, polygons) | Point Shp file Line Shp file Polygon Shp file |
|
Dgn (points, lines, polygons) | Point Shp file Line Shp file Polygon Shp file |
|
Dwg (points, lines, polygons) | Point Shp file Line Shp file Polygon Shp file |
This geoprocess allows you to change the geodesic projection of the vector elements in the input layer. In order to do so, the user must specify the new projection to be applied.
This process is extremely useful when standardising cartographies in the same project if these are in different projections.
Click on the geoprocessing wizard in the tool bar and select the “Reproject” option from the “Data conversion” folder.
Click on “Open geoprocess”. The wizard will open to guide you through the reprojection process.
In “Input layer”, select the layer you wish to reproject from the layers loaded in the ToC.
To select the new projection for the layer, click on the button next to the destination projection and select the new reference system.
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.
Select the “Layer” option from the menu bar then go to “Export to…/postgis”.
If you have selected any elements, a window will appear telling you how many elements are going to be exported (as in exporting to shp and dxf).
If you have selected any elements, a window will appear telling you how many elements are going to be exported (as in exporting to shp and dxf).
Remember that if the table already exists in the data base, the information it contains will be deleted.
Write the name of the table and click on “Ok”. A new window appears in which you will have to input the parameters of the data base connection.
he parameters are:
Name: Name of the connection.
Computer: IP address of the computer the data base is hosted in
Port: Port on which the computer is listening to the postgreSQL service.
User: User name recognised by the administrator to make the connection
Password: User password required to validate the connection. db: The data base the new table is to be created in.
Driver: Driver required for the data base. (At the time of going to press, drivers for postGIS and mySQL were available). When you have input the connection parameters, click on “Ok”.
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: