17 #include <geos/geom/Coordinate.h>
18 #include <geos/geom/CoordinateSequence.h>
31 template<
typename CoordinateType>
33 type_pair(
const CoordinateType& typ1,
const CoordinateType& typ2) {
34 return (
static_cast<int>(typ1) << 4) |
static_cast<int>(typ2);
42 template<
typename F,
class... Args>
50 switch(type_pair(typ1, typ2)) {
51 case type_pair(CoordinateType::XY, CoordinateType::XY): fun.template operator()<CoordinateXY, CoordinateXY>(args...);
break;
52 case type_pair(CoordinateType::XY, CoordinateType::XYZ): fun.template operator()<CoordinateXY, CoordinateXYZ>(args...);
break;
53 case type_pair(CoordinateType::XY, CoordinateType::XYM): fun.template operator()<CoordinateXY, CoordinateXYM>(args...);
break;
54 case type_pair(CoordinateType::XY, CoordinateType::XYZM): fun.template operator()<CoordinateXY, CoordinateXYZM>(args...);
break;
56 case type_pair(CoordinateType::XYZ, CoordinateType::XY): fun.template operator()<CoordinateXYZ, CoordinateXY>(args...);
break;
57 case type_pair(CoordinateType::XYZ, CoordinateType::XYZ): fun.template operator()<CoordinateXYZ, CoordinateXYZ>(args...);
break;
58 case type_pair(CoordinateType::XYZ, CoordinateType::XYM): fun.template operator()<CoordinateXYZ, CoordinateXYM>(args...);
break;
59 case type_pair(CoordinateType::XYZ, CoordinateType::XYZM): fun.template operator()<CoordinateXYZ, CoordinateXYZM>(args...);
break;
61 case type_pair(CoordinateType::XYM, CoordinateType::XY): fun.template operator()<CoordinateXYM, CoordinateXY>(args...);
break;
62 case type_pair(CoordinateType::XYM, CoordinateType::XYZ): fun.template operator()<CoordinateXYM, CoordinateXYZ>(args...);
break;
63 case type_pair(CoordinateType::XYM, CoordinateType::XYM): fun.template operator()<CoordinateXYM, CoordinateXYM>(args...);
break;
64 case type_pair(CoordinateType::XYM, CoordinateType::XYZM): fun.template operator()<CoordinateXYM, CoordinateXYZM>(args...);
break;
66 case type_pair(CoordinateType::XYZM, CoordinateType::XY): fun.template operator()<CoordinateXYZM, CoordinateXY>(args...);
break;
67 case type_pair(CoordinateType::XYZM, CoordinateType::XYZ): fun.template operator()<CoordinateXYZM, CoordinateXYZ>(args...);
break;
68 case type_pair(CoordinateType::XYZM, CoordinateType::XYM): fun.template operator()<CoordinateXYZM, CoordinateXYM>(args...);
break;
69 case type_pair(CoordinateType::XYZM, CoordinateType::XYZM): fun.template operator()<CoordinateXYZM, CoordinateXYZM>(args...);
break;
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:56
The CoordinateSequences class provides utility methods to operate on CoordinateSequences....
Definition: CoordinateSequences.h:28
static void binaryDispatch(const CoordinateSequence &seq1, const CoordinateSequence &seq2, F &fun, Args... args)
binaryDispatch calls a functor template, explicitly providing the backing types of two CoordinateSequ...
Definition: CoordinateSequences.h:43
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
CoordinateType getCoordinateType() const
Definition: CoordinateSequence.h:233
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25