56 #ifndef _GAMS_UTILITY_REGION_H_ 57 #define _GAMS_UTILITY_REGION_H_ 63 #include "madara/knowledge/containers/StringVector.h" 87 Region (
const std::vector <Position> & init_vertices =
88 std::vector<Position> (),
unsigned int type = 0,
89 const std::string& name =
"");
100 void operator= (
const Region& rhs);
118 std::string get_name ()
const;
124 void set_name (
const std::string& name);
131 bool contains (
const Position & position)
const;
138 double distance (
const Position & position)
const;
144 Region get_bounding_box ()
const;
150 double get_area ()
const;
157 std::string to_string (
const std::string & delimiter =
":")
const;
171 void calculate_bounding_box ();
183 virtual bool check_valid_type (madara::knowledge::KnowledgeBase& kb,
184 const std::string& name)
const;
191 virtual void to_container_impl (
192 madara::knowledge::KnowledgeBase& kb,
193 const std::string& name);
200 virtual bool from_container_impl (
201 madara::knowledge::KnowledgeBase& kb,
202 const std::string& name);
207 #endif // _GAMS_UTILITY_REGION_H_ std::vector< Position > vertices
the vertices of the region
double min_lat_
bounding box
A class meant to assist with retrieving information into GAMS containers.
Contains all GAMS-related tools, classes and code.
Copyright (c) 2014 Carnegie Mellon University.
bool operator!=(const BasicVector< LDerived, Units > &lhs, const BasicVector< RDerived, Units > &rhs)
A helper class for region information.
unsigned int type_
type for this region
bool operator==(const BasicVector< LDerived, Units > &lhs, const BasicVector< RDerived, Units > &rhs)