gis.db.models.functions.Length

class Length(expression, spheroid=True, **extra)

Availability: MySQL, Oracle, PostGIS, SpatiaLite

Accepts a single geographic linestring or multilinestring field or expression and returns its length as an Distance measure. On MySQL, a raw float value is returned, as it’s not possible to automatically determine the unit of the field.

On PostGIS and SpatiaLite, when the coordinates are geodetic (angular), you can specify if the calculation should be based on a simple sphere (less accurate, less resource-intensive) or on a spheroid (more accurate, more resource-intensive) with the spheroid keyword argument.

doc_Django
2016-10-09 18:37:23
Comments
Leave a Comment

Please login to continue.