Web API Reference | MapGuide Open Source

- Overview
- Modules
- Classes

Boundary
Buffer
Contains
ConvexHull
Crosses
Difference
Disjoint
Distance
Equals
GetGeometryType
Intersection
Intersects
Overlaps
SymetricDifference
Touches
Union
Within
virtual double MgGeometry::Distance | ( | MgGeometry * | other,
|  | MgMeasure * | measure |
| ) |  |  | `[virtual]`
Returns the shortest distance between this geometry and another. By default distance computation is done using a linear algorithm unless a custom measure is supplied. .NET Syntax
`virtual double Distance(MgGeometry other, MgMeasure measure);`
Java Syntax
`virtual double Distance(MgGeometry other, MgMeasure measure);`
PHP Syntax
`virtual double Distance(MgGeometry other, MgMeasure measure);`
  Parameters:
  | other | (MgGeometry) The MgGeometry to determine the distance to.
  | measure | (MgMeasure) The MgMeasure instance to use when computing the distance. If null, a linear distance algorithm is used.
Returns: A double value representing the shortest distance between two geometries.

Comments or suggestions? Send us feedback.