g_length: Compute the length of a geometry

View source: R/geom.R

g_lengthR Documentation

Compute the length of a geometry

Description

g_length() computes the length for LineString or MultiCurve objects. Undefined for all other geometry types (returns zero).

Usage

g_length(wkt)

Arguments

wkt

Character. OGC WKT string for a simple feature geometry.

Value

Numeric scalar. Length of the geometry or 0.

Examples

g_length("LINESTRING (0 0, 3 4)")

gdalraster documentation built on April 4, 2025, 4:38 a.m.