mirror of
https://github.com/boostorg/geometry.git
synced 2026-02-11 11:52:11 +00:00
Added examples of indexing polygons.
Fixed c++11 compilation error caused by use of deleted Allocators copy ctor in rstar insert visitor. [SVN r83110]
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Quickbook Examples
|
||||
//
|
||||
// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
|
||||
// Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
|
||||
//
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -13,7 +13,7 @@
|
||||
//[rtree_quickstart_include
|
||||
|
||||
#include <boost/geometry.hpp>
|
||||
#include <boost/geometry/geometries/point_xy.hpp>
|
||||
#include <boost/geometry/geometries/point.hpp>
|
||||
#include <boost/geometry/geometries/box.hpp>
|
||||
|
||||
#include <boost/geometry/index/rtree.hpp>
|
||||
@@ -39,7 +39,7 @@ int main(void)
|
||||
|
||||
//[rtree_quickstart_create
|
||||
// create the rtree using default constructor
|
||||
bgi::rtree< value, bgi::quadratic<32, 8> > rtree;
|
||||
bgi::rtree< value, bgi::quadratic<16, 4> > rtree;
|
||||
//]
|
||||
|
||||
//[rtree_quickstart_insert
|
||||
@@ -67,9 +67,15 @@ int main(void)
|
||||
//]
|
||||
|
||||
//[rtree_quickstart_output
|
||||
// display results
|
||||
std::cout << "spatial query box:" << std::endl;
|
||||
std::cout << bg::wkt<box>(query_box) << std::endl;
|
||||
std::cout << "spatial query result:" << std::endl;
|
||||
BOOST_FOREACH(value const& v, result_s)
|
||||
std::cout << bg::wkt<box>(v.first) << " - " << v.second << std::endl;
|
||||
|
||||
std::cout << "knn query point:" << std::endl;
|
||||
std::cout << bg::wkt<point>(point(0, 0)) << std::endl;
|
||||
std::cout << "knn query result:" << std::endl;
|
||||
BOOST_FOREACH(value const& v, result_n)
|
||||
std::cout << bg::wkt<box>(v.first) << " - " << v.second << std::endl;
|
||||
|
||||
Reference in New Issue
Block a user