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.
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.
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.

This page was last edited on 16 April 2024, at 09:38. Content is available under GPLv3 unless otherwise noted.