Geographic objects and data

Decision Server Insights supports the handling of geographic, geometric, and topological data. You can use this type of data for attributes of business model objects to use them in rules.

In an agent, you can write operations on objects that represent geographic locations. For example, you can update the location information of an entity, calculate the distance between two points, or send alerts based on the location of an entity.

Static and moving geometry types

Objects that have a geographic location must define a spatial geometry. A spatial geometry can be static or moving.
Static geometries
Static geometries represent the location of an entity or an event, which does not move over time.
Moving geometries
Moving geometries represent the location of an entity, which does move over time. A moving geometry has a location at a specific time, and has additional operators that manage its location, and its shape. For example, the move moving_geometry_attribute to geometry_value at date_time operator changes the location of the geometry. A moving geometry can also change from one spatial type to another. For example, a moving geometry can change from a point to a line.

Use a moving geometry to model an entity whose location that changes over time. Use a static geometry to model location-related objects, such as a building, a field, a county or a state.

The time that is needed to access the value of a moving geometry and the memory that is required depend on the size of the history limit that you define.

The following table represents the differences between static geometry and moving geometries.

Table 1. Differences between geometry and moving geometry types
Characteristic Static geometry Moving geometry
Stateful No Yes
Shape Static Dynamic
Spatial operators Yes Yes
Spatiotemporal operators No Yes
Use as entity attribute Yes Yes
Use as event attribute Yes No
Access time Fast Slow
Memory footprint Small Large

Spatial geometries

Objects that define geographic locations are represented by the following spatial geometries.

Geometry
A geometry is an object in two-dimensional space. A geometry is defined by spatial attributes such as points and vectors. For example, a geometry can be a point, a line string, a linear ring, or a polygon. A geometry can also consist of multiple geometries to define complex geometries.
Point
A point is a zero-dimensional geometry that occupies a single location in coordinate space.

For example, a customer can be represented by a point.

Line string
A line string is defined by a sequence of points and consists of the line segments that connect consecutive points in this sequence.

For example, a coast can be represented by a line string.

Linear ring
A linear ring is a closed line string or a line string where the first and last points coincide.

For example, the border of a country can be represented by a linear ring.

Vertex
A vertex defines an angular point of a geometric shape such as a line string.

For example, a specific point in a border can be represented by a vertex.

Polygon
A polygon is a two-dimensional object that is defined by a linear ring that forms the boundary of the polygon. A polygon can contain holes that are enclosed in the boundary. A polygon represents the area inside its boundary, without the areas inside the holes.

For example, a parking lot can be represented by a polygon.

Important: In Decision Server Insights, the boundary and the holes must be simple. They must not intersect. The holes must be disjoint and inside the boundary.

The following diagram illustrates different types of simple spatial geometries.

This figure shows different types of spatial geometries

Geometries can be composed of a group of one or more geometries. For example, a geometry of the parking area of a shopping center can be represented as a multi polygon. Each polygon represents a geometry of a parking lot in the shopping center. There are several types of composed geometries:

multi-point
A multi-point is a geometry that is composed of points.
multi-line string
A multi-line string is a geometry that is composed of line strings.
multi-linear ring
A multi-linear ring is a geometry that is composed of linear rings.
multi-polygon
A multi-polygon is a geometry that is composed of polygons.

Geographic objects can use the following units of measurement:

length unit
The unit of the length of a one-dimensional entity, such as a line string. For example, the unit can be kilometers, meters, or miles.
area unit
The unit of the area of a two-dimensional entity, such as a polygon. For example, the unit can be km², m², and mi².

Computational accuracy

In some cases, geospatial computations and positioning are imprecise. This imprecision is caused by the following factors:

Shape of the earth
The implementation of geospatial support in Decision Server Insights is based on the assumption that the earth is a sphere, whereas in practice the earth is an ellipsoid. Errors of up to 0.5% can be generated. The error of magnitude is proportional to the size of the objects that are used in the calculation.
Rounding errors
Round-off errors might affect the result of topological queries. For example, a containment query that checks if a point is inside a polygon might return incorrect results when the point is very close to the polygon boundary. In such cases, it is impossible to determine whether the point is inside the polygon, on its boundary, or outside the polygon. To work around this issue and to get an accurate result on the containment, you can measure the distance to the polygon. The point is inside the polygon if the containment function returns true, or if the object is close enough to a boundary of the polygon.