Documentation & Knowledge Base

Documentation & Help

Find instructions, guides, and answers to your questions regarding the use of the Gismatrix platform.

Gismatrix-Specific Functions

Non-Spatial Functions

These functions provide string manipulation and other non-spatial operations, with full support for UTF-8 encoding and localization.

Function Description
LOWER_UTF8

Converts a string to lowercase, correctly handling UTF-8 characters and language-specific rules (e.g., Č, Š, Ž).

Syntax: LOWER_UTF8(text [, locale])

Parameters:

  • text (String): The string to be converted.
  • locale (String, Optional): A language identifier (e.g., 'sl' for Slovenian, 'en' for English, 'tr' for Turkish). If omitted, the default system locale is used.

Example: LOWER_UTF8('ŽIČNICA', 'sl') returns 'žičnica'.

UPPER_UTF8

Converts a string to uppercase, correctly handling UTF-8 characters and language-specific rules (e.g., č, š, ž).

Syntax: UPPER_UTF8(text [, locale])

Parameters:

  • text (String): The string to be converted.
  • locale (String, Optional): A language identifier (e.g., 'sl' for Slovenian, 'en' for English). If omitted, the default system locale is used.

Example: UPPER_UTF8('žičnica', 'sl') returns 'ŽIČNICA'.

Spatial Functions

These functions are tailored for Gismatrix and provide additional functionalities not part of the standard PostGIS set.

Function Description
ST_GeometryTypeCode(geom) Returns an integer code representing the simplified geometry type used by Gismatrix: UNKNOWN = 0, POINT = 1, LINE_STRING = 2, LINERING = 3, POLYGON = 4, MULTI_POINT = 5, MULTI_LINE_STRING = 6, MULTI_POLYGON = 7, GEOMETRY_COLLECTION = 8, CIRCLE = 9, NONE = 100 This function is useful for quickly filtering by basic geometry types.
ST_GeometryBaseTypeCode(geom) Returns the integer code of the base geometry type. For example, for MULTIPOINT, it returns the same code as for POINT. Useful when you want to treat single and multi-geometries of the same base type in the same way.
ST_GeometryBaseTypeExCode(geom) Returns the integer code of the base geometry type. Similar to ST_GeometryBaseTypeCode, but also maps LINERING to LINESTRING.
WKB_GeometryType(geom) Returns the full integer code of the geometry type according to the WKB (Well-Known Binary) standard, including information about Z and M dimensions.