All Products
Search
Document Center

Lindorm:Spatial data types

Last Updated:Dec 24, 2025

Spatial data represents spatial objects, their geographic locations, and their shapes. This data is often used in fields such as aviation, navigation, and urban planning. This topic describes the spatial data types that LindormTable supports.

Applicable engines

Spatial data types are available only for LindormTable.

Spatial data types

Lindorm GanosBase supports the following spatial data types:

Data type

Description

Usage example

Geometry

Represents a generic spatial object. It is the parent type of Point, LineString, Polygon, MultiPoint, MultiPolygon, MultiLineString, and GeometryCollection. Avoid defining a spatial column directly as Geometry.

Note
  • If you define a wide table column as the Geometry type, the column can store data of any subtype, such as Point, LineString, Polygon, MultiPoint, MultiPolygon, MultiLineString, or GeometryCollection. However, you cannot create a spatio-temporal index for a specific subtype on this column.

  • If you define a wide table column as a specific subtype, you cannot write data of other subtypes to that column. For example, if you define the data type of a column as Point, you can only write Point data to that column.

Specify the data type of a spatial column when you create a spatio-temporal data table.

Point

Represents point data, which consists of a longitude (x) and a latitude (y) coordinate.

Note

Three-dimensional (3D) point coordinates are not supported for calculations. Stored 3D points are converted to two-dimensional (2D) points for calculations.

GPS coordinate information received by vehicles and ships.

LineString

Represents line data, which consists of two or more points. The endpoint of one line segment is the start point of the next.

Note

A LineString must have two or more points. Consecutive vertices can be identical.

  • A street can consist of one or more LineStrings.

  • The trajectory of a vehicle over a period of time, which consists of multiple coordinate points.

Polygon

Represents polygon data. The outer boundary of a polygon is a closed ring, where the start and end points have the same x and y coordinates.

Note

A face consists of at least three points.

  • Geofences.

  • Land parcels, forests, and administrative regions on a map.

  • Shapes such as rectangles and circles.

MultiPoint

Represents a collection of zero or more points.

All ticket offices in an amusement park.

MultiLineString

Represents a collection of zero or more LineStrings.

A street composed of multiple LineStrings.

MultiPolygon

Represents a collection of zero or more Polygons.

A city composed of multiple counties or districts. Each county or district is a Polygon.

GeometryCollection

Represents a collection of zero or more Geometry objects.

A collection of various shapes.

Constructing Geometry types

Constructing a Geometry object from point coordinates

Use the ST_MakePoint spatio-temporal function to construct a Geometry Point object from numeric point coordinate data. You can also use the ST_LineFromMultiPoint spatio-temporal function to construct a Geometry LineString object from numeric point coordinate data. For more information, see Constructors.

Constructing a Geometry object from WKT format

WKT format

WKT is a format defined by the Open Geospatial Consortium (OGC) to describe spatial objects using text. For more information about WKT, see Well-known Text. Lindorm GanosBase supports the WKT format for seven spatial data types (Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, and GeometryCollection), but does not support WKT information that contains a Spatial Reference Identifier (SRID).

Lindorm GanosBase supports the following WKT data types:

Data type

Syntax

WKT example

Point

POINT(x y): x is the longitude, and y is the latitude.

  • POINT(-10.1 3.3): Represents a point.

  • POINT EMPTY: Represents an empty point.

LineString

LINESTRING(x1 y1,x2 y2,...,xn yn): x1 to xn are longitudes, and y1 to yn are latitudes.

  • LINESTRING(3 4,10 50,20 25): Represents a line segment with three points.

  • LINESTRING EMPTY: Represents an empty line.

Polygon

POLYGON((x1 y1,x2 y2,...,xn yn),(xa ya,xb yb,...,xm ym)): x1 to xn and xa to xm are longitudes. y1 to yn and ya to ym are latitudes.

  • POLYGON((2 2, 2 8, 8 8, 8 2, 2 2)): Represents a polygon with one outer ring.

  • POLYGON((0.5 0.5,5 0,5 5,0 5,0.5 0.5),(1.5 1,4 3,4 1,1.5 1)): Represents a polygon with one outer ring and one inner ring.

  • POLYGON EMPTY: Represents an empty polygon.

MultiPoint

MultiPoint(x1 y1, x2 y2, ..., xn yn): x1 to xn are longitudes, and y1 to yn are latitudes.

MULTIPOINT (10 40, 40 30, 20 20, 30 10): A collection of four points: POINT(10 40), POINT(40 30), POINT(20 20), and POINT(30 10).

MultiLineString

MultiLineString ((x11 y11, x12 y12, ..., x1n y1n),(x21 y21, x22 y22, ..., x2m y2m), ...): x11 to x1n and x21 to x2m are longitudes. y11 to y1n and y21 to y2m are latitudes.

MULTILINESTRING ((10 10, 20 20, 10 40),(40 40, 30 30, 40 20, 30 10)): Represents a collection of two line segments: LINESTRING(10 10, 20 20, 10 40) and LINESTRING(40 40, 30 30, 40 20, 30 10).

MultiPolygon

MultiPolygon (((x11 y11, x12 y12, ..., x1n y1n)),((x21 y21, x22 y22, ..., x2m y2m)),...): x11 to x1n and x21 to x2m are longitudes. y11 to y1n and y21 to y2m are latitudes.

  • MULTIPOLYGON (((30 20, 45 40, 10 40, 30 20)), ((15 5, 40 10, 10 20, 5 10, 15 5))): Represents a collection of two polygons, each with a single outer ring: POLYGON((30 20, 45 40, 10 40, 30 20)) and POLYGON((15 5, 40 10, 10 20, 5 10, 15 5)).

  • MULTIPOLYGON (((40 40, 20 45, 45 30, 40 40)),((20 35, 10 30, 10 10, 30 5, 45 20, 20 35),(30 20, 20 15, 20 25, 30 20))): Represents a collection of the following objects:

    • A polygon with a single outer ring: POLYGON((40 40, 20 45, 45 30, 40 40)).

    • A polygon with an inner ring: POLYGON((20 35, 10 30, 10 10, 30 5, 45 20, 20 35),(30 20, 20 15, 20 25, 30 20)).

GeometryCollection

GeometryCollection (Point/LineString/Polygon/MultiPoint/MultiLineString/MultiPolygon)

GEOMETRYCOLLECTION (POINT (40 10),LINESTRING (10 10, 20 20, 10 40),POLYGON ((40 40, 20 45, 45 30, 40 40))) Represents a collection of the following objects:

  • A point: POINT(40 10).

  • A line segment: LINESTRING(10 10, 20 20, 10 40).

  • A polygon: POLYGON((40 40, 20 45, 45 30, 40 40)).

Construction method

Use the ST_GeomFromText spatio-temporal function to construct a Geometry object from WKT. For more information, see Constructors.

Outputting Geometry types

Outputting a Geometry object as a WKB string

WKB is a format defined by the OGC that uses serialized bytes to represent geometric objects. For more information, see Well-known Binary. Lindorm GanosBase supports the following seven spatial data types represented in WKB: Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, and GeometryCollection.

When you directly output a Geometry type, it is returned as a hexadecimal string that represents the Geometry object in WKB format. For example:

SELECT ST_GeomFromText('POINT(-10.1 3.3)') as p;

The following result is returned:

+--------------------------------+
|               p                |
+--------------------------------+
| 0020000001000010E6C02433333333 |
| 3333400A666666666666           |
+--------------------------------+

Outputting a Geometry object as WKT

Use the ST_AsText spatio-temporal function to output a Geometry object in WKT format. For more information, see Output functions.