9#include "GeoDataPoint.h"
10#include "GeoDataPoint_p.h"
13#include "MarbleDebug.h"
14#include "MarbleGlobal.h"
16#include "GeoDataTypes.h"
17#include "GeoDataLatLonAltBox.h"
23GeoDataPoint::GeoDataPoint( qreal lon, qreal lat, qreal alt,
36 const GeoDataPointPrivate *
const otherD = other.d_func();
38 d->m_coordinates = otherD->m_coordinates;
39 d->m_latLonAltBox = otherD->m_latLonAltBox;
42GeoDataPoint::GeoDataPoint(
const GeoDataCoordinates& other )
43 : GeoDataGeometry ( new GeoDataPointPrivate )
46 d->m_coordinates = other;
47 d->m_latLonAltBox = GeoDataLatLonAltBox(d->m_coordinates);
50GeoDataPoint::GeoDataPoint()
51 : GeoDataGeometry( new GeoDataPointPrivate )
56GeoDataPoint::~GeoDataPoint()
61EnumGeometryId GeoDataPoint::geometryId()
const
63 return GeoDataPointId;
66GeoDataGeometry *GeoDataPoint::copy()
const
68 return new GeoDataPoint(*
this);
71bool GeoDataPoint::operator==(
const GeoDataPoint &other )
const
73 return equals(other) &&
74 coordinates() == other.coordinates();
77bool GeoDataPoint::operator!=(
const GeoDataPoint &other )
const
79 return !this->operator==(other);
82void GeoDataPoint::setCoordinates(
const GeoDataCoordinates &coordinates )
87 d->m_coordinates = coordinates;
88 d->m_latLonAltBox = GeoDataLatLonAltBox(d->m_coordinates);
91const GeoDataCoordinates &GeoDataPoint::coordinates()
const
93 Q_D(
const GeoDataPoint);
94 return d->m_coordinates;
99 return GeoDataTypes::GeoDataPointType;
102void GeoDataPoint::detach()
104 GeoDataGeometry::detach();
107void GeoDataPoint::pack(
QDataStream& stream )
const
109 Q_D(
const GeoDataPoint);
110 d->m_coordinates.pack(stream);
117 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.