Skip To Content ArcGIS for Developers Sign In Dashboard

PointBuilder Class

(Esri::ArcGISRuntime::PointBuilder)

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

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

Public Functions

PointBuilder(const Point &point, QObject *parent = nullptr)
PointBuilder(const SpatialReference &spatialReference, QObject *parent = nullptr)
~PointBuilder()
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)
Point toPoint() const
double x() const
double y() const
double z() const

Reimplemented Public Functions

virtual GeometryBuilderType geometryBuilderType() const
virtual Geometry toGeometry() const

Additional Inherited Members

Detailed Description

Helper class for building immutable Point geometries.

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 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.

PointBuilder::PointBuilder(const 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()

Destructor.

[virtual] GeometryBuilderType PointBuilder::geometryBuilderType() const

Reimplemented from GeometryBuilder::geometryBuilderType().

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().

[virtual] Geometry PointBuilder::toGeometry() const

Reimplemented from GeometryBuilder::toGeometry().

Returns the point geometry this builder is constructing or modifying.

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.

See also setZ().


Feedback on this topic?