# Method NearestCoordinate

#### NearestCoordinate(Geometry, MapPoint)

Determines the nearest point in the input geometry to the input point using a simple planar measurement.

##### Declaration

`public static ProximityResult NearestCoordinate(this Geometry geometry, MapPoint point)`

##### Parameters

Type | Name | Description |
---|---|---|

Geometry | geometry | The geometry in which the nearest coordinate to a specified point is to be found. |

MapPoint | point | The point which to find the nearest coordinate to. |

##### Returns

Type | Description |
---|---|

ProximityResult | A ProximityResult containing the results of the operation. This is |

##### Remarks

Input geometry of type Envelope is not supported. To find the nearest coordinate on an Envelope, convert it to a Polygon first.

If the specified geometry is a polyline or polygon the nearest coordinate is the closest point in the line segment that comprises geometry; it may not necessarily be the closest vertex of line segment. If you want to obtain the closest vertex in the polyline or polygon use the NearestVertex(Geometry, MapPoint) method instead.

Planar measurements of distance and area can be extremely inaccurate if using an unsuitable spatial reference. Ensure that you understand the potential for error with the geometry's spatial reference. If you need to calculate more accurate results consider using a different spatial reference, or using the geodetic equivalent, NearestCoordinateGeodetic(Geometry, MapPoint, Double, LinearUnit).

Supports true curves.

##### See Also

### Applies to

## Platforms and versions

Target | Versions |
---|---|

.NET Standard 2.0 | 100.3 - 200.0 |

.NET 6.0 | 100.13 - 200.0 |

.NET 6.0 Windows | 100.13 - 200.0 |

.NET 6.0 Android | 200 |

.NET 6.0 iOS | 200 |

.NET Framework | 100.0 - 200.0 |

.NET 5 | 100.10 - 100.12 |

.NET Core 3.1 | 100.7 - 100.12 |

Android | 100.0 - 100.15 |

iOS | 100.0 - 100.15 |

UWP | 100.0 - 200.0 |