8#ifndef FMTCOORD_H_INCLUDED
9#define FMTCOORD_H_INCLUDED
12#include <boost/unordered_map.hpp>
15#include <boost/serialization/serialization.hpp>
16#include <boost/serialization/nvp.hpp>
17#include <boost/serialization/array.hpp>
26 friend class boost::serialization::access;
27 template<
class Archive>
28 void serialize(Archive& ar,
const unsigned int version)
30 ar & BOOST_SERIALIZATION_NVP(x);
31 ar & BOOST_SERIALIZATION_NVP(y);
34 void getxygap(
const FMTcoordinate& rhs,
int& xgap,
int& y_gap)
const;
35 double distanceapproximation(
const FMTcoordinate& coord)
const;
45 void upenveloppe(std::vector<FMTcoordinate>& enveloppe)
const;
53 std::set<FMTcoordinate>::const_iterator
closest(
const std::vector<std::set<FMTcoordinate>::const_iterator>& coordinates,
double& approximation)
const;
54 operator std::string()
const;
55 std::set<FMTcoordinate>
getneighbors(
const unsigned int& nsize,
const bool& circle=
false)
const;
66 unsigned int x = coord.
getx();
67 unsigned int y = coord.
gety();
68 return (boost::hash<unsigned int>()(x) && hash<unsigned int>()(y));
#define FMTEXPORT
Definition: FMTutility.hpp:92
Definition: FMTcoordinate.hpp:25
const std::vector< double > getSpatialCoordinate(std::vector< double > geoTransform) const
unsigned int getx() const
FMTcoordinate at(unsigned int id) const
FMTcoordinate(unsigned int lx, unsigned int ly)
std::set< FMTcoordinate >::const_iterator closest(const std::vector< std::set< FMTcoordinate >::const_iterator > &coordinates, double &approximation) const
double distance(const FMTcoordinate &coord) const
void upenveloppe(std::vector< FMTcoordinate > &enveloppe) const
std::set< FMTcoordinate > getneighbors(const unsigned int &nsize, const bool &circle=false) const
unsigned int gety() const
bool within(const T &ldistance, const FMTcoordinate &coord) const
FMTcoordinate(const FMTcoordinate &rhs)
The spatial namespace provides classes for spatialy explicit simulation/optimization based on raster ...
Definition: FMTareaparser.hpp:36
Definition: FMTaction.hpp:364
std::size_t operator()(const Spatial::FMTcoordinate &coord) const
Definition: FMTcoordinate.hpp:64