Outdated Version

You are viewing an older version of this section. View current production version.

GEOGRAPHY_AREA

This function measures the square meter area of a given polygon.

image

Syntax

GEOGRAPHY_AREA ( polygon )

Arguments

  • polygon: any valid geospatial object or WKT string.
Info

If an argument is a point or line, the area is zero.

Return Type

A double. The measured area, in meters.

Examples

 memsql> select name, round(geography_area(shape), 0) as sqm
     -> from neighborhoods order by 2;
 +----------------------+---------+
 | name                 | sqm     |
 +----------------------+---------+
 | Probability Bay      |  584004 |
 | Axiom Township       | 2122520 |
 | Decentralized Park   | 2538930 |
 | Isle Zero            | 2729536 |
 | Elegant Island       | 3037299 |
 | Little Endian        | 3432952 |
 | Big Endian           | 5006800 |
...