我是 boost::geometry 和 C++ 的新手,在玩弄它时,我想到了以下问题:
是否可以直接在多边形内存储附加信息,例如包含颜色或 int 的 std::string一些身份证号码?
还是我必须用类似的东西包装它:
MyPolygon {
typedef boost::geometry::model::d2::point_xy<double> point_2d;
typedef boost::geometry::model::polygon<point_2d> polygon_2d;
polygon_2d poly;
std::string color;
int id;
etc...
}
谢谢!
弗兰兹