00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef GEOS_OPERATION_DISTANCE_FACETSEQUENCE_H
00020 #define GEOS_OPERATION_DISTANCE_FACETSEQUENCE_H
00021
00022 #include <geos/geom/CoordinateSequence.h>
00023 #include <geos/geom/Envelope.h>
00024 #include <geos/geom/Coordinate.h>
00025
00026 using namespace geos::geom;
00027
00028 namespace geos {
00029 namespace operation {
00030 namespace distance {
00031 class FacetSequence {
00032 private:
00033 const CoordinateSequence *pts;
00034 const size_t start;
00035 const size_t end;
00036
00037
00038
00039
00040 Envelope env;
00041
00042 double computeLineLineDistance(const FacetSequence & facetSeq) const;
00043
00044 double computePointLineDistance(const Coordinate & pt, const FacetSequence & facetSeq) const;
00045
00046 void computeEnvelope();
00047
00048 public:
00049 const Envelope * getEnvelope() const;
00050
00051 const Coordinate * getCoordinate(size_t index) const;
00052
00053 size_t size() const;
00054
00055 bool isPoint() const;
00056
00057 double distance(const FacetSequence & facetSeq);
00058
00059 FacetSequence(const CoordinateSequence *pts, size_t start, size_t end);
00060 };
00061
00062 }
00063 }
00064 }
00065
00066 #endif //GEOS_OPERATION_DISTANCE_FACETSEQUENCE_H