Skip to content

dimespi/graphanalysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Install

The plugin is compatible with QGIS 3 only (minimum version 3.4.1).

In QGIS, open the "Plugins" > "Manage and install plugin" dialog. Install the "Graph Analysis" plugin.

Usage

The plugin installs the following UI elements:

  • The “Graph Analysis” toolbar is installed and visible by default. It can be hidden using the corresponding entry in the “View” > “Toolbars” menu. This toolbar contains the following tools:

    • “Add a graph” button
    • “Select Nodes or Edges” selection tool

    graphanalysis

Above, the toolbar with all the tools enabled, in the order described above.

“Add a graph” tool

addgraph

This tool adds a graph to the map. It uses the model and Qt to read and and write the graph and is therefore limited to the formats supported by that library. Note also that the raster layer added by this tool does not have all the capabilities of a normal QGIS vector or raster layer: It is limited to visualization and modification using the provided tools.

Click on “Browse…” to select a file (graph, txt) and OK to load the graph.

As a result, a new layer is created in the Table of Content and is displayed on the map canvas.

Properties of the layer can be visualized by right-clicking on it: A dialog opens where some details about the layer are displayed, including the location of the graph file and the CRS that is applied to it. It is also possible to get the nodes and edges attributes types. The add Edge and add node attribute dialogs do not work although it has been implemented in the backend. The same goes for the graphical properties.

properties

“Select Nodes or Edges” tool

selecttool

This tool lets you select and edit graph nodes or edges on the map. To edit a node/edge value, make a click on the toolbar and make the selection then a dialog window appears. Click on the corresponding value you want to modify. To confirm your changes, proceed this way:

  • If you have changed a node value, you have to click on the upper left corner icon to apply your changes

    selecticon

  • If you have changed an edge value, you have to click on the blank icon on the bottom left corner under "Add from vector layers"

    validateedge

Symbology

The backend for the symbology has been implemented. To change the graphical style of the nodes/edges, you need a render.xml file. The one provided at the root of the plugin directory contains SVG shapes for the nodes. There is another example named "render2.xml". You can renamed it and replace the other render.xml to see the new style.

It is possible to apply your own style by modifying manually the render.xml file. This file contains some nodes IDs and edges start/end nodes IDs so you need to put the corresponding IDs in the render.xml. Here is an example with SVG shapes:

svg

The corresponding xml code part for the nodes' shapes, the default shape is the "blé.svg" icon:

renderxml

As you can see in the graph file (testgen.graph), the attribute t_2000 is the same for several nodes, hence the same SVG icon for several nodes:

testgen

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published