Attribute: Difference between revisions
Line 35: | Line 35: | ||
''Note that for attributes like these, other number values are not automatically rejected. When the engine or a user-defined calculation depends on the attribute being within a specific range of values, and the actual value is a different, valid number, no guarantees can be made about the result.'' | ''Note that for attributes like these, other number values are not automatically rejected. When the engine or a user-defined calculation depends on the attribute being within a specific range of values, and the actual value is a different, valid number, no guarantees can be made about the result.'' | ||
====Color==== | |||
Many components with attributes automatically have a COLOR attribute added to them, the value of which is the same as the color property of that component. When that color property is changed, the attribute is changed, and vice versa. | |||
Attributes can be edited for any component, after they have been added. | Attributes can be edited for any component, after they have been added. |
Revision as of 13:23, 8 August 2016
What is an Attribute?
An attribute is a characteristic of a particular component in the 3D world like an area or a construction. An attribute is always a number and can have a positive or a negative value.
Attributes in relation to the Tygron Engine
Attributes contain information about a particular component which can be used in Excel calculations. The value of an attributed can be changed as a result of an Excel calculation or as the result of an 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 attributes and the value manually. In addition, there is also the possibility to import attributes as part of importing GeoJSON files. The Engine's components which have attributes are: neighborhoods, areas, constructions and zones.
An attribute always consists of a name and a value. The value must always be a number. It can be either a positive or a negative number. When an attribute does not exist, its value 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.
When you want to make use of an attribute in an 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.
How to add and remove attributes
Attributes can be added for neighborhoods, areas, constructions and 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
- To add new attributes, open the Attributes tab on the right in the selected Engine component.
- 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.
- Enter a new attribute name
- Enter a value
- Select "Save New Attribute".
- Option 1) Select the GeoJSON file in the folder Option 2)
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.
- Option 1) Select the GeoJSON file in the folder Option 2)
- To remove all attributes at once select "Reset Variables".
Edit attributes
The value of any attribute can be changed after it has been added to a component. In the list of attributes, the value field for any attribute can be selected. The value can be changed by entering a different value in the field. The value must be a valid number, or the new value is rejected immediately.
Special 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 for attributes like these, other number values are not automatically rejected. When the engine or a user-defined calculation depends on the attribute being within a specific range of values, and the actual value is a different, valid number, no guarantees can be made about the result.
Color
Many components with attributes automatically have a COLOR attribute added to them, the value of which is the same as the color property of that component. When that color property is changed, the attribute is changed, and vice versa.
Attributes can be edited for any component, after they have been added.
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 calculations or an event.
Active (by default)
- When an attribute is active it will be taken into account when it is used in an 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
Color (by default)
Explanation is needed.
Add new Attribute with Name
- 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.
Add new Attribute with Value
- 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.
Reset variables
- When selecting this function all attributes are removed from the right attribute tab.