The function "Length" allows to determine the length of objects which are present in a table, via the field "the_geom".
Syntax : select Length(the_geom) from myTable;
- Goal : Calculate the sum of the lengthes of the hydrographic sections
- Syntax : select Sum(Length(the_geom)) as Longueur from "TRONCON_HYDROGRAPHIQUE";
- Result : we obtain an alphanumeric value
- The first operator Length calculate the length of every geometry. The identifier the_geom corresponds to the column which contains the geometry of objects. Note that this identifier is necessary for all spatial functions.
- The second operator Sum is an aggregated alphanumeric function which calculate the global length - > the total - > the sum.
Copyright - IRSTV - 2009 - www.orbisgis.org