Section 23
Section 23
8)
This section discusses various ways in which SATURN users may interface their
SATURN data with GIS systems such as MAPINFO and ARCINFO and vice-versa
with a view to obtaining the best possible outputs by the using two sets of systems
in combination.
We note that SATURN has its own system of “.GIS files” which should not in any
way be confused with “proper” GIS systems such as ARCINFO. What a .GIS file
provides is a very simplified form of data coding whereby useful data such as
information on the shape of curved links, node text names, etc. etc. may be
accessed by SATURN programs to make their outputs more meaningful. Indeed
one of the objectives of this section is to suggest ways by which .GIS files may be
set up automatically from GIS systems and their associated data bases.
A slightly different form of software with which SATURN may be usefully linked
are packages such as GoogleEarth which can provide background .bmp files for
network plots as well as extremely useful network information such as lane
structure at intersections.
In general there are three forms of data which a user might wish to export from
SATURN into a GIS system:
Matrix data
Link-based data
Of these the third is the most common whereby a SATURN user wishes to export
assignment outputs such as link flows or speeds for display or manipulation in a
GIS system. The simplest and most common way to do so is to use an ASCII file
dump from a program such as SATDB or P1X (11.10.9) or utilities such as
DBDUMP (see 15.46) to create ASCII files which can be read by a GIS system.
One problem that arises here is that SATURN identifies links in terms of their A-
node and B-node numbers but a GIS system may not have the same information
but prefer to have its data geo-coded by co-ordinates. There is a very useful
option within “Read Miscellaneous Data” in SATDB where option x creates 4 data
columns consisting of the (X,Y) co-ordinates for both the link A-node and B-node;
clearly these may then be included on an output ASCII file to geo-code each link
entry.
Topological network data is generally already available and more easily accessed
in GIS packages than in SATURN but there are circumstances, as explained
below in Section 23.4, where it is useful to build a GIS network from a basic
SATURN network data base.
This section lists a number of “typical” data sets which may be easily created
within GIS systems and exported into SATURN as ascii data files. References to
the appropriate sections in the Manual which provide further information (e.g.,
formats) are given.
Curved links (which may then be used to set link distances in SATNET;
15.10.1)
Use of Data Field Editing for e.g., link distances in P1X (See 11.9.17)
Miscellaneous
Trip ends (e.g., for use in matrix Furnessing and/or factoring; see 10.7.5)
Requirements
MapInfo should be installed (No known problems with MapInfo versions 6.x,
7.x and 8.x).
SATURN *.dat file (for displaying network) and SATURN *.lks file (for
displaying assignment results such as flows.
Further information may be found in the Online Help files located in the folder
\TEST\GIS Tools.
SaturnTools.mbx,
AtkinsSaturnTools.chm,
AtkinsModelTools.Icons,
AtkinsModelTools.exe
SaturnTools.ini
SaturnTools.log
Start the program by double clicking the SaturnTools.mbx this will automatically
start up MapInfo with the SaturnTools Menu under Tools >> SATURN tools.
In addition, SATURN Tools can be found under a new menu called Atkins
Modelling Tools or alternatively the most commonly used tools can be accessed
directly from the Saturn Toolpad menu buttons.
Follow the instructions below to instruct MapInfo to load Saturn Tools on every
start up. To do this do not double click on SaturnTools.mbx to start MapInfo.
Press OK.
3) Make sure Saturn Tools is in the Tools list on the Tool Manager form. Check
the Autoload check box.
4) Press OK.
Saturn Tools creates a special menu under Tools >> Saturn Tools. This special
menu can also be found under a new menu called Atkins Modelling Tools >>
Saturn Tools or alternatively the most commonly used tools can be accessed
directly from the new Saturn Toolpad menu buttons.
On first use after starting Saturn Tools will prompt the user for an output path.
Create Nodes
Import Network
Create Bands
Create Turns
Label Links
Settings
Styles
Log
Instructions
SATURN batch files
3) Accessing menu from the a new menu called Atkins Modelling Tools >>
SATURN Tools.
CREATE NODES
The first thing stage is to create a Node table. This is done by clicking Create
Nodes and the specifying a SATURN *.dat file. SATURN Tools then extracts the
node coordinate information from the 55555 section of the Dat file and plots them
in a new map window.
SATURN Tools also reads the following settings from the &PARAMS section of
the *.dat file and uses them to interpret coordinate information.For this reason,
users are expected to have some knowledge of the SATURN parameters:
XOFFSET and YOFFSET which are parameters that SATURN Tools will read
and use in shifting / translating the coordinates for the points. The tools will
offset/shift the coordinates read by the value given to XOFFSET and
YOFFSET respectively. This is useful since some models strip the first digit of
Create nodes creates a Node table with the Nodes and Centroids. Centroid IDs
are stored as 10000000+the SATURN ID.To display the node numbers as label
use the NodeLabel field where centroid number are stored as "C 12" where 12 is
the centroid number. The column NodeType will contain "C" for centroid nodes.
The table uses following MapInfo files:
The created files are stored in the directory specified in the Settings menu.
Next step is to import the Network from a SATURN.lks file. This is done by clicking
Import Network and the specifying a SATURN *.dat file.
The network file must be a dump from SATURN with the format described below.
The node table can be any table containing points with fields named NodeId, X
and Y with IDs corresponding to the chosen *.lks file or *.kp file.
To make SATURN Tools automatically create a Turn Layer, check the Generate
Turn box option.
The Generate Centroid Connectors option allows users to turn off the generation
of Connectors.
SATURN tools reads the column names from the Column header section and
automatically substitutes illegal characters such as -,?,+,/,! etc. If the import
malfunctions you can modify this section to have unique names (not starting with
a number) to see if it helps. SATURN Tools may not be able to establishes the
DUTCH Setting within the *.kp or *.lks file and will present the user with a choice
that should be the same as the settings within the *.dat file otherwise the program
fails.
Create Nodes creates a network table with Links and optional Centroid connectors
and an optional Turn table with information and creates optional turn graphics.
This creates the following MapInfo files:
The created files are stored in the directory specified in the Settings menu.
LOGFILE TRACE
,Network Inputfile:
C:\wsatkins\MapBasic\SATURN2MI\Data\Dutch=T.FLW\AMNETEXT.lks
,Node Inputfile:
C:\wsatkins\MapBasic\SATURN2MI\Data\Results\Node_Amnete_f.TAB
,Centroids: T,Turns: T
,Net Outputfile:
C:\wsatkins\MapBasic\SATURN2MI\Data\Results\Net_AMNETEXT
,Turn Outputfile:
C:\wsatkins\MapBasic\SATURN2MI\Data\Results\Turn_AMNETEXT
Create Bands is a tool that will work for any MapInfo table containing Lines or
Polylines. It creates a new region layer containing bands or buffers with varying
width depending on the value of a field in the table.
To use the Create Band tool, click Create Bands and the following form then
appears:
First select a Link Table (any table containing lines or poly lines will do). Link
tables created by SATURNTools will have a Net_ prefix. Once the table has been
selected you must select a field containing a number by which value the
bandwidth is determined. If the selected field is not a number you get an error
message asking you to select a numerical value.
As soon as a proper field has been selected a series of statistics are presented on
the form:
Max width: - specifies the width of the band for the given maximum value.
BANDWIDTH INFORMATION
These values allow the user to specify the some form of scaling of the attribute to
be displayed as Bands.
Units: This value specifies how values, used for labelling, are rounded. A
value of 1 would be suitable for variables such as vehicle flows for example;
Meters per Unit - this value specifies the width of the bands per unit. e.g.
Units 10 and Meters per Unit 1 gives a band width of 10 for a value of 1.
Fixing the units and changing the Meters per unit allows one to decrease or
increase the band widths of the network at map scale. By clicking recalculate
settings after a change, max bandwidth on the network is calculated based on
these settings; and
Offset: - This value specifies a parallel offset from the link to the band.
LEGEND CHECKBOX
If this checkbox is ticked a legend will be added to the Bandwidth table. The
legend will be place in the lower left corner of the Mapper window. The attribute
SIDE will have the value “LEGEND” for all legend items. The legend can be
moved in MapInfo by setting the band layer editable then selecting the items with
Side=”LEGEND” and selecting the pointer tool.
The easiest way to use this function is to zoom in to your network with the Lower
Left corner in the Mapper placed where you want your legend to be then run
Create Bands. To show the values set the label for the bands to Value and use
the label placer tool in MapInfo. To change the Legend entries click the settings
button.
SETTINGS
If the statistics doesn’t seem to change click the Recalc Max Width button. Note if
you've got special regional settings for your computer MapInfo might misinterpret
the values you put in (i.e 1,000 as 1 instead of 1000).
STYLES
The styles of the bands can be changed using the style selector buttons under
Positive and Negative values.
CREATE BANDS
Pressing this button will create bands for the selected link table.
Create Bands creates a band table based on the links in the input file. This
creates the following MapInfo files:
<Inputfile name>_bands.TAB
<Inputfile name>_bands.MAP
<Inputfile name>_bands.ID
<Inputfile name>_bands.IND
<Inputfile name>_bands.DAT
LOGFILE TRACE
Create Bands leaves the following type of information in the SATURNTool.log file
,Network Inputfile:
C:\wsatkins\MapBasic\SATURN2MI\Data\Results\Net_AMNETEXT.TAB
,Band Outputfile:
C:\wsatkins\MapBasic\SATURN2MI\Data\Results\Net_AMNETEXT_Bands
SATURN Tools has the option of creating the Turn graphics when creating the
network. Select a MapInfo Turn table created by SATURN Tools when prompted
for a turn table. The Create Turns menu option will then add turn graphics to the
turn table.
Stars represent Turns between coinciding nodes (allowed in SATURN, but not
displayable in MapInfo).
TURN SPECIFICATIONS
The Turns that are created are what is called Unit Turns. They have the following
default properties:
Note that it is possible to use the tools on a selection from a turn table created by
SATURN Tools (so you don’t have to wait hours for all 35.000 turns to map if you
just want to see one area). Below is a zoom in from MapInfo showing you the
detail you can get
LOGFILE TRACE
Create Turns leaves the following type of information in the SATURNTool.log file
,Turn Inputtable:
C:\wsatkins\MapBasic\SATURN2MI\Data\Results\Turn_amnete_F.TAB
The Label Links tool enables the user to present labels on both sides of all links in
a network.
The user must specify a Link table and the field to be displayed.
Round to nearest: value rounds the value from the chosen Label field to the
fraction entered here. (eg set to 1000 a value of 123456.789 will be displayed as
123000 and set to 0.5 this displays as 123457.0)
Label Box Chars: value decides how many characters will be reserved for creating
the box highlighting the value.
Distance to Link: Value specifies the distance from the link to the label centre.
Threshold: When ticked this box enables the Neutral and Negative Values Style
buttons. It also creates three layers to label.
Label Links creates a Link table.The table uses following MapInfo files:
The created files are stored in the directory specified in the Settings.. menu or the
path specified on first use.
23.4.8 Settings
The SATURN Settings menu allows you to set style of the map objects that
SATURN Tools creates. It also allows you to specify the output directory for
MapInfo tables that it creates. You can save your settings to the ini file that loads
automatically on start up. If you are unhappy with your settings press the default
settings button to revert to the hardcoded standard.
SET STYLES
The Settings menu option Set Styles gives the user the possibility of changing the
styles of the SATURN network elements that are to be imported. See Styles
below.
BANDWIDTH SETTINGS
The Settings menu option Bandwidth Settings gives the user the possibility of
changing the variables of SATURNTools Bandwidth tools. See below.
Pressing the Edit LegendList button gives the user the option to enter new values
or a different number of Legend entries. The text string to be entered must be a
semicolon separated text string ending on a ;. E.g. 1000;5000;10000; 5000;50000;
for the above window.
OUTPUT FOLDER
The Output Directory Browse button allows the user to specify a folder for MapInfo
tables created by SATURN Tools. In other words after setting this folder Nodes-,
Network- and Turn-tables that you import will be saved in the specified folder.
Do as instructed select the desired directory and click the Save button. (I know it’s
not logical, but this is the best work around in MapBasic that I could think of – if
you’ve got a better solution don’t hesitate to let me know - Erik).
GENERATE TURNS
This check box indicates if turns will be created along with the network creation.
The default is unchecked.
This check box indicates if Centroid Connectors (buffer and simulation) will be
created along with the network creation. The default is checked.
SAVE SETTINGS
By clicking this you save the current settings to an INI file in the application
directory. This is the path where your mbx file is located. The INI file is named
SATURNTools.ini
Change the line beginning with CoordSys = to your prefered MapInfo projection
keep it all on one line
CoordSys = CoordSys Earth Projection 8, 79, "m", -2, 49, 0.9996012717, 400000,
-100000
DEFAULT SETTINGS
The Default Settings button resets all Styles and sets the output directory to the
path of the SATURNTools.mbx plus \Data. The values used in Create Band are
also reset.
23.4.9 Styles
Using this menu option allows you to change the Style setting for all the features
created by SATURN Tools. These settings are reset if you choose Default
Settings in the Settings menu. The Styles are not saved in the INI file.
23.4.10 Log
SATURN Tools are now equipped with an ever growing log file. It is the
responsibility of the user to clear this log to prevent it from growing to unheard
proportions. The log keeps track of time of execution as well as input and output
files from the following processes:
Create Node
Import Network
Create Bands
Create Turns
To view the log entries select Log in the menu and then press View Log.
To exit the Log screen press the X in the upper right corner.
23.4.11 Instructions
23.4.12 Example
An example MapInfo workspace has been provided with the tools. SATURN data
files are kept separate from the MapInfo files. Use the help file to run a test on this
data.
SATURN Tools also includes 3 batch files to speed up the process of extracting
data from SATURN for use with the tools. SATURN should be installed on the
machine for the batch files to run and the batch files themselves will be found in a
folder \BATS within the installed tools.
MAKEDATA.BAT
Produces network and link data for MapInfo based on DA Codes. The Command
is:
This will produce a file containing actual flow information for the UFS file
'DS2011v1'.
MAKELINK.BAT
Dumps network link list for MapInfo. Command is MAKELINK .ufs file eg,
MAKELINK DS2011v1. This would produce a file containing link information for
the ufs file 'DS2011v1'.
MAKEFLOW.BAT
Dumps link flow list for MapInfo. Command is MAKEDATA .ufs file eg,
MAKEDATA DS2011v1. This would produce a file containing link flow information
for the ufs file 'DS2011v1'.
File Inputs may be obtained by typing the name of the batch file eg MAKEDATA
will produce:
C:\>MAKEFLOW <return>
^<Difference = #1 - #2^>
C:\>
Atkins SATURN GIS Creator Tools is a set of MapInfo tools developed by Atkins
Transport Planning to ease the creation of a curved links for a SATURN GIS
(*.GIS) file. This version of SATURN GIS Creator Tools is now available to the
larger SATURN community subject to conditions defined in the Disclaimer.
Updates to the tools will be available from http://www.SATURNsoftware.co.uk/
tools/AtkinsSATURNGISCreator.zip.
REQUIREMENTS
MapInfo should be installed (No known problems with MapInfo versions 6.x,
7.x and 8.x).
A SATURN Network, typically imported into MapInfo using Atkins Model Tools
(SATURN Tools) or any other network table containing Anode and Bnode
columns representing the SATURN Anode and Bnode.
DISCLAIMER
Atkins SATURN GIS Creator Tools are provided to the SATURN Community by
Atkins Transport Planning and may not be passed to any third party without the
consent of Atkins Transport Planning, contact information is provided in
Comments and Suggestions. These tools are provided as is subject to the
condition that users do use them at their own risk and any express or implied
warranties are disclaimed.
AtkinsSATURNGISCreator.MBX
AtkinsSATURNGISCreator.chm
AtkinsModelTools.Icons
AtkinsModelTools.exe
23.5.2 Instructions
Once installed the SATURN GIS Creator Tool creates a special menu under
Tools, this menu can also be found under Atkins Modelling Tools. Alternatively the
most commonly used tools can be accessed directly from the new SATURN GIS
Creator Tool pad.
Move Node
Adjust Links
Match Networks
Instructions
Clicking the the move node tools will call for the network and links table.
This is typically a network taken from SATURN using the Atkins SATURN Tools
comprising of a Nodes and Network Table. These need to be set before using the
tools.
Clicking OK will open a mapper window with the two selectable tables. Editing can
be done in any mapper window where both tables are open and selectable. If you
have not set the tables you will get a message in the Message window.
The following lists essential tables and the recommended fields. Compulsory
fields are in Bold other fields may be added at your leisure.
NODES
X Float ;
Y Float ;
NETWORK (MASTERNETWORK)
BNode Integer ;
CNode Integer ;
The Move Node is a tool button.It affects the way the cursor interacts with the
mapper. Click on a node and drag a line to the new location for the node.
The tool works on the basis of values in the Anode and Bnode fields of the Link
table. This means that all links with either an Anode or a Bnode identical to the
moved node's NodeID will be changed. A normal MapInfo edit session will only
move one line at a time.
When working with polylines only the first or last section is changed.
HINT! Holding SHIFT down while using this tool makes it work like the Adjust
Links tool Holding SHIFT+CTRL makes it move vertices.
Click the button, hold and drag to new location. Easy as that.
Use this tool to curve the imported SATURN links. The tool introduces a new
vertex to the lines under the point where first selected. The position of the vertex
is decided by the position of the cursor when you let go of the left button.
Holding down CTRL when using the tool enables you to move vertices in the line
instead of creating new ones.(This can be used as a kind of un-do function if
minor mistakes are made since there currently is no undo function).
Be careful when adding vertices that they do not overlap. This can cause some
problems when adding further vertices.
Click the link and hold and drag cursor to the location of the new vertex.
A vertex is added to all links found under the cursor on the first click. Undo will
only undo the last of these actions and should as a rule not be performed when
using these tools.
Press CTRL and click the link and hold and drag cursor to the new location.
Vertices are moved in all links found under the cursor on the first click. Undo will
only undo the last of these actions and should as a rule not be performed when
using these tools.
This function will export all curved links found in the specified link table as well as
all the nodes in from a specified node table into a SATURN GIS file filling the
77777 card and the 88888 card respectively.
Use SATURN’s P1X to open the normal network then read the .GIS file. This can
be done by selecting:
GIS File
Once open please make sure that the heading in the right-hand menu reads:
Curved lines. If it does not, then change this by toggling the No Curves heading.
Then click on Re-Plot.
DUTCH
XYUNIT
XOFFSET
YOFFSET.
A wrong input of any of these parameters will mean that SATURN may not be
able to find the matching link’s start and end or most likely will display unexpected
results.
Details of the parameters are provided in the main SATURN tools help file.
Clicking Yes will open the file in Notepad. If Notepad is not installed this may
cause an error.
The tool exports both links (up-stream and down-stream) SATURN will only use
one of them to represent the flows depending on SATURN parameters this may
be the first or the last link occurring.
**************************************************************************
********************************
&PARAM
DUTCH = F
FREEXY = T
XYUNIT = 1
XOFFSET =0
YOFFSET =0
&END
77777
90220 90252
500047.76 303737.34
99999
88888
C 1 457210 339820
C 2 456930 340170
C 3 456580 340150
99999
The purpose is to match two networks (the source is the MasterNetwork and the
receiving network is the Destination network). The match is done by coupling
records with identical pairs of Anode and Bnode and cloning the geographic object
from the MasterNetwork to the Destination network.
The Destination network will end up having an integer field named Matched. The
Matched field will be either 1 for a successful match or 0 for no match.
This tool is useful for a lot of purposes. You can use it to identify link differences
between two SATURN Networks (e.g. by creating a thematic map showing
Matched 0 as thick red).
You can also use it to put objects to a table containing ANODE, BNODE fields
without having to do complex queries and update statements. (e.g. if you have a
fixed Band table of your whole network, you can still use this tool to get the
polygons across from one table to another while keeping the attributes of the
destination table).
BACKGROUND INFORMATION
The SATURN Tools allow you to import result files from SATURN as straight line
links.
In order to apply your curved links to the results you will use the Match Networks
function.
Once you have shaped your network in MapInfo using the SATURN GIS Creator
Tools you should save a master copy of the Links and the Nodes. The prime
function of the master tables is to store the line shapes and node locations used in
any of your scenarios and it is highly recommended that you use one file to store
the links for all scenarios for a model area.
Figure 23.38 - Shaped Master Network for the Epsom sample network
Figure 23.39 - Imported Results from SATURN kp file for the Epsom sample network.
Use this tool to create a bitmap and *.XYB file that can be added to SATURN as a
GIS raster file. SATURN handles BMP's of a maximum dimension of 2000x2000
pixels.
REQUIRED PARAMETERS
Maximum Output Width or Height (pixels) - Reduce this number to create smaller
BMP files - below 96 is not recommended as the image will appear rough even at
the same scale as you see it on the screen now.
Font Size - decides the size of the Copyright notice that will be added to the
image.
BMP and XYB File Name (no extension) - the filename of the bmp file and the XYB
file.
Find Tiles - a check box to indicate whether the program should open tiles that fit
the window or not to do so (in all cases the tiles needed will be listed in the
message window).
1st Tile Path - The first folder to be searched for Tile tables if tile is not found here
the next folder will be searched and so on.
2nd Tile Path, 3rd Tile Path, 4th Tile Path - As above but lower priority.
You will then get a confirmation that the file was saved
The XYB file might need to be modified to match your SATURN XYFORMAT and
XYUNIT settings.
The contents of the XYB file is minx miny maxx, maxy taken from the Mapper
window corners.
The tool allows you to specify folders in which to search for 50K raster tiles. Tiles
must be British National Grid 20km by 20km Square and the names should be in
the form SU88.tab.
The table named RasterFolders.TAB in the program folder contains four records
the order of which decides where the tools will look for Raster Tiles.
Editing this table and committing the changes effect the default values for the
tools.
Note the all paths must end in a '\' character or the tools may fail.