Show / Hide Table of Contents

Class MapPoint

Represents a location defined by x and y (and optionally z) coordinates.

Inheritance
Object
Geometry
MapPoint
Geometry.HasCurves
Geometry.IsNullOrEmpty(Geometry)
Geometry.SpatialReference
Geometry.ToJson()
Geometry.FromJson(String)
Geometry.FromJson(String, SpatialReference)
Geometry.Equals(Geometry, Double)
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Namespace: Esri.ArcGISRuntime.Geometry
Assembly: Esri.ArcGISRuntime.dll
Syntax
public class MapPoint : Geometry
Remarks

Map point geometries represent discrete locations or entities, such as a geocoded house address, the location of a water meter in a water utility network, or a moving vehicle. Larger geographic entities (such as cities) are often represented as map points on small-scale maps. Map points can be used as the geometry of features and graphics and are often used to construct more complex geometries. They are also used in a Viewpoint to define the center of the display.

Map points store a single set of x,y coordinates that define a location (longitude and latitude, for example), and a SpatialReference. Map points can optionally have a z-value (commonly used to describe elevation or altitude) and an m-value (commonly used for measurement relative to the geometry).

For map points defined with a geographic spatial reference, the x-coordinate is the longitude (east or west), and the y-coordinate is the latitude (north or south). When geographic coordinates are represented in strings, they are generally written using the form "(latitude, longitude)", where the y-coordinate comes before the x-coordinate. Latitude values south of the equator and longitude values west of the prime meridian are expressed as negative numbers.

Use CoordinateFormatter to convert a latitude and longitude formatted string directly to a map point. The coordinate formatter can also return a latitude and longitude formatted string from an existing map point. Other coordinate notations, such as Military Grid Reference System (MGRS) and United States National Grid (USNG) are also supported.

Map points are based upon the parent Geometry class. The geometry class is immutable which means that you can not change its shape once it is created. If you need to modify a map point once it has been created, use the MapPointBuilder class instead. The ToGeometry() method provides you with the map point object.

Constructors

Name Description
MapPoint(Double, Double)

Initializes a new instance of the MapPoint class.

MapPoint(Double, Double, SpatialReference)

Initializes a new instance of the MapPoint class.

MapPoint(Double, Double, Double)

Initializes a new instance of the MapPoint class with an x, y, z and a null spatial reference.

MapPoint(Double, Double, Double, SpatialReference)

Initializes a new instance of the MapPoint class with an x, y, z and spatial reference.

Properties

Name Description
Dimension

Gets the number of dimensions for the geometry.

Extent

Gets the minimum enclosing envelope of the instance.

GeometryType

Gets the geometry type.

HasM

Gets a value indicating whether the geometry has an m-value.

HasZ

Gets a value indicating whether the geometry has a z-value.

IsEmpty

Gets a value indicating whether or not the geometry is empty.

M

Gets the optional coordinate to define a measure value for the point.

X

Gets the x-coordinate for the map point.

Y

Gets the y-coordinate for the map point.

Z

Gets the z-value for the map point.

Methods

Name Description
CreateWithM(Double, Double, Double)

Creates a new 2D map point with an m (measure) value. The spatial reference is null.

CreateWithM(Double, Double, Double, SpatialReference)

Creates a new 2D map point with an m (measure) value and a spatial reference.

CreateWithM(Double, Double, Double, Double)

Creates a new 3D map point with an x, y, z, and m (measure) coordinate.

CreateWithM(Double, Double, Double, Double, SpatialReference)

Creates a new 3D map point with an x, y, z, m (measure) and a spatial reference.

IsEqual(Geometry)

Compares two MapPoint for equality. This checks for a matching SpatialReference and coordinates for a match.

ToString()

Returns a String that represents the current Object.

Extension Methods

GeometryEngine.NormalizeCentralMeridian(Geometry)
GeometryEngine.NearestVertex(Geometry, MapPoint)
GeometryEngine.NearestCoordinate(Geometry, MapPoint)
GeometryEngine.NearestCoordinateGeodetic(Geometry, MapPoint, Double, LinearUnit)
GeometryEngine.Project(Geometry, SpatialReference)
GeometryEngine.Project(Geometry, SpatialReference, DatumTransformation)
GeometryEngine.Union(Geometry, Geometry)
GeometryEngine.Intersection(Geometry, Geometry)
GeometryEngine.Intersections(Geometry, Geometry)
GeometryEngine.Clip(Geometry, Envelope)
GeometryEngine.Simplify(Geometry)
GeometryEngine.Area(Geometry)
GeometryEngine.AreaGeodetic(Geometry, AreaUnit, GeodeticCurveType)
GeometryEngine.Cut(Geometry, Polyline)
GeometryEngine.Length(Geometry)
GeometryEngine.LengthGeodetic(Geometry, LinearUnit, GeodeticCurveType)
GeometryEngine.Buffer(Geometry, Double)
GeometryEngine.Distance(Geometry, Geometry)
GeometryEngine.Intersects(Geometry, Geometry)
GeometryEngine.Contains(Geometry, Geometry)
GeometryEngine.Overlaps(Geometry, Geometry)
GeometryEngine.Within(Geometry, Geometry)
GeometryEngine.Crosses(Geometry, Geometry)
GeometryEngine.Disjoint(Geometry, Geometry)
GeometryEngine.Touches(Geometry, Geometry)
GeometryEngine.Densify(Geometry, Double)
GeometryEngine.Offset(Geometry, Double, OffsetType, Double, Double)
GeometryEngine.Generalize(Geometry, Double, Boolean)
GeometryEngine.Difference(Geometry, Geometry)
GeometryEngine.SymmetricDifference(Geometry, Geometry)
GeometryEngine.DensifyGeodetic(Geometry, Double, LinearUnit, GeodeticCurveType)
GeometryEngine.ConvexHull(Geometry)
GeometryEngine.Relate(Geometry, Geometry, String)
GeometryEngine.BufferGeodetic(Geometry, Double, LinearUnit, Double, GeodeticCurveType)
GeometryEngine.Boundary(Geometry)
GeometryEngine.DistanceGeodetic(MapPoint, MapPoint, LinearUnit, AngularUnit, GeodeticCurveType)
GeometryEngine.IsSimple(Geometry)
GeometryEngine.CombineExtents(Geometry, Geometry)
GeometryEngine.RemoveM(Geometry)
GeometryEngine.RemoveZ(Geometry)
GeometryEngine.RemoveZAndM(Geometry)
GeometryExtensions.WithZ<T>(T, Double)
GeometryExtensions.WithM<T>(T, Double)
GeometryExtensions.WithZAndM<T>(T, Double, Double)

Applies to

TargetVersions
.NET Standard 2.0100.3 - 200.0
.NET 6.0100.13 - 200.0
.NET 6.0 Windows100.13 - 200.0
.NET 6.0 Android200
.NET 6.0 iOS200
.NET Framework100.0 - 200.0
.NET 5100.10 - 100.12
.NET Core 3.1100.7 - 100.12
Android100.0 - 100.15
iOS100.0 - 100.15
UWP100.0 - 200.0

Relevant samples

Add an integrated mesh layer: View an integrated mesh layer from a scene service.
Add features: Add features to a feature layer.
Add graphics with symbols: Use a symbol style to display a graphic on a graphics overlay.
Analyze hotspots: Use a geoprocessing service and a set of features to identify statistically significant hot spots and cold spots.
In This Article
Back to top Copyright © 2022 Esri.