Tygron Query Language

From Tygron Support wiki
Jump to navigation Jump to search
This article is a stub.

Queries

Land polygons

Query Value returned Clauses for specific query Clauses for entire group
LANDSIZE Amount of surface area. (m2)
DIKES The amount of surface area taken up by dikes. (m2)

Construction polygons

Query Value returned Clauses for specific query Clauses for entire group
LOTSIZE Amount of surface area used by a construction. (m2)
FLOORSIZE The amount of floorspace, based on constructions' lotsize and their amount of floors. (m2)
UNITS The amount of housing units, based on construction's lotsize and their unit size.
LOTPOLYGONS Whether something meats the criteria (1) or not (0). When used in a panel and the panel is opened, the polygon is highlighted.

Grid values

Query Value returned Clauses for specific query Clauses for entire group
GRIDAVG The average value of a grid.
GRIDSTDEV The standard deviation of a grid.
GRIDSVOLUME The surface area multiplied by the average grid value on that surface.
HEIGHT The average height of the terrain. (mNAP)
  • Grids (Including the value clauses)

Numeric values

Query Value returned Usable for specific query Clauses for entire group
ATTRIBUTE The numeric attribute value of an item.
GLOBAL The value of a global variable

IDs

Query Value returned Usable for specific query Clauses for entire group
IDs The numeric identifier value of an item.

Names

Query Value returned Usable for specific query Clauses for entire group
NAME The name or human-readable version of a technical name.

Active

Query Value returned Usable for specific query Clauses for entire group
ACTIVE Whether the item is active/under consideration (1) or not (0).

State

Query Value returned Usable for specific query Clauses for entire group
STATE What the current timestate is of an item.

Network

Query Value returned Usable for specific query Clauses for entire group
LENGTH The length of pipes/lines/cables of networks.

Stakeholder finances

Query Value returned Usable for specific query Clauses for entire group
EXPENSES The costs incurred by a stakeholder during a session.
REVENUE The income of a stakeholder during a session

Session

Query Value returned Usable for specific query Clauses for entire group
SESSIONSTATE Whether the project is currently in editor mode (0), starting a session (1), or in a session/testrun (2).
TOKEN The API token for this session.

Clauses

The following groups of clauses exist:

Main clause groups

Specific polygons

Clause As a polygon As an item Type
AREA It must intersect with this area. It must be data of this area specifically. ID indicating a specific area.
NEIGHBORHOOD It must intersect with this neighborhood. It must be data of this neighborhood specifically. ID indicating a specific neighborhood.
ZONE It must intersect with this zone. It must be data of this zone specifically. ID indicating a specific zone.
TERRAIN It must intersect with this terrain type. It must be data of this type of terrain. There are no specific "instances" of terrain. ID indicating a type of terrain.

Attribute polygons

Clause As a polygon As an item Type
AREA_WITH_ATTRIBUTE It must intersect with at least one area with this attribute. N/A Attribute name of one or more areas.
NEIGHBORHOOD_WITH_ATTRIBUTE It must intersect with at least one neighborhood with this attribute. N/A Attribute name of one or more neighborhoods.
ZONE_WITH_ATTRIBUTE It must intersect with at least one zone with this attribute. N/A Attribute name of one or more zones.
TERRAIN_WITH_ATTRIBUTE It must intersect with terrain with this attribute. N/A Attribute name of one or more terrains.

Grids

Clause As a polygon As an item Type
MAXGRIDVALUE It must intersect with at least this value on a grid overlay. N/A Decimal number.
MINGRIDVALUE It must intersect with at most this value on a grid overlay. N/A Decimal number.
GRID It must fall within this grid. It must be data of this grid overlay specifically. ID indicating a specific zone.
GRIDTYPE It must fall within this type of grid. It must be data of this type of grid, not a specific "instance" of this grid. Technical name indicating a type of grid overlay.

Note that each grid automatically covers the entire map, unless a minimum gridvalue or maximum gridvalue is defined. For queries such as GRIDAVG, this can be acceptable. However, for example, a query of SELECT_LANDSIZE_WHERE_GRID_IS_2 is functionally the same as SELECT_LANDSIZE.

Also note that when a GRIDTYPE is selected but multiple overlays of that type exist in the project, there are no guarantees on which overlay is used specifically.

Constructions

Clause As a polygon As an item Type
BUILDING It must intersect with this construction. It must be data of this construction specifically. ID indicating a specific construction.
NET_LOAD It must intersect with the building of this net load. It must be data of this net load specifically. ID indicating a specific net load.
NET_CLUSTER It must intersect with buildings of net loads of this net cluster. It must be data of this net cluster specifically. ID indicating a specific net cluster.
FUNCTION It must intersect with constructions of this function. It must be data related to this function type. ID indicating a specific function.

Dikes

Clause As a polygon As an item Type
DIKE It must intersect with this dike. It must be data of this dike specifically. ID indicating a specific dike.

Building categories

Clause As a polygon As an item Type
CATEGORY It must intersect with constructions of this category. It must be related to this specific category. Technical name indicating a category.

Timestates

Clause As a polygon As an item Type
STATE It must intersect with buildings or other spatial actions, which are currently in this timestate. It must be related to this specific timestate Technical name indicating a timestate.

Attributes

Clause As a polygon As an item Type
ATTRIBUTE_MAX It must intersect with at least this value of an attribute. N/A Decimal number.
ATTRIBUTE_MIN It must intersect with at most this value of an attribute. N/A Decimal number.
ATTRIBUTE The attribute of which to test the value. N/A Attribute name of any polygonal item.

When neither a maximum or minimum value is specified, or when no attribute is specified, everything is considered

Networks

Clause As a polygon As an item Type
NET_LINE N/A It must be data of this net line specifically. ID indicating a specific net line.
NET_LINE_DEFINITION N/A It must be data of net lines of this definition. ID indicating a line definition.
NET_TYPE N/A It must be data of net lines of this type of network. ID indicating the type of network.

Stakeholders

Clause As a polygon As an item Type
STAKEHOLDER The land must be owned by this specific stakeholder. It must be data of this stakeholder specifically. ID indicating a specific stakeholder.
STAKEHOLDERTYPE The land must be owned by this type of stakeholder. N/A Technical name indicating a type of stakeholder.

Interface

Clause As a polygon As an item Type
INDICATOR N/A It must be data of this indicator specifically. ID indicating a specific indicator.
OVERLAY N/A It must be data of this overlay specifically. ID indicating a specific overlay.
PANEL N/A It must be data of this panel specifically. ID indicating a specific panel.

Minor clause groups

Variables

Clause As a polygon As an item Type
NAME N/A The data requested must have this name. The name which identifies the requested data.

Indicators

Clause As a polygon As an item Type
INDICATORTYPE N/A It must be related to this type of indicator. Technical name indicating a type of indicator.

Terms

Clause As a polygon As an item Type
STATE N/A It must be related to this specific text (or "term") used by the Engine. Technical name indicating a term.


Modifying clause groups

Map types

Clause As a polygon As an item Type
MAP It must be data from this moment of time in a session. It must be data from this moment of time in a session. Technical name of the original/current state or the planned/maquette state.

The precise terms vary based on the simulation type, but the terms which appear in the query are CURRENT and MAQUETTE.

Layer types

Clause As a polygon As an item Type
LAYERTYPE It must be data from this layer of the 3D world. N/A Technical name of the surface or underground layers of the 3D world.

The precise terms are SURFACE and UNDERGROUND.

Multipliers

Clause As a polygon As an item Type
ATTRIBUTE_MULT Multiply the result by the (spatial) value of an attribute. N/A Attribute name of any polygonal item.
FUNCTIONMULT Multiply the result by the (spatial) value of an attribute. N/A The name of a function value.
CATEGORYMULT Multiply the result by the (spatial) value of an attribute. N/A The name of a category value.

Relations

Clause As a polygon As an item Type
RELATION N/A Rather than data of the specified item, use the item which has this relation to it. Technical name indicating a type of relation.