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
Projector.hpp
1 // Copyright 2015 GEOSYSTEMS SRL
2 // All Rights Reserved.
3 
4 #ifndef FIRE_GEAR_PROJECTION_PROJECTOR_HPP_INCLUDED
5 #define FIRE_GEAR_PROJECTION_PROJECTOR_HPP_INCLUDED
6 
7 #include <proj_api.h>
8 
9 #include <exception>
10 #include <memory>
11 
12 #include "fire/export.hpp"
13 
14 #include "fire/Object.hpp"
15 #include "fire/logging/Logger.hpp"
16 
17 namespace fire {
18 namespace gear {
19 namespace projection {
20 class Projection;
21 } // namespace projection
22 } // namespace gear
23 } // namespace fire
24 
25 namespace fire {
26 namespace gear {
27 namespace geom {
28 class Coordinate;
29 } // namespace geom
30 } // namespace gear
31 } // namespace fire
32 
33 namespace fire {
34 namespace gear {
35 namespace geom {
36 class CoordinateSequence;
37 } // namespace geom
38 } // namespace gear
39 } // namespace fire
40 
41 namespace fire {
42 namespace gear {
43 namespace geom {
44 class Envelope;
45 } // namespace geom
46 } // namespace gear
47 } // namespace fire
48 
49 namespace fire {
50 namespace gear {
51 namespace geom {
52 class Geometry;
53 } // namespace geom
54 } // namespace gear
55 } // namespace fire
56 
57 namespace fire {
58 namespace gear {
59 namespace geom {
60 class Point;
61 } // namespace geom
62 } // namespace gear
63 } // namespace fire
64 
65 namespace fire {
66 namespace gear {
67 namespace geom {
68 class LineString;
69 } // namespace geom
70 } // namespace gear
71 } // namespace fire
72 
73 namespace fire {
74 namespace gear {
75 namespace geom {
76 class LinearRing;
77 } // namespace geom
78 } // namespace gear
79 } // namespace fire
80 
81 namespace fire {
82 namespace gear {
83 namespace geom {
84 class Polygon;
85 } // namespace geom
86 } // namespace gear
87 } // namespace fire
88 
89 namespace fire {
90 namespace gear {
91 namespace geom {
92 class MultiPoint;
93 } // namespace geom
94 } // namespace gear
95 } // namespace fire
96 
97 namespace fire {
98 namespace gear {
99 namespace geom {
100 class MultiLineString;
101 } // namespace geom
102 } // namespace gear
103 } // namespace fire
104 
105 namespace fire {
106 namespace gear {
107 namespace geom {
108 class MultiPolygon;
109 } // namespace geom
110 } // namespace gear
111 } // namespace fire
112 
113 namespace fire {
114 namespace gear {
115 namespace geom {
116 class GeometryCollection;
117 } // namespace geom
118 } // namespace gear
119 } // namespace fire
120 
121 namespace fire {
122 namespace gear {
123 namespace geom {
124 class Group;
125 } // namespace geom
126 } // namespace gear
127 } // namespace fire
128 
133 namespace fire {
138 namespace gear {
143 namespace projection {
148 class FIRE_ENGINE_DLL Projector : public fire::Object {
149  private:
154  fire::logging::Logger* logger;
159  boost::scoped_ptr< fire::gear::projection::Projection > sourceProjection;
164  boost::scoped_ptr< fire::gear::projection::Projection > destinationProjection;
169  projPJ sourceProjPJ;
174  projPJ destinationProjPJ;
175 
176  public:
187  Projector(fire::gear::projection::Projection* sourceProjection, fire::gear::projection::Projection* destinationProjection);
208  virtual ~Projector();
216  const fire::gear::projection::Projection& getSourceProjection() const;
224  void setSourceProjection(fire::gear::projection::Projection* sourceProjection);
232  void setSourceProjection(int srid);
240  const fire::gear::projection::Projection& getDestinationProjection() const;
248  void setDestinationProjection(fire::gear::projection::Projection* destinationProjection);
256  void setDestinationProjection(int srid);
267  void reset(fire::gear::projection::Projection* sourceProjection, fire::gear::projection::Projection* destinationProjection);
272  void reverse();
283  void project(double& x, double& y) const;
297  void project(double& x, double& y, double& z) const;
308  fire::gear::geom::Coordinate* project(const fire::gear::geom::Coordinate& coordinate) const;
316  void project(fire::gear::geom::Coordinate& coordinate) const;
327  fire::gear::geom::CoordinateSequence* project(const fire::gear::geom::CoordinateSequence& coordinateSequence) const;
335  void project(fire::gear::geom::CoordinateSequence& coordinateSequence) const;
346  fire::gear::geom::Envelope* project(const fire::gear::geom::Envelope& envelope) const;
354  void project(fire::gear::geom::Envelope& envelope) const;
365  fire::gear::geom::Geometry* project(const fire::gear::geom::Geometry& geometry) const;
373  void project(fire::gear::geom::Geometry& geometry) const;
384  fire::gear::geom::Point* project(const fire::gear::geom::Point& point) const;
392  void project(fire::gear::geom::Point& point) const;
403  fire::gear::geom::LineString* project(const fire::gear::geom::LineString& lineString) const;
411  void project(fire::gear::geom::LineString& lineString) const;
422  fire::gear::geom::LinearRing* project(const fire::gear::geom::LinearRing& linearRing) const;
430  void project(fire::gear::geom::LinearRing& linearRing) const;
441  fire::gear::geom::Polygon* project(const fire::gear::geom::Polygon& polygon) const;
449  void project(fire::gear::geom::Polygon& polygon) const;
460  fire::gear::geom::MultiPoint* project(const fire::gear::geom::MultiPoint& multiPoint) const;
468  void project(fire::gear::geom::MultiPoint& multiPoint) const;
479  fire::gear::geom::MultiLineString* project(const fire::gear::geom::MultiLineString& multiLineString) const;
487  void project(fire::gear::geom::MultiLineString& multiLineString) const;
498  fire::gear::geom::MultiPolygon* project(const fire::gear::geom::MultiPolygon& multiPolygon) const;
506  void project(fire::gear::geom::MultiPolygon& multiPolygon) const;
517  fire::gear::geom::GeometryCollection* project(const fire::gear::geom::GeometryCollection& geometryCollection) const;
525  void project(fire::gear::geom::GeometryCollection& geometryCollection) const;
536  fire::gear::geom::Group* project(const fire::gear::geom::Group& group) const;
544  void project(fire::gear::geom::Group& group) const;
545 };
546 } // namespace projection
547 } // namespace gear
548 } // namespace fire
549 
550 #endif
Definition: Coordinate.hpp:48
Definition: Polygon.hpp:50
Definition: GeometryCollection.hpp:51
Definition: LinearRing.hpp:47
Classe per la gestione di un oggetto.
Definition: Object.hpp:29
Definition: Envelope.hpp:31
Definition: MultiLineString.hpp:48
Classe per la gestione di un logger.
Definition: Logger.hpp:29
Definition: Group.hpp:55
Definition: CoordinateSequence.hpp:49
Classe per la gestione di un proiettore.
Definition: Projector.hpp:148
Definition: Point.hpp:48
Definition: Geometry.hpp:69
Definition: LineString.hpp:48
Definition: MultiPolygon.hpp:48
Classe per la gestione di una proiezione.
Definition: Projection.hpp:34
Definition: MultiPoint.hpp:48