8#include "GeoDataPoint.h"
9#include "GeoDataPoint_p.h"
11#include "MarbleDebug.h"
12#include "MarbleGlobal.h"
14#include "GeoDataLatLonAltBox.h"
15#include "GeoDataTypes.h"
32 const GeoDataPointPrivate *
const otherD = other.d_func();
34 d->m_coordinates = otherD->m_coordinates;
35 d->m_latLonAltBox = otherD->m_latLonAltBox;
38GeoDataPoint::GeoDataPoint(
const GeoDataCoordinates &other)
39 : GeoDataGeometry(new GeoDataPointPrivate)
42 d->m_coordinates = other;
43 d->m_latLonAltBox = GeoDataLatLonAltBox(d->m_coordinates);
46GeoDataPoint::GeoDataPoint()
47 : GeoDataGeometry(new GeoDataPointPrivate)
52GeoDataPoint::~GeoDataPoint()
57EnumGeometryId GeoDataPoint::geometryId()
const
59 return GeoDataPointId;
62GeoDataGeometry *GeoDataPoint::copy()
const
64 return new GeoDataPoint(*
this);
67bool GeoDataPoint::operator==(
const GeoDataPoint &other)
const
69 return equals(other) && coordinates() == other.coordinates();
72bool GeoDataPoint::operator!=(
const GeoDataPoint &other)
const
74 return !this->operator==(other);
77void GeoDataPoint::setCoordinates(
const GeoDataCoordinates &coordinates)
82 d->m_coordinates = coordinates;
83 d->m_latLonAltBox = GeoDataLatLonAltBox(d->m_coordinates);
86const GeoDataCoordinates &GeoDataPoint::coordinates()
const
88 Q_D(
const GeoDataPoint);
89 return d->m_coordinates;
94 return GeoDataTypes::GeoDataPointType;
97void GeoDataPoint::detach()
99 GeoDataGeometry::detach();
104 Q_D(
const GeoDataPoint);
105 d->m_coordinates.pack(stream);
112 d->m_coordinates.unpack(stream);
A 3d point representation.
Unit
enum used constructor to specify the units used
A base class for all geodata features.
A class that defines a 3D bounding box for geographic data.
A Geometry object representing a 3d point.
const char * nodeType() const override
Provides type information for downcasting a GeoData.
Binds a QML item to a specific geodetic location in screen coordinates.