Official Content

Returns the area of a given GeoPolygon attribute or variable.

Syntax

GeoPolygonAttOrVar.Area()

Where:

GeoPolygonAttOrVar
   Must be an attribute or variable based on the GeoPolygon data type.

Type Returned: Numeric

Scope

Generators: AppleAndroid
Level: AttributeVariable (GeoPolygon data type)

Description

Returns the area of a polygon in square meters (m2).
The calculation is solved in the language of the current environment or in the database management system (DBMS), for example, by invoking it from the Where clause of a For Each command.

Samples

&zonePlace.FromWkt('POLYGON((-122.358 47.653 , -122.348 47.649, -122.348 47.658, -122.358 47.658, -122.358 47.653))') 
&areavalue = &zonePlace.Area()

The &zonePlace variable (based on the GeoPolygon data type) is initialized with a polygon, from a WKT (or a GeoJSON).

When applying the Area method to the &zonePlace variable, its numerical value in square meters is returned (and assigned to the &areavalue Numeric variable).

See Also

FromWkt method

Last update: March 2025 | © GeneXus. All rights reserved. GeneXus Powered by Globant