Fire Core  8.0.0.alpha
GIS framework per tutti gli usi
 Tutto Classi Namespace Funzioni Variabili Ridefinizioni di tipo (typedef) Tipi enumerati (enum) Valori del tipo enumerato Friend
Point.hpp
1 // Copyright 2015 GEOSYSTEMS SRL
2 // All Rights Reserved.
3 
4 #ifndef FIRE_GEAR_GEOM_POINT_HPP_INCLUDED
5 #define FIRE_GEAR_GEOM_POINT_HPP_INCLUDED
6 
7 #include "fire/export.hpp"
8 
9 #include "fire/gear/geom/Geometry.hpp"
10 
11 namespace fire {
12 namespace gear {
13 namespace geom {
14 class PrecisionModel;
15 class CoordinateSequence;
16 class Coordinate;
17 } // namespace geom
18 } // namespace gear
19 } // namespace fire
20 
27 namespace fire {
34 namespace gear {
41 namespace geom {
48 class FIRE_ENGINE_DLL Point : public virtual Geometry {
49  friend class MultiPoint; // Per permettere l' accesso al metodo private loadJsonValueCoordinates
50 
51  private:
58  std::auto_ptr< CoordinateSequence > coordinates;
65  bool allowedRepeated;
77  void loadJsonValueGeometry(Json::Value& value) const;
89  void loadJsonValueCoordinates(Json::Value& value) const;
101  virtual void setCoordinatesFromJsonValue(Json::Value& value);
109  bool isZ_DoubleNotANumber() const;
110 
111  public:
116  Point();
127  Point(PrecisionModel* precisionModel, int srid);
139  Point(double x, double y, double z, PrecisionModel* precisionModel, int srid);
151  Point(Coordinate* coordinate, PrecisionModel* precisionModel, int srid);
160  Point(const Coordinate& coordinate, const PrecisionModel& precisionModel, int srid);
167  Point(const Point& point);
174  Point& operator=(const Point& point);
179  virtual ~Point();
191  const CoordinateSequence& getCoordinates() const;
203  void setCoordinates(CoordinateSequence* coordinates);
215  double getX() const;
227  double getY() const;
239  double getZ() const;
251  void setX(double x);
263  void setY(double y);
275  void setZ(double z);
287  std::size_t getCoordinatesCount() const;
299  GeometryType::GeometryType getGeometryType() const;
311  bool isEmpty() const;
323  DimensionType::DimensionType getDimensionType() const;
335  Geometry* clone() const;
347  double getLength() const;
359  double getArea() const;
371  bool normalize();
372 };
373 } // namespace geom
374 } // namespace gear
375 } // namespace fire
376 
377 #endif
Definition: Coordinate.hpp:48
Definition: PrecisionModel.hpp:50
GeometryType
Definition: GeometryType.hpp:43
Definition: CoordinateSequence.hpp:49
Definition: Point.hpp:48
Definition: Geometry.hpp:69
Definition: MultiPoint.hpp:48
DimensionType
Definition: DimensionType.hpp:41