15 #include <boost/function.hpp>
21 class recursive_mutex;
24 namespace MAKVRinTerra
56 template <Type T>
class Handle;
65 typedef Handle<PointType>
Point;
66 typedef Handle<PathType>
Path;
67 typedef Handle<AreaType>
Area;
75 class RelationshipMatrix;
78 typedef boost::shared_ptr<Implementation>
ImplPtr;
81 typedef boost::shared_ptr<const Implementation>
ImplCPtr;
87 typedef tbb::recursive_mutex
Mutex;
90 static std::string ToString(
Type);
94 static Area MakeBox(
Point,
double length,
double width,
double rotation);
95 static Area MakeBox(
const DtProj&,
double xmin,
double ymin,
double xmax,
double ymax);
101 static Area MakeArea(
const DtProj&, std::vector<DtPoint> points);
102 static Area MakeArea(
const DtProj&, std::vector<DtVector> points);
103 static Path MakePath(
const DtProj&, std::vector<DtPoint> points);
104 static Path MakePath(
const DtProj&, std::vector<DtVector> points);
111 template <
typename Container>
117 template <
typename Iterator>
168 std::string description()
const;
171 bool isValid()
const;
174 bool isEmpty()
const;
177 bool isUnknown()
const;
180 bool isPoint()
const;
189 unsigned dimension()
const;
199 ImplCPtr implementation()
const;
203 template <
typename T>
204 boost::shared_ptr<const T> cast()
const;
207 const DtProj& projection()
const;
216 void convert(
const DtProj &p);
219 unsigned numberOfPoints()
const;
223 std::auto_ptr<PointVector> points()
const;
226 std::auto_ptr<PointVector> pointsWithHeight()
const;
229 unsigned numberOfSubGeometries()
const;
232 std::auto_ptr<GeometryVector> subGeometries()
const;
261 double length()
const;
267 Point centroid()
const;
301 class Lock : boost::noncopyable
322 template <DtFeatureGeometry::Type T>
324 : myImpl(handle.myImpl)
328 template <
typename T>
336 :
public boost::enable_shared_from_this<DtFeatureGeometry::Implementation>
348 virtual Mutex& getMutex()
const;
350 virtual std::string description()
const;
352 virtual bool isValid()
const;
354 virtual bool isEmpty()
const;
356 virtual unsigned dimension()
const;
363 virtual bool unique()
const;
366 virtual const DtProj & projection()
const = 0;
373 virtual void convert(
const DtProj &) = 0;
376 virtual Type type()
const = 0;
379 virtual unsigned numberOfPoints()
const = 0;
382 virtual std::auto_ptr<PointVector> points()
const = 0;
385 virtual unsigned numberOfSubGeometries()
const = 0;
388 virtual std::auto_ptr<GeometryVector> subGeometries()
const = 0;
411 virtual double length()
const = 0;
413 virtual double area()
const = 0;
416 virtual Point centroid()
const = 0;
448 typedef boost::shared_ptr<EmptyImplementation>
Ptr;
461 std::auto_ptr<PointVector>
points()
const;
491 virtual ~RelationshipMatrix();
494 virtual bool covers()
const;
495 virtual bool within()
const;
496 virtual bool touches()
const;
510 Handle(
const Implementation::Ptr&);
512 DtPoint
point()
const;
513 DtPoint pointWithHeight()
const;
546 typedef std::vector<DtFeatureGeometry::Path>
Vector;
550 template <
typename Container>
553 return Make(
PointVector(cont.begin(), cont.end()), proj);
556 template <
typename Iterator>
564 Handle(
const Implementation::Ptr&);
566 Path reversed()
const;
597 class DT_DLL_features DtFeatureGeometry::Handle<DtFeatureGeometry::AreaType>
598 :
protected DtFeatureGeometry
601 friend class DtFeatureGeometry;
603 typedef std::vector<DtFeatureGeometry::Area>
Vector;
607 Handle(
const Implementation::Ptr&);
609 Path outerBoundary()
const;
611 unsigned numberOfHoles()
const;
612 std::auto_ptr<GeometryVector> holes()
const;
614 Path findShortestPerimeter(
Path)
const;
643 template <DtFeatureGeometry::Type T>
644 std::ostream& operator<< (std::ostream& str, const DtFeatureGeometry::Handle<T>& g)