Official Content

The GeoPolygon data type is derived from the Geography data type. This means it has a similar functionality to the Geography data type but is specific to represent the Geometry areas.

Scope

DBMSs: SQL Server, Oracle, MySQL, SAP Hana, PostgreSQL
Generators: .NET, .NET Framework, Java, Android, Apple

Description

To initialize an attribute or variable based on the GeoPolygon data type you must use the FromGeoJSON method or FromWkt method.

Sample

&GeoPolygon.FromGeoJson('{ "type": "Polygon", "coordinates": ... }')

&GeoPolygon is a variable based on the GeoPolygon data type. It can also be an attribute based on the same data type.

Properties

Property Type Description
Srid int Spatial Reference System Identifier (SRID), identifies the reference system for the represented Geographic object. See https://en.wikipedia.org/wiki/SRID

Methods

Although the following methods specifically apply to the GeoPolygon data type, all the methods that apply to the Geography data type can also be applied to the GeoPolygon data type:

Method Type Returned Description
FromWkt(Character) GeoPolygon The format of the Character parameter should be: 'POLYGON(Longitude1 Latitude1, Longitude2 Latitude2, Longitude3 Latitude3, .....)'
Intersect(GeoPolygon) Boolean
ToGeography(GeoPolygon) Geography Converts the GeoPolygon to Geography type.
Note: FromString and ToString methods for Geography data types are enabled only for compatibility reasons. Use FromWkt and ToWkt instead.
Last update: June 2025 | © GeneXus. All rights reserved. GeneXus Powered by Globant