Ticket #10861: test2.cpp

File test2.cpp, 1.4 KB (added by apl@…, 8 years ago)

testcase

Line 
1#include <iostream>
2#include <vector>
3
4#include <boost/geometry/geometry.hpp>
5#include <boost/geometry/geometries/point_xy.hpp>
6#include <boost/geometry/geometries/polygon.hpp>
7#include <boost/geometry/geometries/box.hpp>
8#include <boost/geometry/multi/geometries/multi_point.hpp>
9#include <boost/polygon/polygon.hpp>
10#include <boost/polygon/voronoi.hpp>
11#include <boost/geometry/algorithms/detail/has_self_intersections.hpp>
12#include <boost/geometry/index/rtree.hpp>
13
14typedef long double GeometryCoord;
15typedef boost::geometry::model::d2::point_xy<GeometryCoord> GeometryPoint;
16typedef boost::geometry::model::polygon<GeometryPoint> GeometryPolygon;
17typedef boost::geometry::model::ring<GeometryPoint> GeometryRing;
18typedef boost::geometry::model::polygon<GeometryPoint>::inner_container_type GeometryRingsList;
19typedef boost::geometry::model::box<GeometryPoint> GeometryBox;
20typedef boost::geometry::model::segment<GeometryPoint> GeometrySegment;
21typedef boost::geometry::model::multi_point<GeometryPoint> GeometryMultiPoint;
22
23namespace bgi = boost::geometry::index;
24typedef std::pair<GeometryBox, GeometryPolygon * > Value;
25
26int main()
27{
28 boost::geometry::index::rtree<Value, boost::geometry::index::linear<16> > rtree;
29
30 GeometryPolygon p;
31 GeometryBox Box;
32
33 boost::geometry::envelope( p, Box );
34
35 rtree.insert(std::make_pair(Box, &p));
36
37 rtree.remove(std::make_pair(Box, &p));
38
39 return 0;
40}
41