ST_Perimeter - Spectrum_Location_Intelligence_for_Big_Data - 5.2.1

Location Intelligence SDK for Big Data Guide

Product type
Software
Portfolio
Locate
Product family
Spectrum
Product
Spatial Big Data > Location Intelligence SDK for Big Data
Version
5.2.1
Language
English
Product name
Location Intelligence for Big Data
Title
Location Intelligence SDK for Big Data Guide
Copyright
2024
First publish date
2015
Last updated
2024-10-16
Published on
2024-10-16T13:55:01.634374

Description

The ST_Perimeter function calculates and returns the total perimeter of a given geometry in the desired unit type. The Perimeter of a polygon is the sum of the lengths of its rings (both exterior and holes). The curves are considered as thin polygons.

Syntax

ST_Perimeter(WritableGeometry geometry, String linearUnits, [String computationType])

Parameters

Parameter Type Description
geometry WritableGeometry The input geometry.
linearUnits String The desired return unit type. For valid values, see Linear Units.
computationType String Optional. Indicates the logic to be used to interpret geometry coordinates. The computation type is based on the coordinate system of the geometry being operated on:
  • For geographic (long/lat) coordinate systems: Valid type = SPHERICAL (default)
  • For projected coordinate systems: Valid types = CARTESIAN, SPHERICAL (default)
  • For engineering coordinate systems: Valid type = CARTESIAN (default)
CARTESIAN
The geometry coordinates are interpreted using cartesian logic.
SPHERICAL
The geometry coordinates are interpreted using spherical logic.

Linear Units

Valid values for unit type:

Value Description
mi miles
km kilometers
in inches
ft feet
yd yards
mm millimeters
cm centimeters
m meters
survey ft US Survey feet
nmi nautical miles

Return Values

Return Type Description
Double The perimeter of the geometry.

Examples

SELECT ST_Perimeter(ST_GeomFromWkt(t.geometry,'epsg:4267'), 'm', 'SPHERICAL') FROM table t;
SELECT ST_Perimeter(ST_GeomFromWkt(t.geometry,'epsg:4267'), 'm') FROM table t;