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
GeometryConverter.hpp
1 // Copyright 2015 GEOSYSTEMS SRL
2 // All Rights Reserved.
3 
4 #ifndef FIRE_GEAR_GEOM_GEOMETRYCONVERTER_HPP_INCLUDED
5 #define FIRE_GEAR_GEOM_GEOMETRYCONVERTER_HPP_INCLUDED
6 
7 #include <geos/geom/PrecisionModel.h>
8 
9 #include <vector>
10 
11 #include "fire/export.hpp"
12 
13 #include "fire/gear/geom/GeometryCache.hpp"
14 #include "fire/gear/geom/PrecisionModel.hpp"
15 
16 namespace geos {
17 namespace geom {
18 class Geometry;
19 class GeometryFactory;
20 class CoordinateSequence;
21 } // namespace geom
22 } // namespace geos
23 
24 namespace fire {
25 namespace gear {
26 namespace geom {
27 class Geometry;
28 class GeometryFactory;
29 class CoordinateSequence;
30 class Point;
31 class LineString;
32 class LinearRing;
33 class Polygon;
34 class GeometryCollection;
35 class Envelope;
36 } // namespace geom
37 } // namespace gear
38 } // namespace fire
39 
46 namespace fire {
53 namespace gear {
60 namespace geom {
67 class FIRE_ENGINE_DLL GeometryConverter {
68  private:
85  geos::geom::Geometry* convert(const Geometry& geometry);
102  Geometry* convert(const geos::geom::Geometry& geometry);
119  geos::geom::Geometry* createPoint(const Geometry& geometry);
136  geos::geom::Geometry* createLineString(const Geometry& geometry);
153  geos::geom::Geometry* createLinearRing(const Geometry& geometry);
170  geos::geom::Geometry* createPolygon(const Geometry& geometry);
187  geos::geom::Geometry* createGeometryCollection(const Geometry& geometry);
204  geos::geom::Geometry* createMultiPoint(const Geometry& geometry);
221  geos::geom::Geometry* createMultiLineString(const Geometry& geometry);
238  geos::geom::Geometry* createMultiPolygon(const Geometry& geometry);
255  Geometry* createPoint(const geos::geom::Geometry& geometry);
272  Geometry* createLineString(const geos::geom::Geometry& geometry);
289  Geometry* createLinearRing(const geos::geom::Geometry& geometry);
306  Geometry* createPolygon(const geos::geom::Geometry& geometry);
323  Geometry* createGeometryCollection(const geos::geom::Geometry& geometry);
324 
325  public:
342  static boost::shared_ptr< geos::geom::GeometryFactory > getGeosGeometryFactory(GeometryFactory* geometryFactory);
359  static boost::shared_ptr< geos::geom::PrecisionModel > getGeosPrecisionModel(const PrecisionModel& precisionModel);
381  static boost::shared_ptr< geos::geom::Geometry > toGeosGeometry(Geometry& geometry, bool evaluateEnvelope = false);
398  static Geometry* fromGeosGeometry(const geos::geom::Geometry& geometry);
415  static geos::geom::Envelope* toGeosEnvelope(fire::gear::geom::Envelope* envelope);
432  static Envelope* fromGeosEnvelope(geos::geom::Envelope* envelope);
449  static std::vector< CoordinateSequence* >* getAllCoordinateSequences(const Geometry& geometry);
466  static CoordinateSequence* fromGeosCoordinateSequence(const geos::geom::CoordinateSequence& geosCoordinateSequence);
483  static geos::geom::CoordinateSequence* toGeosCoordinateSequence(const CoordinateSequence& coordinateSequence);
500  static void updateCoordinateSequence(Geometry& fireGeometry, geos::geom::Geometry* geosGeometry);
517  static geos::geom::PrecisionModel::Type _fire2geosType(const PrecisionModel::Type& type);
534  static PrecisionModel::Type _geos2fireType(const geos::geom::PrecisionModel::Type& type);
551  static geos::geom::CoordinateSequence* getGeosCoordinates(Geometry* geometry);
552 };
553 } // namespace geom
554 } // namespace gear
555 } // namespace fire
556 
557 #endif
Definition: PrecisionModel.hpp:50
Definition: GeometryConverter.hpp:67
Definition: GeometryFactory.hpp:52
Definition: Envelope.hpp:31
Definition: CoordinateSequence.hpp:49
Definition: Geometry.hpp:69
Type
Definition: PrecisionModel.hpp:77