(Created page with "== title == "": { } {| class="wikitable" !Field !Type !Description |- | colspan="1" | | colspan="1" | | colspan="1" | |- | | | |- | | | |- | | | |- | | | |- | | | |- | | | |} Back to the main configuration data schema page.") |
No edit summary |
||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== | == restrictions == | ||
"": { | Definition of restrictions between two vector layers. Meaning: what informational, warning or error message should the end-user see if they draw a point/line/polygon in one layer on top of / in collision with another layer? | ||
Note that the restrictions defined here also impact the SEL shipping simulation (if relevant), as explained on the [[SEL configuration data schema|SEL configuration page]]. | |||
"restrictions": { | |||
"NS_Shipping_Routes|NS_Countries": [ | |||
{ | |||
"message": "Shipping routes should not cross over land.", | |||
"value": "", | |||
"type": "WARNING", | |||
"starttype": "", | |||
"endtype": "", | |||
"startlayer": "NS_Shipping_Routes", | |||
"endlayer": "NS_Countries", | |||
"sort": "INCLUSION" | |||
} | |||
] | |||
} | } | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 8: | Line 22: | ||
!Description | !Description | ||
|- | |- | ||
| colspan="1" | | | colspan="1" |[key] | ||
| colspan="1" | | | colspan="1" |string | ||
| colspan="1" | | | colspan="1" |<nowiki>The array key is used to uniquely name the restriction. We've opted to use the format 'layer1 | layer2' as shown in the example above. Only used in the client's library of restrictions.</nowiki> | ||
|- | |- | ||
| | |message | ||
| | |string | ||
| | |Message shown when the restriction takes place, i.e., the geometry of the two layers collide / overlap. | ||
|- | |- | ||
| | |value | ||
| | |float | ||
| | |Currently unused. | ||
|- | |- | ||
| | |type | ||
| | |string | ||
| | |Only options are: | ||
INFO, purely informative message, nothing more. | |||
WARNING, which turns the message yellow, but does not block the player/user from finalising the plan (setting to approved/approval). | |||
ERROR, which turns the message red, and forces the player/user to take action. | |||
|- | |- | ||
| | |starttype | ||
| | |string | ||
| | |String representation of an integer, referring to the startlayer's type key/identifier. Can be empty. If set, then the restriction will only occur if the user/player selected that particular layer's type when drawing/editing (over that) geometry. [[Meta configuration data schema|See meta > [layer] > layer_type.]] | ||
|- | |- | ||
| | |endtype | ||
| | |string | ||
| | |String representation of an integer, referring to the endlayer's type key/identifier. Can be empty. If set, then the restriction will only occur if the user/player selected that particular layer's type when drawing/editing (over that) geometry. [[Meta configuration data schema|See meta > [layer] > layer_type.]] | ||
|- | |- | ||
| | |startlayer | ||
| | |string | ||
| | |One of the two colliding/overlapping layers on which this restriction applies. References a layer_name as set up under [[Meta configuration data schema|meta]], so make sure the layer exists there. | ||
|- | |||
|endlayer | |||
|string | |||
|One of the two colliding/overlapping layers on which this restriction applies. References a layer_name as set up under [[Meta configuration data schema|meta]], so make sure the layer exists there. | |||
|- | |||
|sort | |||
|string | |||
|Can only be INCLUSION or EXCLUSION. In practice we have only used INCLUSION so far. | |||
When EXCLUSION is chosen, the startlayer and endlayer both have to be part of a plan for the restriction to be effective and thus trigger in case of collission / overlap of geometry. In case of INCLUSION, only the startlayer should be part of a plan, the endlayer does not have to be. | |||
|} | |} | ||
Back to the [[Configuration data schema|main configuration data schema page]]. | Back to the [[Configuration data schema|main configuration data schema page]]. |
Latest revision as of 21:56, 20 April 2024
restrictions
Definition of restrictions between two vector layers. Meaning: what informational, warning or error message should the end-user see if they draw a point/line/polygon in one layer on top of / in collision with another layer?
Note that the restrictions defined here also impact the SEL shipping simulation (if relevant), as explained on the SEL configuration page.
"restrictions": { "NS_Shipping_Routes|NS_Countries": [ { "message": "Shipping routes should not cross over land.", "value": "", "type": "WARNING", "starttype": "", "endtype": "", "startlayer": "NS_Shipping_Routes", "endlayer": "NS_Countries", "sort": "INCLUSION" } ] }
Field | Type | Description |
---|---|---|
[key] | string | The array key is used to uniquely name the restriction. We've opted to use the format 'layer1 | layer2' as shown in the example above. Only used in the client's library of restrictions. |
message | string | Message shown when the restriction takes place, i.e., the geometry of the two layers collide / overlap. |
value | float | Currently unused. |
type | string | Only options are:
INFO, purely informative message, nothing more. WARNING, which turns the message yellow, but does not block the player/user from finalising the plan (setting to approved/approval). ERROR, which turns the message red, and forces the player/user to take action. |
starttype | string | String representation of an integer, referring to the startlayer's type key/identifier. Can be empty. If set, then the restriction will only occur if the user/player selected that particular layer's type when drawing/editing (over that) geometry. See meta > [layer] > layer_type. |
endtype | string | String representation of an integer, referring to the endlayer's type key/identifier. Can be empty. If set, then the restriction will only occur if the user/player selected that particular layer's type when drawing/editing (over that) geometry. See meta > [layer] > layer_type. |
startlayer | string | One of the two colliding/overlapping layers on which this restriction applies. References a layer_name as set up under meta, so make sure the layer exists there. |
endlayer | string | One of the two colliding/overlapping layers on which this restriction applies. References a layer_name as set up under meta, so make sure the layer exists there. |
sort | string | Can only be INCLUSION or EXCLUSION. In practice we have only used INCLUSION so far.
When EXCLUSION is chosen, the startlayer and endlayer both have to be part of a plan for the restriction to be effective and thus trigger in case of collission / overlap of geometry. In case of INCLUSION, only the startlayer should be part of a plan, the endlayer does not have to be. |
Back to the main configuration data schema page.