difference metodu - MultiPolygon
Şöyle yaparız.
Şöyle yaparız.
Şöyle yaparız.
Şöyle yaparız.
MultiPolygonType polygon1;
boost::geometry::read_wkt("MULTIPOLYGON(((...)))", polygon1);
MultiPolygonType polygon2;
boost::geometry::read_wkt("MULTIPOLYGON(((...)))", polygon2);
MultiPolygonType differencePolygon;
boost::geometry::difference(polygon1, polygon2, differencePolygon);
difference metodu - PolygonŞöyle yaparız.
typedef boost::geometry::model::polygon<boost::geometry::model::d2::point_xy<double> >
polygon;
polygon green = ...;
polygon blue = ...;
std::list<polygon> output;
boost::geometry::difference(green, blue, output);
difference metodu - RingŞöyle yaparız.
typedef boost::geometry::model::point<double, 2, boost::geometry::cs::cartesian>
point_t;
// CCW without repeating first vertex.
typedef boost::geometry::model::ring<point_t, false, false> ring_t;
ring_t polyA;
...
ring_t polyB;
...
std::vector<ring_t> out;
boost::geometry::difference(polyA, polyB, out);
Hiç yorum yok:
Yorum Gönder