;

PointBuilder Class

  • PointBuilder
  • class Esri::ArcGISRuntime::PointBuilder

    Helper class for building immutable Point geometries. More...

    Header: #include <PointBuilder>
    Since: Esri::ArcGISRuntime 100.0
    Inherits: Esri::ArcGISRuntime::GeometryBuilder

    This class was introduced in Esri::ArcGISRuntime 100.0.

    Public Functions

    PointBuilder(const Esri::ArcGISRuntime::SpatialReference &spatialReference, QObject *parent = nullptr)
    PointBuilder(const Esri::ArcGISRuntime::Point &point, QObject *parent = nullptr)
    virtual ~PointBuilder() override
    double m() const
    void offsetBy(double offsetX, double offsetY)
    void setM(double m)
    void setX(double x)
    void setXY(double x, double y)
    void setY(double y)
    void setZ(double z)
    Esri::ArcGISRuntime::Point toPoint() const
    double x() const
    double y() const
    double z() const

    Reimplemented Public Functions

    virtual Esri::ArcGISRuntime::GeometryBuilderType geometryBuilderType() const override
    virtual Esri::ArcGISRuntime::Geometry toGeometry() const override

    Detailed Description

    Points are the most straightforward geometries to define, and Point class constructors provide the same options as available on this builder. This builder class is provided mainly for consistency with other immutable geometries.

    The spatial reference must be set before using the builder and cannot be changed after the builder contains points.

    Member Function Documentation

    PointBuilder::PointBuilder(const Esri::ArcGISRuntime::SpatialReference &spatialReference, QObject *parent = nullptr)

    Initializes a point builder from a SpatialReference.

    • spatialReference - The spatial reference to be used as the starting point for further modifications.
    • parent - An optional parent.

    PointBuilder::PointBuilder(const Esri::ArcGISRuntime::Point &point, QObject *parent = nullptr)

    Initializes a point builder from an existing point.

    • point - The point to be used as the starting point for further modifications.
    • parent - An optional parent.

    [override virtual] PointBuilder::~PointBuilder()

    Destructor.

    [override virtual] Esri::ArcGISRuntime::GeometryBuilderType PointBuilder::geometryBuilderType() const

    Reimplements: GeometryBuilder::geometryBuilderType() const.

    Gets the GeometryBuilderType of this builder.

    double PointBuilder::m() const

    Gets the m-value of the point.

    See also setM().

    void PointBuilder::offsetBy(double offsetX, double offsetY)

    Move the builder's geometry in the x/y plane.

    Returns this PointBuilder so you can chain method calls.

    • offsetX - The offset along the x-axis (negative value moves the point west).
    • offsetY - The offset along the y-axis (negative value moves the point south).

    void PointBuilder::setM(double m)

    Sets the M (measure) value of the point.

    • m - The m-value.

    See also m().

    void PointBuilder::setX(double x)

    Sets the x-coordinate of the point.

    • x - The x-coordinate.

    See also x().

    void PointBuilder::setXY(double x, double y)

    Sets the x and y coordinates of the point.

    • x - The x-coordinate.
    • y - The y-coordinate.

    void PointBuilder::setY(double y)

    Sets the y-coordinate of the point.

    • y - The y-coordinate.

    See also y().

    void PointBuilder::setZ(double z)

    Sets the z-coordinate of the point.

    • z - The z-coordinate.

    See also z().

    [override virtual] Esri::ArcGISRuntime::Geometry PointBuilder::toGeometry() const

    Reimplements: GeometryBuilder::toGeometry() const.

    Returns the point geometry this builder is constructing or modifying.

    Esri::ArcGISRuntime::Point PointBuilder::toPoint() const

    Returns the point geometry this builder is constructing or modifying.

    This is a convenience method to avoid having to cast the return value.

    double PointBuilder::x() const

    Gets the x-coordinate of the point.

    See also setX().

    double PointBuilder::y() const

    Gets the y-coordinate of the point.

    See also setY().

    double PointBuilder::z() const

    Gets the z-coordinate of the point.

    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.

    See also setZ().

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