gvSIG-Desktop 1.9. New functionalities
"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: drop-down list of point or line vector layers in the current View that are not in edit mode. Select a layer to be the source layer.
- Name of the output layer: layer name that will appear in the TOC.
- Path of the output layer: full path for creating the new shapefile.
- Type of output layer: geometry type of the new layer. This depends on the type of process chosen (See options below).
- Type of process: select the type of geometry generation process. This depends on the geometry of the source layer. This process is applied to the source and destination layer pair until the tool is closed.
- Cancel: Close the tool.
- OK: Opens a control panel and displays data for the selected source layer. This control panel will be associated with source and output layers until it is cancelled.
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).
- Name of the source layer: Layer from the TOC that contains the source geometries.
- Name of the output layer: Name of the new derived geometry layer that will appear in the TOC.
- Table of features: Table showing the attributes of all the source layer's features. Source layer geometries selected in the View will also be selected in this table.
- Add all: Adds all the features of the source layer to the table of selected features.
- Remove all: Removes all features from the table of selected features.
- Enable snapping tool: Enables snapping tool on the source layer, without putting it into edit mode (only available in the Castilla y León extension for gvSIG 1.1.2).
- Add selected features: Adds only the selected features to the table.
- Remove selected features: Removes only the selected features from the table.
- Table of selected features: Table showing the attributes of all the features selected from the source layer. It has 2 extra columns:
- Order: Order to be used when generating the new geometry from the selected features in a point source layer, or when closing polylines in the case of a line source layer. The order can be changed with buttons 10 and 11.
- ID: Fixed ID number of the geometry in the vector layer.
- Move up: Moves the selected geometries up one position.
- Move down: Moves the selected geometries down one position.
- Create: Start the process of generating the derived geometries. If it doesn't already exist, a new layer is created, and the new geometries are added to this layer. The process is done in a thread, the progress of which is indicated by a progress bar.
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:
- Number of geometries to create: depends on the geometry selected:
- If they are of type point: one line or polygon is created.
- If they are of type line: one polygon is created for each line.
- Number of geometries that could not be created: the subprocess failed, for example because a polygon couldn't be derived from simple lines that consist of only two points.
- Number of geometries created successfully: the new geometries created.
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.
- Cancel: Closes the control panel and de-registers the associated tools, thereby terminating the tool for the specified source layer.
- Expand / Collapse: Changes the position of the splitter, so as to display only the table of features, only the table of selected features and associated management controls, or both halves of the control panel interface.
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:
- Land-use: layer showing parcel boundaries of the town.
- Rivers: layer showing rivers in the town.
- Lakes: layer showing lakes in the town.
- GPS Waypoints: shape layer containing points recorded by a GPS on the drive to and from work. This layer will be used as the source layer in the example.
Once all four layers have been loaded the "Derived Geometries" tool can be selected and the following values entered:
- Source layer:
- Layer: GPS Waypoints
- Output Layer:
- Name: Route: Work to Home
- Path: .../RouteWorkToHome.shp
- Type: Lines
- Options:
- Mode of operation: points to line
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:
- Source layer:
- Layer: Path: GPS Waypoints
- Output Layer:
- Name: Close routes
- Path: .../CloseRoutes.shp
- Type: Polylines
- Options:
- Mode of operation: close polylines
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:
- Layer "Close routes": select a unique values symbology to distinguish the two polygons, and choose fill patterns that allow the lower layers to be seen.
- Layer "GPS Waypoints": Use a symbol of a car for the points and place the layer above the other layers.