Material Tracking Queries
The Material Tracking information can be retrieved from the system using the C# client library.
The information stored by the Material Tracking Layer can be used equally to produce visualizations and to compute reports. In both cases, the functioning principle is the same: the Material Tracking Layer receives a query that selects individual voxels based on whether they meet the query criteria or not. The queries can be complex Boolean expressions that involve both attributes and genealogy operators.
The voxels that are selected can then be combined with other volumes, like terrain models, planning solids using further volumetric Boolean operations. These can be visualized, or have their volume and attributes used in reports.
A Material Tracking Query is a string that contains a symbolic expression. This expression produces a Boolean result, and it is evaluated for every voxel in a visualization or report region. If the expression returns TRUE the voxel is selected. Selected voxels will participate in visualizations, and will have non-zero volume when inspected by reports.
The query language supports the following operators:
val(attr) |
Represents the value of the provided attribute. For instance: “val(fe) > 50” Would return TRUE for voxels with attribute “fe” value greater than 50. |
from_region(R, t0, t1, t2, t3) |
Returns TRUE if the material present in the voxel at the t2..t3 timespan was contained within spatial region R during the t0..t1 timespan. The region R is a symbol that must be defined to the query evaluation before using this query. |
to_region(R, t0, t1, t2, t3) |
Returns TRUE if the material present in the voxel at the t2..t3 timespan was moved to spatial region R during the t0..t1 timespan. The region R is a symbol that must be defined to the query evaluation before using this query. |
from_singularity(S, t0, t1, t2, t3) |
Returns TRUE if the material present in the voxel at the t2..t3 timespan was contained by the singularity S during the t0..t1 timespan. For instance: “from_singularity(Truck01, 0, 200, 200, now)” Will return TRUE if the current contents of the voxel were transported by the truck with ID “Truck01” before timestamp 200. |
to_singularity(S, t0, t1, t2, t3) |
Returns TRUE if the material present in the voxel at the t2..t3 timespan was moved into the singularity S during the t0..t1 timespan. For instance: “from_singularity(Crusher01, 0, now, yesterday, yesterday)” Will return TRUE if the contents of the voxel went today into the crusher with ID “Crusher01”. |
contains(R) |
Returns TRUE if the voxel is contained within spatial region R. The region R is a symbol that must be defined to the query evaluatior before using this query. |
timespan(t0, t1) |
Returns TRUE if the voxel has information defined for the provided timespan t0..t1. For instance: “val(fe) > 50 & timespan(300, 500)” Returns TRUE if the value for iron is greater than 50 between timestamps 300 and 500. |
set(attr, value) |
Returns TRUE if the value of an attribute of type SET matches the value specified as second parameter. |
> |
Greater than |
>= |
Greater or equal than |
< |
Less than |
<= |
Less or equal than |
= |
Equal |
!= |
Not equal |
( ) |
The query language supports parenthesis for expression grouping. We recommend using parenthesis whenever the operation order would be subject to operator precedence rules. The operator precedence order is:
|
The C# client uses an interaction model where different data layers are stacked together in a single request to a content service. It is possible to include a Material Tracking Layer in this stack, which makes the system return information about the tracked materials.
For the Material Tracking Layer metadata in the layer stack, the caller can define:
- A query that determines which voxels will be selected
- A list of attributes that will be retrieved per voxel
The request metadata can be extended to include spatial intersections between multiple datasets. For instance, the voxels output by the Material Tracking Layer can be intersected with a custom volumetric solid that represents a bench, or a terrain model using several dates.