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
PrecisionModel.hpp
1 // Copyright 2015 GEOSYSTEMS SRL
2 // All Rights Reserved.
3 
4 #ifndef FIRE_GEAR_GEOM_PRECISIONMODEL_HPP_INCLUDED
5 #define FIRE_GEAR_GEOM_PRECISIONMODEL_HPP_INCLUDED
6 
7 #include <boost/shared_ptr.hpp>
8 
9 #include <geos/geom/PrecisionModel.h>
10 
11 #include <string>
12 
13 #include "fire/export.hpp"
14 
15 namespace fire {
16 namespace gear {
17 namespace geom {
18 class Coordinate;
19 } // namespace geom
20 } // namespace gear
21 } // namespace fire
22 
29 namespace fire {
36 namespace gear {
43 namespace geom {
50 class FIRE_ENGINE_DLL PrecisionModel {
51 friend class GeometryConverter;
52  public:
59  typedef boost::shared_ptr< geos::geom::PrecisionModel > PrecisionModelShp;
60 
61  private:
68  PrecisionModelShp geosPrecisionModel;
69 
70  public:
77  typedef enum {
78  FIXED = 1,
79  FLOATING = 2,
80  FLOATING_SINGLE = 3
81  } Type;
95  ~PrecisionModel();
107  explicit PrecisionModel(Type nModelType);
119  explicit PrecisionModel(double newScale);
131  explicit PrecisionModel(int decPlaces);
143  PrecisionModel(const PrecisionModel& pm);
160  double makePrecise(double val) const;
172  void makePrecise(Coordinate& coordinate) const;
184  bool isFloating() const;
196  int getMaximumSignificantDigits() const;
208  Type getType() const;
220  double getScale() const;
232  std::string toString() const;
249  int compareTo(const PrecisionModel* other) const;
250 };
251 } // namespace geom
252 } // namespace gear
253 } // namespace fire
254 
255 #endif
Definition: Coordinate.hpp:48
Definition: PrecisionModel.hpp:50
Definition: GeometryConverter.hpp:67
boost::shared_ptr< geos::geom::PrecisionModel > PrecisionModelShp
Definition: PrecisionModel.hpp:59