Functions / Geometry Measurement Functions |

Returns the geographic length of a line or polyline geometry object.

MI_Length ( geometry, unit, calculationType )

`geometry` is an expression which returns a geometry,

`unit` is a linear unit specification, and

`calculationType` is a string that indicates whether to perform a Spherical or Cartesian calculation. There is no default.

Returns the length of a highway from the CanadaHighway table.

select highway from CanadaHighway where MI_Length(Obj,'mi','Spherical') <= 50

The value returned is a double and represents a value in the units specified by the `units` argument. MI_Length is applicable only to geometries of type Curve, LineString, and MultiCurve. Any other type of input geometry results in a value of zero.

Valid values for `unit` are the following distance units:

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 |

twip | twips |

pt | points |

pica | picas |

degree | degrees |

li | links |

ch | chains |

rd | rods |