Point Class

  • Point
  • class Esri::ArcGISRuntime::Point

    Represents a specific location, defined by x and y (and optionally z) coordinates, and a SpatialReference. More...

    Header: #include <Point.h>
    Since: Esri::ArcGISRuntime 100.0
    Inherits: Esri::ArcGISRuntime::Geometry

    This class was introduced in Esri::ArcGISRuntime 100.0.

    Public Functions

    Point(const Esri::ArcGISRuntime::Geometry &other)
    Point(Esri::ArcGISRuntime::Point &&other)
    Point(const Esri::ArcGISRuntime::Point &other)
    Point(double x, double y, double z, const Esri::ArcGISRuntime::SpatialReference &spatialReference)
    Point(double x, double y, double z)
    Point(double x, double y, const Esri::ArcGISRuntime::SpatialReference &spatialReference)
    Point(double x, double y)
    Point()
    Esri::ArcGISRuntime::Point &operator=(Esri::ArcGISRuntime::Point &&other)
    Esri::ArcGISRuntime::Point &operator=(const Esri::ArcGISRuntime::Point &other)
    virtual ~Point() override
    bool isValid() const
    double m() const
    double x() const
    double y() const
    double z() const

    Static Public Members

    Esri::ArcGISRuntime::Point createWithM(double x, double y, double m)
    Esri::ArcGISRuntime::Point createWithM(double x, double y, double m, const Esri::ArcGISRuntime::SpatialReference &spatialReference)
    Esri::ArcGISRuntime::Point createWithM(double x, double y, double z, double m)
    Esri::ArcGISRuntime::Point createWithM(double x, double y, double z, double m, const Esri::ArcGISRuntime::SpatialReference &spatialReference)

    Detailed Description

    Point geometries represent discrete locations or entities, such as a geocoded house address, the location of a water meter in a water utility network, a moving vehicle, and so on. Larger geographic entities (such as cities) are often represented as points on small-scale maps. 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.

    Points store a single set of x,y coordinates that define a location (longitude and latitude, for example), and a SpatialReference. Points can optionally have z (altitude) and m (measure) attributes.

    For 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, points 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, longitude-formatted string directly to a Point, and also return a latitude, longitude-formatted string from an existing Point. Other coordinate notations, such as Military Grid Reference System (MGRS) and United States National Grid (USNG) are also supported.

    Point is immutable. Instead of changing the properties of an existing Point, you can create new Point instances, or use PointBuilder.

    Points are based upon the base 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 point once it has been created, use the PointBuilder class instead. The GeometryBuilder::toGeometry() method provides the point object.

    Member Function Documentation

    Point::Point(const Esri::ArcGISRuntime::Geometry &other)

    Converting constructor from other Geometry.

    See also Downcast helper functions.

    Point::Point(Esri::ArcGISRuntime::Point &&other)

    Move constructor from other Point.

    Point::Point(const Esri::ArcGISRuntime::Point &other)

    Copy constructor from other Point.

    Point::Point(double x, double y, double z, const Esri::ArcGISRuntime::SpatialReference &spatialReference)

    Constructor using x, y and z coordinates and a spatialReference.

    The minimum z-value is -6,356,752 meters, which is the approximate radius of the earth (the WGS 84 datum semi-minor axis). The maximum z-value is 55,000,000 meters.

    Point::Point(double x, double y, double z)

    Constructor using x, y and z coordinates.

    The minimum z-value is -6,356,752 meters, which is the approximate radius of the earth (the WGS 84 datum semi-minor axis). The maximum z-value is 55,000,000 meters.

    Point::Point(double x, double y, const Esri::ArcGISRuntime::SpatialReference &spatialReference)

    Constructor using x and y coordinates and a spatialReference.

    Point::Point(double x, double y)

    Constructor using x and y coordinates.

    Point::Point()

    Default constructor. Creates an empty Point.

    Esri::ArcGISRuntime::Point &Point::operator=(Esri::ArcGISRuntime::Point &&other)

    Move operator from other Point.

    Esri::ArcGISRuntime::Point &Point::operator=(const Esri::ArcGISRuntime::Point &other)

    Assignment operator from other Point.

    [override virtual] Point::~Point()

    Destructor

    [static] Esri::ArcGISRuntime::Point Point::createWithM(double x, double y, double m)

    Creates a Point using x and y coordinates and an m value.

    Returns a Point with the specified coordinates and m-value.

    [static] Esri::ArcGISRuntime::Point Point::createWithM(double x, double y, double m, const Esri::ArcGISRuntime::SpatialReference &spatialReference)

    Creates a Point using x and y coordinates, an m value and a spatialReference.

    Returns a Point with the specified coordinates and m-value in the given spatial reference.

    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 (Geometry::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.

    [static] Esri::ArcGISRuntime::Point Point::createWithM(double x, double y, double z, double m)

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

    Returns a Point with the specified coordinates and m-value. The minimum z-value is -6,356,752 meters, which is the approximate radius of the earth (the WGS 84 datum semi-minor axis). The maximum z-value is 55,000,000 meters.

    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 (Geometry::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.

    [static] Esri::ArcGISRuntime::Point Point::createWithM(double x, double y, double z, double m, const Esri::ArcGISRuntime::SpatialReference &spatialReference)

    Creates a point using x, y and z coordinates, an m value and a spatialReference.

    Returns a Point with the specified coordinates and m-value in the given spatial reference. The minimum z-value is -6,356,752 meters, which is the approximate radius of the earth (the WGS 84 datum semi-minor axis). The maximum z-value is 55,000,000 meters.

    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 (Geometry::hasM is be 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.

    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. For example, z-values are used to draw the locations of geometries in a SceneView. Note that geometries are not considered true 3D shapes and are draped onto surfaces in the view, or in some cases, drawn in a single plane by using z-values. Z-values are stored on Point and Envelope. Because Multipoint, Polyline, and Polygon are created from a collection of Point, 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 (Geometry::hasZ is true). If you create geometries using constructors that take z-value parameters, or if you pass into the constructor points or segments that have z-values, the new geometry has z-values. A Geometry 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 Geometry::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.

    bool Point::isValid() const

    Gets whether this Point is valid.

    A Point is valid if it is not empty and geometryType is GeometryType::Point.

    Returns true if valid.

    This function was introduced in Esri::ArcGISRuntime 100.2.

    double Point::m() const

    Gets the m-value.

    double Point::x() const

    Returns the x-coordinate.

    double Point::y() const

    Gets the y-coordinate.

    double Point::z() const

    Gets the z-coordinate.

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