Qtranus User Manual

November 30, 2022 | Author: Anonymous | Category: N/A
Share Embed Donate


Short Description

Download Qtranus User Manual...

Description

 

QTRANUS User Guide  

QTRANUS User Guide A plugin that links QGIS and TRANUS

August 2016 Contributors:

  Tomás de la Barra   Omar Valladolid





 

QTRANUS User Guide  

1 Description of QTRANUS QGIS is the leading and most advanced Geographical Information System. It is an open-source and www.qgis.org)). TRANUS is an advanced integrated land-use and transport model, free software (www.qgis.org and is also open-source and free software. TRANUS is a spatial model that estimates the location and interaction of production, activities, floorspace and land, as well as the flows and allocation of vehicles in a spatial transportation network ( www.tranus.com) www.tranus.com). It is only natural that TRANUS should use QGIS to represent the large amount of geographical data that is generated from the modeling. TRANUS has its own geographical database, but it is very limited compared to the incredible power of QGIS. In fact, users of TRANUS have been using QGIS to generate maps from model results in a manual and ad-hoc way. The idea is to automate this process as much as possible. Fortunately QGIS provides a standard way of generating complements or plugins. This is done by writing scripts or programs in Python language, although QGIS also supports C++ if very complex applications are pursued. Users install a plugin and are ready to use it. They may also read the code and modify it. This document describes the first stage in the development of a  plugin for QGIS called QTRANUS. The main function of this first version is to read the scenario tree and the land use results of all scenarios generated by a TRANUS project and allow the user to generate a variety of zone-based maps in a straightforward and easy to use manner. A TRANUS application is located in a specific folder, called the Project Folder . In this folder the TRANUS database is housed, together with the land-use results of all scenarios, stored in commaseparated files (*.csv). In the Project Folder only one application is stored. A TRANUS model may contain a number of scenarios with logical dependencies among them. This is defined in the TRANUS TUS Interface. When a scenario is run from the interface, a file that describes the scenario tree is updated. This file is called TRANUS.CTL. The results of the land use model get stored in a number of files, one for each scenario node. These files are called location_indicators_XXX.csv, where XXX is a three-letter code for each scenario node. QTRANUS is used to automatically read all the information available on the Project Folder and make it available for the generation of a variety of maps.

2 Installation of the QTRANUS plugin The QTRANUS plugin is available from https://github.com/TomasdelaBarra/QTRANUS/releases. https://github.com/TomasdelaBarra/QTRANUS/releases.  This is where QTRANUS is being developed. You should see a screen like this one:

1

 

QTRANUS User Guide  

In the Downloads section choose Source code (zip). The site will ask for a folder to download to, which can be any folder in your PC. Once you unzip the file, you should get a folder called QTRANUS with several subfolders and files. If what you get is QTRANUS_and_something_else, rename the folder so that you just get QTRANUS. Next copy the QTRANUS folder to wherever QGIS is expecting the plugins. Usually this is something like this: C:\Users\yourname\.qgis2\python\plugins It may be that you have never installed a plugin in your QGIS, so that \python\plugins does not exist. You either create them, or alternatively take the opportunity to install some of the wonderful plugins available for QGIS. For modeling purposes, a plugin called OpenLayers is stringly recommended. If you have QGIS open, nothing will happen, so you have to close it and open it again. Every time you open QGIS, the program looks at the \python\plugins folder, and loads whatever it finds there. If it finds QTRANUS there, it will load it automatically. The first QGIS window will show like this:

2

 

QTRANUS User Guide  

Magically, the TRANUS logo will show up. Alternatively you will see QTRANUS in the Database menu. Warning: This loading procedure may not work in QGIS versions prior to 2.12. If this is the case, you are strongly advised to download the latest version. After all it’s free.  

3 Initial Window Click on the TRANUS logo or the Database menu. The first screen presented by QTRANUS is as follows:

3

 

QTRANUS User Guide   The window to the left is there to show the scenario tree when you load a TRANUS project. If you haven’t loaded a project, you get the ‘There ‘ There is no data to load’ message.  

To the right you are asked to give a name to the Layers group name. For the time being, QTRANUS doesn’t do anything with this string, but it is required.

Next, it asks for the TRANUS workspace. As mentioned before, a TRANUS project resides in a unique folder in your computer. As soon as you specify a valid TRANUS workspace, you will notice that the Scenario Tree appears with valid information. This is because QTRANUS looks in the folder you specified for a file called TRANUS.CTL. This is the file where the scenario tree is specified, a fundamental structure in TRANUS modeling.

4 Generating zone maps Then, you have to specify the shape file where the polygons of the zones are contained. You may use the button provided to explore your pc. In this manual we are using the model of Swindon as an example. This model and all related data may be downloaded from  from  www.tranus.com. www.tranus.com. As soon as you put a valid shape file name, a map with the polygons should appear. Your screen should look like this:

The shapefile that you specify must contain one polygon for each zone in the model. Make sure that this is so. The first two fields in the related database must be zoneID, with a number assigned

4

 

QTRANUS User Guide   to each zone and zoneName, with a name. There must be a perfect match between the definition of zones in the shapefile and the definition in the TRANUS model. At the bottom there are three buttons called ‘Zones’, ‘Network’ and ‘Matrix’. They are all dormant.  

In the current version. However, as soon as you specify a valid ‘Zones Shape File’, a first layer is created called Zones, and a map appears with the zones. At this point, the Zones button becomes active. Press this button, and another window appears where you will specify a QGIS layer from the results of a TRANUS project:

To the left you get the scenario tree as a reference. You may click on the little + boxes to expand the tree. You must give a name to the new layer you are creating. In this first example the new layer will be called ‘Industrial employment 1991’. Then you have to fill in the Expression box. To

the right you see the list of sectors defined in the model of Swindon. Industrial employment is at the top of the list as ‘Indus’. Double-click and Indus will appear in the Expression box. You may also type Indus directly in the Expression box.

Then you have to specify the scenario as a Base Scenario, from the pull-down menu where all scenarios that you have in your TRANUS project are listed. In this example we are choosing 91A. In TRANUS, scenarios are defined with a three-letter code. Finally you have to choose a field from a given pull-down list. In this case we want a map with the number of industrial jobs, so that we select TotProd. We are ready to produce our first layer, so that we click on the Accept button and the Close button of the first window. You should get the new Industrial Employment 1991 layer with the corresponding map. Previously the program had automatically generated a first layer called ‘Zones’, so that to see the new layer you must hide the Zones layer. The re sult is as follows:

5

 

QTRANUS User Guide  

What the plugin has done is to read the file location_indicators_91A.csv   and joined the TotProd field of the Industrial employment sector with the SwindonModelZones.shp file that contains the polygons, using the zone Id field present in both. This layer has been produced using default specifications. You are free to customize the resulting map with the standard tools provided by QGIS. The map you get presents industrial employment as a graduated map in blue tones. Double-click on the Industrial employment 1991 layer to get the QGIS menu to change the settings. You get the following screen:

6

 

QTRANUS User Guide   You can see that it is a graduated map with 50 classes. I may want to reduce this to only 7 classes with natural breaks and choose the orange color range. This will look like this:

I may also want to label the polygons with the zone numbers. In this same QGIS menu I go to Labels, and choose Show labels for this layer , and in the Label with pull-down box choose the field  ZoneID. The result will be a map that looks like this:

7

 

QTRANUS User Guide   It is also possible to generate a map that relates variables from two different scenarios. For example, you may want a map with the growth of industrial employment from 91A to 16T. Double-click the Indus sector to put it in the Expression box, then select 16T from the Base Scenario pull-down, then an operand, that may be  – or /, and then choose the 91A scenario for the Alternative Scenario pull-down box. The program will subtract 16T – 91A.

You get a map like this one:

8

 

QTRANUS User Guide   It is possible to define more complex expressions. Available operands are + - * / ( ). For example, total employment would be: Indus + Govm + Retail + Office + Health + Eductn Residential density would be: (HhHigh + HhMed + HhLow) / ResL Floorspace density would be: (Sheds+Framed+Detch+SemiD+Terrace) (Sheds+Framed+Detch+SemiD+T errace) / (IndLnd+BPark+Mixed+ResL) You can always produce a map with the result of Expression from a single scenario, or a map that compares two scenarios. Once you have generated the maps you want, you can save it as a QGIS project in the usual way, doing File-Save or File-Save As and giving it a name. This means that the next time you open the QGIS project, all your maps will be there exactly as you left them. You may then add more layers to the project.

8/29/2016

9

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF