Functions for Working with Geometry
Geometry
Geometry functions allow you to calculate perimeter and area for geometric types such as POLYGON, LINESTRING, MULTIPOLYGON, MULTILINESTRING, RING, and POINT. Use geometries in Geometry type. If the input value is NULL, all functions below will return 0.
perimeterCartesian
Calculates the perimeter of the given Geometry object in the Cartesian (flat) coordinate system.
Syntax
Arguments
geom— Geometry object. Geometry.
Returned values
- Number — Perimeter of the object in the coordinate system units. Float64.
Example
areaCartesian
Calculates the area of the given Geometry object in the Cartesian coordinate system.
Syntax
Arguments
geom— Geometry object. Geometry.
Returned values
- Number — Area of the object in coordinate system units. Float64.
Example
perimeterSpherical
Calculates the perimeter of a Geometry object on the surface of a sphere.
Syntax
Arguments
geom— Geometry object. Geometry.
Returned values
- Number — Perimeter. Float64.
Example
areaSpherical
Calculates the area of a Geometry object on the surface of a sphere.
Syntax
Arguments
geom— Geometry. Geometry.
Returned values
- Number — Area. Float64.
Example