This section explains how the Python script, which is part of ur-scape's data import plug-in for QGIS, can be used directly in QGIS' Python Console. This allows users to gain better control over the import process by setting variables directly in the script.
Data Selection is performed by selecting the desired dataset in QGIS Layers Panel.
The necessary variables that users must fill in.
- Output Path: the path to ur-scape's 'Data' folder on your hard drive
- Name: the name by which the data will be exported with. This name will be shown in the Data Layers panel in ur-scape
- Field: which field from the Attribute Table should be used for import (vector data only)
- Resolution: the precision of how data will be imported to ur-scape. Accepted values range from 0 to 5.
- 0 = Neighbourhood: should be used for districts and parts of the city
- 1 = City: should be used for whole cities and towns
- 2 = Metropolitan: should be used for metropolitan areas
- 3 = National: should be used for country data
- 4 = Continental: should be used for high resolution world-wide data
- 5 = Global: should be used for low resolution world-wide data
These variables are also required by the user and should describe a dataset.
- Units: the unit of measurement used by the input the dataset (e.g. meters)
- Location: the location that the data represents (e.g. Singapore). This will appear in the Site Browser panel in ur-scape
- Source: represents the person, group, institution, company, etc. that produced or supplied the dataset.
- Date: define the time period of dataset
- Color: the layer's color. Select from a predefined list of colors. Accepted values range from 0 to 9
- Group: which layer group the selected layer will belong to
- Citation: a citation referencing scientific papers, journals, etc.
- Mandatory Citation: a citation or text that should always be visible within the map area while displaying the layer in ur-scape
- Link: a URL for the website where input layer was sourced from.
- No Data Value: allows user to define one value which will be excluded (deprecated)
- No Data List: allows user to define multiple values which will be excluded
- Use Band: allows user to define which band of raster should be imported (Only Raster)
- Extent as Canvas: allows users to import the only area which is currently visible in QGIS canvas
- Resolution Patch: allows users to define the maximum spatial size of one patch in degrees.
- Resolution Levels: allows users to define size o the cell for each resolution level
- Keep Same Resolution: can be activated to secure exact same import resolution as the original dataset
- Prevent Higher Resolution: can be activated to secure that import resolution won't be lower than the original dataset
- Active Geometry Fix: can be activated so the algorithm will try to fix the Geometry of the vector. Please note that activation will lead to very slow import processing
- Clip No Data: - will prune data of corners doesn't contain any data
- Resampling Method: allows user to define which method will be used for raster resolution change
- Convert no data: allows user to define if noData vales from the original dataset should be ignored during average and summary method (if chosen as resampling method)
A resamplig method is only applied when data needs to be resampled (e.g. the output resolution is different from the input data). The following are the available resamplig methods:
- 0 = Nearest Neighbour: the value of closest input cell overlapping the output cell
- 1 = Bilinear: a weighted distance average of the four nearest input cell centers
- 5 = Average: an average of all input cells spatially overlapping the output cell
- 7 = Maximum: the highest value from all input cells spatially overlapping the output cell
- 8 = Minimum: the lowest value from all input cells spatially overlapping the output cell
- 9 = Summary: the sum of all input cells spatially overlapping the output cell
To use the Municipal Budget tool in ur-scape, users will need to import data with administrative areas. These datasets need to be GIS polygon vector data, ideally with a field representing the names of administrative units.
- For Municipal Budget: set this variable to
True
when generating data for the Municipal Budget tool
To use the Reachability tool in ur-scape, users will need to generate a data layer with road network information. Please note that this requires GIS line vector data.
- For Reachability: set this variable to
True
when generating data for the Reachability tool
- NetworkMap: can be used for mapping the field values to the predefined ur-scape road categories (Highway, Highway Link, Primary and Secondary). Values that are not specified in this list will be automatically assigned as road category "Other". Values that should be not exported can be added to the "Ignore" category.