Attribute: Difference between revisions

From Tygron Preview Support Wiki
Jump to navigation Jump to search
 
(119 intermediate revisions by 8 users not shown)
Line 1: Line 1:
{{learned|what an attribute is|how the concept of attributes relates to the Tygron Engine|how to create and edit attributes}}
A number of components, such as [[neighborhood]]s, [[area]]s, [[building]]s and [[zone]]s, have adjustable attributes. These attributes are used:
* to provide meaningful information
* as parameters in calculations
* to provide (visual) information to distinguish themselves among peers


==What is an Attribute?==
Attributes can be defined and redefined by a user. Some attributes are predefined by the {{software}} and already exist as default properties of a component. Some components can even inherit properties from other type of components, such as a [[Building]] that inherits attributes from it's referenced [[Function]].
An attribute is a characteristic of a particular component in the 3D world like an [[Areas|areas]] or a [[Constructions|construction]]. An attribute is always a number and can have a positive or a negative value. For example, the MAX_FLOORS, COLOR, HIGHT and URBANIZATION.


==Attributes in relation to the Tygron Engine==
In general the {{software}} allows users to inspect, adjust and reset existing attributes of these components and define and remove new ones.
Attributes contain information about a particular component which can be used in [[Excel|Excel]] calculations. The value of an attributed can be changed as a result of an [[Excel|Excel]] calculation or as the result of an [[Event|event]]. Some of the attributes and their value at the start of the project are added by default. It is also possible to add or adjust attrubites and the value manually. In addition, there is also the possibility to import attributes as part of importing [[Terrains|GeoJSON files]]. The Engine's component where attributes are applied to are: [[Neighborhoods|neighborhoods]], [[Areas|areas]], [[Constructions|constructions]] and [[Zones|zones]].


The attribute is always described as number value. When the attribute is not given as a number the outcome of a calculation will be zero. But it is also possible that the legit outcome of a calculation is zero. Therefor, when the outcome is zero it can be wise to check the spreadsheet for errors. 
The group of components than can store attributes is called ''Attribute Items''. The current list of ''Attribute Items'' is:
* [[Area]]s
* [[Building]]s
* [[Functions]] and their overrides
* [[Indicator]]s
* [[Neighborhood]]s
* [[Net load]]s
* [[Net line]]s
* [[Net line#Net line definitions|Net function]]s
* [[Overlay]]s
* [[Panel]]s
* [[Terrain]]s
* [[Weather]]s
* [[Zone]]s


When you want to make use of an attribute in an [[Excel (Indicator)|Excel indicator]] you need to specify in the spreadsheet if the attribute is included int the calculation or not. This is done by the ACTIVE attribute. For the ACTIVE attribute the input is always 1 for active and 0 for not active.
Note that although [[Global]]s seem to behave similarly to attributes, they are not part of any specific ''Attribute Item'' in a project. Instead they are individual components part of the project.


==How to add and remove attributes==
==Attribute values==
An attribute always consists of a name and a value. The name of an attribute is usually written in capital letters, and uses underscores in place of spaces. The value must always be a number. It can be either a positive or a negative number. The number can also be a decimal number (I.e., the value is not necessarily a whole number).


Attributes can be added for [[Neighborhoods|neighborhoods]], [[Areas|areas]], [[Constructions|constructions]] and [[Zones|zones]]. In order to add an attribute for one of these Engine components you need to first open the panel of the particular component. Per component the variety of (default) attributes can differ. Only the attributes that are relevant for the particular component are given. Based on the same principle the 
''Note that not there are some [[TQL_name|restrictions for attribute names]].''


[[File:Attribute_add.png|framed|left|This panel allows you to add new attributes]]
Some components have properties which are also reflected in attributes. Properties such as the color of the component are present both as a dedicated property and as an attribute. By changing the property, the attribute is changed as well. When the attribute is changed, the property is changed as well.
: To add new attributes, open the Attributes tab on the right in the selected Engine component.  
[[File:Attribute_name_s.png|framed|right|This panel allows you to select the attribute that you want to import]]
: To select the attributes you want to import with a GeoJSON file, choose the right attribute name.
: It is not possible to remove a single attribute. You can only remove all attributes at once.


Each component which can have attributes has their own list of attributes. When a given area has an attribute with a specific name, another area may or may not have an attribute with the same name as well. When 2 components have an attribute with the same name, their values are also still set per component. That means that they may coincidentally have the same value, but when the value of the attribute of one component is changed, the value of the attribute of the other component is not automatically changed as well.


{{Editor steps|title=Add a new attribute|Enter a new attribute name|Enter a value|Select "Save New Attribute".}}
{{Editor steps|title=Add attributes with a GeoJSON file|Option 1) Select the GeoJSON file in the folder Option 2) <br> Hoover over the desired component in the Editor and Select import GeoJSON file|In of  case option 1 Drag and Drop the file in the Tygron Engine|Select the desired input|Make sure the attribute checkbox is checked|Select the right attribute name|Select the right attributes to import|Select Send to import the attributes together with the imported area.}}
{{Editor steps|title=Remove an attribute|To remove all attributes at once select "Reset Variables".}}<br clear=all>


==Edit attributes==
In most cases it is not necessary to adjust the values of attributes. The values generally are coming from a database or are retrieved by default from the Tygron Engine. Changes in the values are normally made as a result of [[Excel|Excel]] calculations or an [[Event|event]].


====Active (by default)====
===Attribute arrays===
: ''When an attribute is active it will be taken into account when it is used in an [[Excel|Excel]] calculation. The input is always 1 for active and 0 for not active. When the attribute is not active the attribute is present in the project but is not included in the calculation of all attributes''<br clear=right>
{{main|Attribute array}}
Attributes are most commonly a single value, but can also be an array of values.


====Color (by default)====
===Attribute values during a session===
Explanation is needed.
Attributes can be read during a session. Primarily, it is possible to read attributes of components using [[TQL]]. By requesting the value of an attribute of a component using TQL, the value of that attribute can be used in, for example, [[Excel]] calculations.


====Add new Attribute with Name====
It is possible that, when requesting the value of an attribute of a component, that attribute does not exist for that component. In this case, the value of that attribute is deemed to be "0".
: ''This is the name of the attribute. This name will be used in the query language and can not be adjusted after selecting Save New Attribute.''<br clear=right>


====Add new Attribute with Value====
''Note that this means that an attribute value of 0 can mean that the proper value of the attribute is 0, or that the attribute does not exist.
: ''This is the value of the new added attribute at the start of the project. This value can be adjusted after selecting save New Attribute.''<br clear=right>


====Reset variables====
Attributes can also be changed during a session. This can be done either via [[Event]]s or via [[TQL]]. Events, such as AREA_SET_ATTRIBUTE or ZONE_SET_ATTRIBUTE, can be used in the {{software}} to change the values of attributes. Attributes can also be changed using TQL, which means that attributes can be changed as a result of an Excel calculation.
: ''When selecting this function all attributes are removed from the right attribute tab.''<br clear=right>
 
===Common attribute values===
Some attributes may have a more exact spectrum of values which are valid. For example, the ACTIVE attribute is either 1 or a 0.
 
''Note that these attributes can be given other values as well. The resulting behavior for calculations and functionality depending on these attributes is undefined.
 
====ACTIVE====
: ''Applies to: [[Area]]s, [[Neighborhood]]s, [[Overlay]]s, [[Indicator]]s and [[Stakeholder]]s
Some components may have an "active" property. When that property indicates the component is active, the "ACTIVE" attribute's value is "1". When the component is inactive, the attribute's value is "0".
 
====COLOR====
: ''Applies to: [[Area]]s, [[Neighborhoods]], [[Zone]]s
{{main|Color}}
Spatial components with attributes commonly have a "COLOR" attribute, defining the color by which they are displayed.The value corresponds to the color property of that component. When that color property is changed, the attribute is changed, and vice versa.
 
===Examples of special attribute values===
 
====URBANIZATION====
: ''Applies to: [[Neighborhoods]]
The "URBANIZATION" attribute is an indicator for the degree of urbanization. It ranges from 1 (dense urbanization) to 5 (virtually no urbanization).
 
====NATURE_RESERVE====
: ''Applies to: [[Area]]s
The "NATURE_RESERVE" attribute indicates whether an area is a protected area of nature. This usually means the allowance for pollution and noise is lower. Areas with an "NATURE_RESERVE" attribute value of "1" are deemed protected nature. When the attribute's value is 0, the area is not necessarily deemed protected nature.
 
{{article end
| notes=
* When removing attributes which are related to properties of the component, the value of the properties will be changed as well, as though the attribute was set to "0".
| howtos=
[[File:Attribute editing panel.jpg|thumb|right|The [[right panel]] allows you to add new attributes. The top half allows you to edit existing attributes, the bottom half allows you to add new attributes.]]
* [[How to add an Attribute]]
* [[How to remove an Attribute]]
* [[How to edit an Attribute]]
* [[How to import Attributes]]
* [[How to remove Attributes from multiple Items]]
* [[How to change multiple Attributes at once for Water Overlays]]
| seealso=
* [[Overlay Key]]
* [[Global]]
}}

Latest revision as of 16:14, 26 January 2023

A number of components, such as neighborhoods, areas, buildings and zones, have adjustable attributes. These attributes are used:

  • to provide meaningful information
  • as parameters in calculations
  • to provide (visual) information to distinguish themselves among peers

Attributes can be defined and redefined by a user. Some attributes are predefined by the Tygron Platform and already exist as default properties of a component. Some components can even inherit properties from other type of components, such as a Building that inherits attributes from it's referenced Function.

In general the Tygron Platform allows users to inspect, adjust and reset existing attributes of these components and define and remove new ones.

The group of components than can store attributes is called Attribute Items. The current list of Attribute Items is:

Note that although Globals seem to behave similarly to attributes, they are not part of any specific Attribute Item in a project. Instead they are individual components part of the project.

Attribute values

An attribute always consists of a name and a value. The name of an attribute is usually written in capital letters, and uses underscores in place of spaces. The value must always be a number. It can be either a positive or a negative number. The number can also be a decimal number (I.e., the value is not necessarily a whole number).

Note that not there are some restrictions for attribute names.

Some components have properties which are also reflected in attributes. Properties such as the color of the component are present both as a dedicated property and as an attribute. By changing the property, the attribute is changed as well. When the attribute is changed, the property is changed as well.

Each component which can have attributes has their own list of attributes. When a given area has an attribute with a specific name, another area may or may not have an attribute with the same name as well. When 2 components have an attribute with the same name, their values are also still set per component. That means that they may coincidentally have the same value, but when the value of the attribute of one component is changed, the value of the attribute of the other component is not automatically changed as well.


Attribute arrays

Main article: Attribute array

Attributes are most commonly a single value, but can also be an array of values.

Attribute values during a session

Attributes can be read during a session. Primarily, it is possible to read attributes of components using TQL. By requesting the value of an attribute of a component using TQL, the value of that attribute can be used in, for example, Excel calculations.

It is possible that, when requesting the value of an attribute of a component, that attribute does not exist for that component. In this case, the value of that attribute is deemed to be "0".

Note that this means that an attribute value of 0 can mean that the proper value of the attribute is 0, or that the attribute does not exist.

Attributes can also be changed during a session. This can be done either via Events or via TQL. Events, such as AREA_SET_ATTRIBUTE or ZONE_SET_ATTRIBUTE, can be used in the Tygron Platform to change the values of attributes. Attributes can also be changed using TQL, which means that attributes can be changed as a result of an Excel calculation.

Common attribute values

Some attributes may have a more exact spectrum of values which are valid. For example, the ACTIVE attribute is either 1 or a 0.

Note that these attributes can be given other values as well. The resulting behavior for calculations and functionality depending on these attributes is undefined.

ACTIVE

Applies to: Areas, Neighborhoods, Overlays, Indicators and Stakeholders

Some components may have an "active" property. When that property indicates the component is active, the "ACTIVE" attribute's value is "1". When the component is inactive, the attribute's value is "0".

COLOR

Applies to: Areas, Neighborhoods, Zones
Main article: Color

Spatial components with attributes commonly have a "COLOR" attribute, defining the color by which they are displayed.The value corresponds to the color property of that component. When that color property is changed, the attribute is changed, and vice versa.

Examples of special attribute values

URBANIZATION

Applies to: Neighborhoods

The "URBANIZATION" attribute is an indicator for the degree of urbanization. It ranges from 1 (dense urbanization) to 5 (virtually no urbanization).

NATURE_RESERVE

Applies to: Areas

The "NATURE_RESERVE" attribute indicates whether an area is a protected area of nature. This usually means the allowance for pollution and noise is lower. Areas with an "NATURE_RESERVE" attribute value of "1" are deemed protected nature. When the attribute's value is 0, the area is not necessarily deemed protected nature.

Notes

  • When removing attributes which are related to properties of the component, the value of the properties will be changed as well, as though the attribute was set to "0".

How-to's

The right panel allows you to add new attributes. The top half allows you to edit existing attributes, the bottom half allows you to add new attributes.

See also