GeoJSON node
Description
The GeoJSON node represents an area of geometry. To learn more, see Geometry types.
Usage
The GeoJSON node is an input, so it can be added to the segments of comparison nodes.
It can be:
-
added to these comparison nodes:
- Disjoint
- Intersects
- Within
-
compared against a Attribute node (of Geometry type)
Configuration
- Parameter - select a compatible parameter to use as a placeholder value (if any have been defined in the query).
-
Geometry - to set the value, select it, and then select one of the following:
-
Locations of interest - choose from a list of predefined locations (if any exist in your Alloy customer project).
-
Set Geometry - use the Geometry Editor to define an area and then select Save.
-
Example
Fetch all assets within this area
In full detail:
Fetch items of the Assets interface where their Geometry attribute is within a defined area
See JSON code
{
"type": "Query",
"properties": {
"collectionCode": "Live",
"dodiCode": "designInterfaces_assets"
},
"children": [
{
"type": "GeomWithin",
"children": [
{
"type": "Attribute",
"properties": {
"attributeCode": "attributes_itemsGeometry"
}
},
{
"type": "Geometry",
"properties": {
"value": {
"type": "Polygon",
"coordinates": [
[
[-1.528451, 52.291276],
[-1.532371, 52.290544],
[-1.535095, 52.288647],
[-1.534088, 52.28752],
[-1.527428, 52.290062],
[-1.528451, 52.291276]
]
]
}
}
}
]
}
]
}