XA (TQL): Difference between revisions

From Tygron Support wiki
Jump to navigation Jump to search
Created page with "The 'XA' clause value is a variation on the 'X' clause value. The characters 'XA' should be followed by an underscore and the name of an Attribute; for example '''XA_MONUMENTAL'''. Also see the example below. The result of using 'XA' for the clause value, is the automatic creation of multiple TQL statements, one with each Item ID for that Clause Parameter that can be found in the project data. Items are only taken into account of they have..."
 
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
The 'XA' clause value is a variation on the [[X (TQL)|'X']] clause value. The characters 'XA' should be followed by an underscore and the name of an [[Attribute]]; for example '''XA_MONUMENTAL'''. Also see the [[#Example|example ]]below.  
The 'XA' clause value is a variation on the [[X (TQL)|'X']] clause value. The characters 'XA' should be followed by an underscore and the name of an [[Attribute]]; for example '''XA_MONUMENTAL'''.


The result of using 'XA' for the clause value, is the automatic creation of multiple TQL statements, one with each Item ID for that Clause Parameter that can be found in the project data. Items are only taken into account of they have a non zero value for the specified attribute.
The result of using 'XA' for the clause value, is the automatic creation of multiple TQL statements, one with each Item ID for that Clause Parameter that can be found in the project data. Items are only taken into account of they have a non zero value for the specified attribute.
Line 20: Line 20:
The TQL statement to obtain the names of the monumental Buildings is:
The TQL statement to obtain the names of the monumental Buildings is:
<pre>SELECT_NAME_WHERE_BUILDING_IS_XA_MONUMENTAL</pre>  
<pre>SELECT_NAME_WHERE_BUILDING_IS_XA_MONUMENTAL</pre>  
which internally is replaced with a list of TQL statements, separated by comma's,
which internally is replaced with a list of TQL statements, separated by a comma:
<pre>SELECT_NAME_WHERE_BUILDING_IS_1, SELECT_NAME_WHERE_BUILDING_IS_2, SELECT_NAME_WHERE_BUILDING_IS_4</pre>
<pre>SELECT_NAME_WHERE_BUILDING_IS_1, SELECT_NAME_WHERE_BUILDING_IS_2, SELECT_NAME_WHERE_BUILDING_IS_4</pre>
Its result will be a list of names, separated by comma's:
Its result will be a list of names, separated by comma's:
Line 26: Line 26:
Similarly, the TQL statement to obtain the culvert Diameters of the Culverts used by the water Overlay is:
Similarly, the TQL statement to obtain the culvert Diameters of the Culverts used by the water Overlay is:
<pre>SELECT_ATTRIBUTE_WHERE_BUILDING_IS_XA_MONUMENTAL_AND_NAME_IS_MONUMENTAL</pre>  
<pre>SELECT_ATTRIBUTE_WHERE_BUILDING_IS_XA_MONUMENTAL_AND_NAME_IS_MONUMENTAL</pre>  
Its result will be a list of values, separated by comma's:
Its result will be a list of values, separated by a comma:
<pre>1.0, -3.5, 2.0</pre>
<pre>1.0, -3.5, 2.0</pre>


Line 33: Line 33:


{{article end
{{article end
|notes=
|notes=*The following variants on XA exist:
**XCA: A combination between [[XC (TQL)|XC]] and [[XA (TQL)|XA]].
|seealso=
|seealso=
*[[YK (TQL)]]
*[[YA (TQL)]]
*[[X (TQL)]]
*[[X (TQL)]]
*[[XA (TQL)]]
*[[XK (TQL)]]
*[[XC (TQL)]]
*[[XC (TQL)]]



Latest revision as of 14:54, 19 May 2026

The 'XA' clause value is a variation on the 'X' clause value. The characters 'XA' should be followed by an underscore and the name of an Attribute; for example XA_MONUMENTAL.

The result of using 'XA' for the clause value, is the automatic creation of multiple TQL statements, one with each Item ID for that Clause Parameter that can be found in the project data. Items are only taken into account of they have a non zero value for the specified attribute.

Internally, the resulting TQL statements are placed in a single array; Similarly the result will be an array of TQL results.

Example

Consider the following (simplified) Building data of a project:

[ 
 { "id" : 0, "name" : "Lindelaan 3", "attributes": { "MONUMENTAL" : [0.0], "MEASURED_M2" : [200.0] } },
 { "id" : 1, "name" : "Kerklaan 40", "attributes": { "MONUMENTAL" : [1.0] } }, 
 { "id" : 2, "name" : "Achterweg 7", "attributes": { "MONUMENTAL" : [-3.5] } }, 
 { "id" : 3, "name" : "Achterweg 9", "attributes": { },
 { "id" : 4, "name" : "Kerklaan 61", "attributes": { "MONUMENTAL" : [2.0]} 
 { "id" : 5, "name" : "Duiker 1235", "attributes": { "CULVERT_DIAMETER" : [1.0]},
]

The TQL statement to obtain the names of the monumental Buildings is:

SELECT_NAME_WHERE_BUILDING_IS_XA_MONUMENTAL

which internally is replaced with a list of TQL statements, separated by a comma:

SELECT_NAME_WHERE_BUILDING_IS_1, SELECT_NAME_WHERE_BUILDING_IS_2, SELECT_NAME_WHERE_BUILDING_IS_4

Its result will be a list of names, separated by comma's:

"Kerklaan 40", "Achterweg 7", "Kerklaan 61"

Similarly, the TQL statement to obtain the culvert Diameters of the Culverts used by the water Overlay is:

SELECT_ATTRIBUTE_WHERE_BUILDING_IS_XA_MONUMENTAL_AND_NAME_IS_MONUMENTAL

Its result will be a list of values, separated by a comma:

1.0, -3.5, 2.0

Clause Parameters

The XA value can be used in the following TQL Clause parameters:

Notes

  • The following variants on XA exist:
    • XCA: A combination between XC and XA.

See also