ArcGISPoint

Namespace: Esri::GameEngine::Geometry
Class: Esri/GameEngine/Geometry/ArcGISPoint
Since: 1.0.0
Inheritance: ArcGISGeometry->ArcGISPoint

Summary

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

Constructors

ArcGISPoint(double, double)

Creates a point with an x, y and a null spatial reference.

Since 1.0.0

Arguments
NameTypeConstSummary
x
No

The x-coordinate for the point.

y
No

The y-coordinate for the point.

ArcGISPoint(double, double, double)

Creates a point with an x, y, z and a null spatial reference.

Since 1.0.0

Arguments
NameTypeConstSummary
x
No

The x-coordinate for the point.

y
No

The y-coordinate for the point.

z
No

The z-coordinate for the point.

Creates a point with an x, y, z and spatial reference.

Since 1.0.0

Arguments
NameTypeConstSummary
x
No

The x-coordinate for the point.

y
No

The y-coordinate for the point.

z
No

The z-coordinate for the point.

spatialReference
Yes

The spatial reference for the point.

ArcGISPoint(double, double, const ArcGISSpatialReference&)

Creates a point with an x, y and a spatial reference.

Since 1.0.0

Arguments
NameTypeConstSummary
x
No

The x-coordinate for the point.

y
No

The y-coordinate for the point.

spatialReference
Yes

The spatial reference for the point.

Properties

PropertyTypeNullableReadonlySummary
No
Yes

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

No
Yes

The x-coordinate for the point.

No
Yes

The y-coordinate for the point.

No
Yes

The z-coordinate for the point.

M

double GetM() const

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

M-values are used in linear referencing scenarios and may represent things like mile markers along a highway. Like z-values, every geometry can optionally store m-values with the point coordinates that comprise it. The default m-value is NaN. If an m-value is specified when a geometry is created, the new geometry has m-values (ArcGISGeometry::HasM is true). Note that when you get m-values back from a geometry, the default value of NAN is returned for vertices that do not have m-values. A geometry with m-values is sometimes known as an m-aware geometry.

X

double GetX() const

The x-coordinate for the point.

Returns NAN if an error occurs.

Y

double GetY() const

The y-coordinate for the point.

Returns NAN if an error occurs.

Z

double GetZ() const

The z-coordinate for the point.

Geometries can have z-values, indicating values along the z-axis, which is perpendicular to both the x-axis and y-axis. Z-values indicate height above or depth below a surface, or an absolute elevation. Z-values are stored on ArcGISPoint and ArcGISEnvelope. Since ArcGISMultipoint, ArcGISPolyline, and ArcGISPolygon are created from a collection of ArcGISPoint, all types of geometry can have z-values.

Whether or not a geometry has z-values is determined when the geometry is created; if you use a method that has a z-value parameter, the new geometry has z-values (ArcGISGeometry::HasZ is true). If you create geometries using constructors that take z-value parameters, or if you pass points or segments that have z-values into the constructor, the new geometry has z-values. A ArcGISGeometry with z-values is sometimes known as a z-aware geometry.

It may be that not all vertices in your geometry have a z-value defined. NAN is a valid z-value used to indicate an unknown z-value. However, the default z-value is 0. When you get z-values from a geometry that does not have z-values, the default is 0. Check the ArcGISGeometry::HasZ to determine whether a z-value of 0 means that there are no z-values in the geometry or that the z-value in the geometry's coordinates really is 0.

Methods

SignatureReturn TypeSummary

CreateWithM(double, double, double)

ArcGISPoint

Creates a point with an x,y coordinates and m-value and a null spatial reference.

CreateWithM(double, double, double, double)

ArcGISPoint

Creates a point with an x, y, z coordinates and m-value.

CreateWithM(double, double, double, double, const ArcGISSpatialReference&)

ArcGISPoint

Creates a point with an x, y, z, m and a spatial reference.

CreateWithM(double, double, double, const ArcGISSpatialReference&)

ArcGISPoint

Creates a point with an x, y, m and spatial reference.

CreateWithM

static ArcGISPoint CreateWithM(double x, double y, double m)

Creates a point with an x,y coordinates and m-value and a null spatial reference.

Since 1.0.0

Arguments
NameTypeConstSummary
x
No

The x-coordinate for the point.

y
No

The y-coordinate for the point.

m
No

The m-value for the point.

Returns ArcGISPoint

A point. This is passed to geometry or point functions.

CreateWithM

static ArcGISPoint CreateWithM(double x, double y, double z, double m)

Creates a point with an x, y, z coordinates and m-value.

Since 1.0.0

Arguments
NameTypeConstSummary
x
No

The x-coordinate for the point.

y
No

The y-coordinate for the point.

z
No

The z-coordinate for the point.

m
No

The m-value for the point.

Returns ArcGISPoint

A point. This is passed to geometry or point functions.

CreateWithM

static ArcGISPoint CreateWithM(double x, double y, double z, double m, const ArcGISSpatialReference& spatialReference)

Creates a point with an x, y, z, m and a spatial reference.

Since 1.0.0

Arguments
NameTypeConstSummary
x
No

The x-coordinate for the point.

y
No

The y-coordinate for the point.

z
No

The z-coordinate for the point.

m
No

The m-value for the point.

spatialReference
Yes

The spatial reference for the point.

Returns ArcGISPoint

A point. This is passed to geometry or point functions.

CreateWithM

static ArcGISPoint CreateWithM(double x, double y, double m, const ArcGISSpatialReference& spatialReference)

Creates a point with an x, y, m and spatial reference.

Since 1.0.0

Arguments
NameTypeConstSummary
x
No

The x-coordinate for the point.

y
No

The y-coordinate for the point.

m
No

The m-value for the point.

spatialReference
Yes

The spatial reference for the point.

Returns ArcGISPoint

A point. This is passed to geometry or point functions.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close