Defining data display rules: using the SiteVision Manager
Use the SiteVision Manager to tell SiteVision how to interpret and display your data.
When defining your rules, it is important to understand your data set and how the data was collected, particularly with regard to depths and elevations. This enables SiteVision to vertically offset geometries correctly, placing objects on the ground or at the correct depth below ground level.
To install the SiteVision Manager, download it from the SiteVision website and install it on your office computer.
To launch the SiteVision Manager, click the SiteVision Manager icon on your desktop.
You can also download sample Rules files.
To exit the SiteVision Manager, click File / Exit or click X in the top right corner.
The app has:
-
three Rules panels—Feature Class, Attribute, and Discrete
-
two Display Style panels—Points and Lines.
Feature Class |
Feature Class rules allow you to specify how you want SiteVision to display your feature classes. To enable SiteVision to vertically offset geometries correctly, you will need to know how the data was collected to configure these rules. You can also apply a style (a symbol, or a color) to a feature class, and set it to display or be hidden. If your Feature Class rules meet your data interpretation and display requirements, you do not need to define Attribute Rules or Discrete Rules, or configure Point Styles and Line Styles. You do not need to define Feature Class rules if you define Attribute Rules and / or Discrete Rules that meet your requirements. |
Attribute Rules |
Attribute Rules define how the attributes within a feature class are interpreted in SiteVision. You can define Attribute Rules as well as Feature Class rules to further specify how you want SiteVision to display your data. You can define only Attribute Rules; if they meet your data interpretation and display requirements, you do not need to define Feature Class rules or Discrete Rules, or configure Point Styles and / or Line Styles. However if you use the Feature Display Style option when defining your Attributes Rules, you must have Point Styles and/or Line Styles defined. You have two feature classes that both have Pipe_Diameter as an attribute type, and the Pipe_Diameter attribute has different units in each of the feature classes. You want to distinguish between the same attribute Pipe_Diameter on the different feature classes, so you would define two Attribute Rules, and select the On Feature class option and specify the feature class name for each of the rules. You do not need to configure Point Styles and / or Line Styles, but if you define Attribute Rules using the Attribute Use = Feature display style option, you must define Point Styles and / or Line Styles. |
Discrete Rules |
Discrete Rules allow you to define rules that apply to specific attribute values within a feature class. If your Discrete Rules meet your data interpretation and display requirements, you do not need to define Feature Class rules or Attribute Rules. You do not need to configure Point Styles and / or Line Styles if the default values meet your display requirements. |
Point Styles |
Use Point Styles to define your own point styles to use with Attribute Rules, Discrete Rules and/or Features Class rules. Apply a symbol to the style, and if required, a scale.
|
Line Styles |
Use Line Styles to define your own line styles to use with Attribute Rules, Discrete Rules and/or Features Class rules. Apply a line profile to the style, and if required, a color.
|
When you define rules, save the file as a *.rules.json file type. The file must be stored:
-
either in the Trimble Connect folder alongside the model data. It must be in the same folder, but the model and the Rules file do not have to have the same name.
-
on your mobile device in the \Internal shared storage\Android\data\com.trimble.sitevisionAR\files\Config directory. The model and the Rules file do not have to have the same name.
If you have Rules files in Trimble Connect, and also on your mobile device, the Rules files on the mobile device are ignored.
The order of your rules is important:
-
If you have multiple rules files, the rules are applied based on the Rule type first: Discrete Rules first, followed by Attribute Rules, followed by Feature Class rules. Within these three categories, the rules are then sorted alphabetically based on their file name.
-
the rules are applied to your data in the order that they are listed in the Rules file.
-
Within a Rules files, the following hierarchy applies—if you have an Attribute rule that competes with a Discrete rule within the same Rules file, then the Discrete rule takes precedence. So if a feature matches both rules, only the Discrete rule is applied to the feature, but if the feature only matches the Attribute rule, the Attribute rule is applied.
Values that you type in when defining your rules are not case-sensitive.
To load an existing Rules file, click File / Open... and navigate to the required file. Select the Rules file to load it into the SiteVision Manager. The file path and name shows at the top of the window.
To create a new Rules file, click File / New. Note that you can start a new Rules file if you already have a Rules file open; the new Rules file becomes the active file.
To save changes you have made to an existing open Rules file, or to save a new Rules file you have created, click File / Save.
To save an existing open Rules file as a new file, click File / Save As... and give the file a new name.
Within each of the rules panels you can:
-
re-order the rules. Click the Up / Down priority arrows in the top right corner of an item to move it up or down.
The order of the rules within each rule type (Feature Class, Attribute, and Discrete) controls the priority of the rules—i.e. the order in which they are applied / which rule is applied.
You have two feature class rules; one to display the feature class Wastewater as blue, and another to display all feature classes as orange.
-
If the Wastewater=blue rule is above the other rule, it will be applied to the feature class Wastewater and color them blue, and then the second rule will be applied to color the remaining feature classes orange.
-
If the feature classes = orange rule is above the Wastewater=blue rule, it will be applied to all feature classes, including the feature class Wastewater, and color them orange.
The order of your Point Styles and Line Styles is not important, unless you have inadvertently defined a style with the same name. However ordering Point and Line Styles allows you to group similar styles together, which is useful to help manage the task of creating and maintaining a large style library.
-
-
delete a rule. Click the trashcan icon in the top right corner of an item to delete it.
-
define more rules. Click at the bottom of the window.
In the Feature Class panel, specify the height that your data describes and any potential styles to apply to the entire feature class/dataset.
-
In the Feature class field:
-
Select an operator from the dropdown:
-
Equals - an exact match, useful to define a rule for a particular feature class name.
-
Contains - a partial match, useful to define a rule for any feature classes that are similarly named.
-
Starts with - useful to define a rule for any feature classes with names that start the same.
-
Ends with - useful to define a rule for any feature classes with names that end the same.
-
Wildcard - use wildcards (* or ?) along with your search text to widen the match results. * represents any number of characters; ? represents one character.
-
If you enter P*, all attribute starting with P are matched regardless of word length (e.g. PVC, Pipe diameter, Point).
-
If you enter P??e, only attributes containing four letters, starting with P and ending with e are matched (e.g. Pipe, pole, pane).
-
-
Matches everything - use this to define a catch-all rule, that applies to everything that doesn't match any rules defined above it. Using this option only makes sense when you define it as the last rule, to catch all 'other' feature classes that are not matched by any of the previous rules. This operator is mainly useful to turn off visibility.
-
-
For all operators other than Matches everything, type in the feature class name, or part of it depending on your selected operator, that you want to define the rule for.
-
-
Specify the Geometry height. You will need to know how the geometry was collected / surveyed, and select the correct option here so that SiteVision can correctly manage the geometry's vertical offset.
-
Select a Display style if required; from the dropdown select a symbol or a color to instruct SiteVision how to display the entire feature class.
-
Toggle the Visible switch on or off to set the feature class to display or be hidden as required.
If you set the Visible switch to off, the layer in SiteVision will be hidden. You can turn visibility on in SiteVision using the Layers visibility switch. See Viewing a model for more information.
In the Attribute Rules panel, define rules to specify how SiteVision interprets your data and displays a feature's attributes.
-
In the Attribute field:
-
Select an operator from the dropdown:
-
Equals - an exact match, useful to define a rule for a particular attribute name.
-
Contains - a partial match, useful to define a rule for any attributes that are similarly named.
-
Starts with - useful to define a rule for any attribute names that start the same.
-
Ends with - useful to define a rule for any attribute names that end the same.
-
Wildcard - use wildcards (* or ?) along with your search text to widen the match results. * represents any number of characters; ? represents one character.
-
If you enter P*, all attribute starting with P are matched regardless of word length (e.g. PVC, Pipe diameter, Point).
-
If you enter P??e, only attributes containing four letters, starting with P and ending with e are matched (e.g. Pipe, pole, pane).
-
-
Matches everything - use this to define a catch-all rule, that applies to everything that doesn't match any rules defined above it. This operator is mainly useful to turn off visibility.
Using this option only makes sense when you define it as the last rule, to catch all 'other' attributes that are not matched by any of the previous rules, unless you are defining the rule for a specific feature class (see step 2)—then this rule does not have to be the last rule.
-
-
For all operators other than Matches everything, type in the required attribute name, or part of it depending on your selected operator, that you want to define the rule for.
-
-
Define the rule to apply to the selected attribute(s) for any feature class that contains the attribute(s), or for a specific feature class only:
-
to specify a feature class, make sure the On Feature class dropdown is set to On Feature class and type in the required feature class name.
-
to define the rule on all feature classes with the selected attribute, click the On Feature class dropdown and select On any Feature class.
-
-
Select an Attribute Use to tell SiteVision how to interpret the attribute data.
The default type is Not specified—the feature will be displayed as a line or simple point depending on the data, and without any interpretation applied. To select a use, tap the dropdown:
-
Feature display style. Select this option if you have a point or line style defined for an attribute value for the attribute that you entered at step 1. SiteVision uses the point / line style settings that match attribute values for the selected attribute. See Defining Point Styles and Defining Line Styles below.
You can enter an attribute value here, and then define the Point or Line style later using the same name.
-
Attribute value layers. Select this option to use the attribute value to create sub-layers. The sub-layers are named the same as the attribute values.
A feature class named Pipe would, by default, place all its features into a Pipe layer. If the Pipe feature class has an attribute named Material, and you define a rule for this attribute with Attribute Use set to Attribute value layers you would instead get layers labeled with the values of the Material attribute (e.g. Concrete, Steel, PVC, etc.).
-
Symbol scale, Horizontal symbol scale, Vertical symbol scale. The attribute value will be applied as a scale factor, either horizontally and vertically, or only horizontally or only vertically. Note that this scale is applied multiplicatively along with any scale applied when defining the Point Style.
An attribute named Tree diameter might be used to scale a tree symbol to draw it correctly. However to achieve the desired scaled size, the original size of the tree symbol must be considered. e.g. a 2 m wide tree symbol scaled by an attribute value of 2.5 will be drawn 5 m wide.
-
Symbol rotation. Rotates the symbol by the attribute value, in degrees from north.
-
Point Feature, depth. Sets the point feature's depth from 1.5 m below the SiteVision Integrated Positioning System.
-
Point Feature, elevation. Sets the point feature's geometry elevation.
If you have a 2D point feature class representing the location of manholes, you can use this rule to define an elevation contained in the attribute table to set the elevation of each manhole, so that they display in the correct 3D position.
-
Pipe options. Select the option that describes how the pipe data was recorded, then select the unit of measurement from the dropdown. You will need to know how the pipe's geometry was collected / surveyed, and select the correct option here so that SiteVision can correctly position the pipe.
-
Pipe depth sets the polyline feature class depth from a reference point of 1.5 m below the SiteVision Integrated Positioning System when the data is 2D. With 3D data, a depth rule will modify the z value geometry of the polyline features, IF the feature class geometry height is set to Ground. If the geometry height is set to any of the other 4 options, a depth or elevation rule on 3D data will have no effect.
-
Pipe elevation sets the polyline feature class depth from sea level, regardless if the data is 2D or 3D. Likewise, if the geometry height within the feature class rule is set to anything other than Ground, a depth or elevation rule will have no effect.
-
Pipe external diameter, pipe internal diameter, and pipe thickness. When you use either of the diameter options within a rule, the associated feature class will display it as a pipe (rather than a line) , including and overriding any feature classes that have a line style associated with them that specify their profile as Line.
If you specify the external diameter + either the internal diameter or the thickness, SiteVision will only draw the external diameter (and not the internal diameter/thickness). If you specify internal diameter + thickness, and not external diameter, SiteVision will calculate the external diameter appropriately.
-
if you have a rule that specifies the attribute Depth to be "top of pipe elevation in meters", and then another rule that specifies Depth to be "bottom of pipe depth in cm", the rule that appears higher in the rules list will be the only one applied.
-
if you have multiple rules using that same attribute value that specify which feature class the rule applies to, then all of the relevant rules will apply. For example, one rule = Depth is "top of pipe depth in cm" on feature class Wastewater, and another rule = Depth is "top of pipe depth in m" on feature class Watersupply
You can define sloping pipes based on an upstream and downstream elevation/depth.
This requires two Attribute Rules to be created, each referencing the appropriate upstream and downstream attribute. The order of these Attributes Rules must match the direction of the pipe feature.
For example, a pipe is defined with an upstream invert depth attribute (upstr_id) of 2.5 m, and a downstream invert depth (dwnstr_id) attribute of 2.8 m. The pipe feature is drawn in the direction upstream to downstream. To correctly visualize this pipe the first Attribute Rule will contain: Attribute Equals upstr_id and SiteVision type Pipe invert, depth. The second Attribute Rule will contain: Attribute Equals dwnstr_id and SiteVision type Pipe invert, depth.
For this approach to work all pipes features on the affected feature class must have been created in a consistent direction.
The priorities of the rules (see using the up and down arrows, above) mean that an attribute can be interpreted only once by the SiteVision Manager. For example:
-
-
-
Toggle the Visible switch on or off to set the attribute to display or be hidden as required.
If you set the Visible switch to off, when you tap a feature in SiteVision, the attribute will be hidden in the Attributes pop-up. You cannot turn visibility on for the attribute in SiteVision. See Interacting with a model's features for more information on the Attributes pop-up.
Use Discrete Rules to define styles that the SiteVision app applies to attribute values in your imported data. The first style that matches an attribute's value is used to display the object.
Can use standalone. Can also not use at all.
To define a Discrete Rule:
-
In the Attribute field, select an operator from the dropdown and type in the required attribute name, or part of it depending on your selected operator, that you want to define the rule for. The available operators are:
-
Equals - an exact match, useful to define a rule for a particular attribute name.
-
Contains - a partial match, useful to define a rule for any attributes that are similarly named.
-
Starts with - useful to define a rule for any attribute names that start the same.
-
Ends with - useful to define a rule for any attribute names that end the same.
-
Wildcard - use wildcards (* or ?) along with your search text to widen the match results. * represents any number of characters; ? represents one character.
-
If you enter P*, all attribute starting with P are matched regardless of word length (e.g. PVC, Pipe diameter, Point).
-
If you enter P??e, only attributes containing four letters, starting with P and ending with e are matched (e.g. Pipe, pole, pane).
-
-
Matches everything - use this to define a catch-all rule, that applies to everything that doesn't match any rules defined above it. This operator is mainly useful to turn off visibility.
Using this option only makes sense when you define it as the last rule, to catch all 'other' attributes that are not matched by any of the previous rules, unless you are defining the rule for a specific feature class (see step 2)—then this rule does not have to be the last rule.
-
-
Define the rule to apply to the selected attribute(s) for any feature class that contains the attribute(s), or for a specific feature class only:
-
to specify a feature class, make sure the On Feature class dropdown is set to On Feature class and type in the required feature class name.
-
to define the rule on all feature classes with the selected attribute, click the On Feature class dropdown and select On any Feature class
-
-
When value. Select an operator from the dropdown and then type the attribute value, or part of it depending on your selected operator, you wish to target the rule with. The operators are:
-
Equals - an exact match, useful to define a rule for a specific attribute value.
-
Not equal - selects everything that does not match the attribute's value.
-
Less than - useful to define a rule specifying a minimum value for any numeric attribute values.
-
Greater than - useful to define a rule specifying a maximum value for any numeric attribute values.
-
Contains - a partial match, useful to define a rule for any attribute values that are similar.
-
Starts with - useful to define a rule for any attribute values that start the same.
-
Ends with - useful to define a rule for any attribute values that end the same.
-
-
Display style - From the dropdown, select the style that you want to apply to the feature containing the specified attribute value. You can select symbols, colors, or point / line styles that you have defined.
Start typing in the field to jump to the style you want to use.
You can enter a name here, and then create / define the Point Style or Line Style later using the same name.
Define Point Styles to use in conjunction with Attribute Rules, Discrete Rules and /or Feature Class rules to configure how your points will display in SiteVision using symbols and, if required, a scale.
You can define a Point Style first, then select it when you define your rule, or define your rule first then create the Point Style:
-
For use with Attribute Rules, create a point style which is named the same as an attribute value in your imported data. When you create your Attribute rule, select the attribute that contains the value that matches your point style name, then under Attribute Rules, select Attribute Use = Feature display style.
For an attribute Feature Type with values "hydrant", "water valve", "storm-water grate" etc., name your point styles "hydrant", "water valve", "storm-water grate" etc. The SiteVision Manager will then match these attribute values to the equivalent point style.
-
For Discrete Rules and Feature Class rules, you can name the point style anything you like. When you create your rule, under Display style select from the dropdown the point style you have created, or if you have not yet created the point style, type in the name that you will use to create the point style.
-
Click Point Styles, and enter a name for the style.
-
Select a Symbol file to represent the point.
Start typing in the field to jump to the Symbol file you want to use.
You can create your own symbols. See Creating and importing custom symbols.
-
Optionally, specify at what scale the point will display. For example, 0.5 to display the symbol at half its size, or 2 to display it at twice its size.
Define Line Styles to use in conjunction with Attribute Rules, Discrete Rules and /or Feature Class rules to configure how your lines will display in SiteVision using a line profile and a color.
You can define a Line Style first, then select it when you define your rule , or define your rule first then create the Line Style:
-
For use with Attribute Rules, create a line style which is named the same as an attribute value in your imported data. When you create your Attribute rule, select the attribute that contains the value that matches your line style name, then under Attribute Rules, select Attribute Use = Feature display style.
For an attribute Pipe Material with values "PVC", "Steel", "Concrete" etc., name your line styles "PVC", "Steel", "Concrete" etc. The SiteVision Manager will then match these attribute values to the equivalent line style.
-
For Discrete Rules and Feature Class rules, you can name the line style anything you like. When you create your rule, under Display style select from the dropdown the line style you have created, or if you have not yet created the line style, type in the name that you will use to create the line style.
-
Click Line Styles, and enter a name for the line style.
-
Select a line profile to represent how the line is displayed (Line or Pipe).
-
Optionally, specify a color for the line style. If you don't specify a color, the color is as specified in Trimble Connect.
Start typing in the field to jump to the color you want to use.