Boost logo

Geometry :

Subject: [ggl] space partitioning
From: Adam Wulkiewicz (adam.wulkiewicz)
Date: 2011-01-21 20:46:53


One more thing. Querry in following form could be difficult to implement
(or impossible for various containers) because there are no area or
elements number bounds defined in the nearest_filter range generator.

BOOST_FOREACH(my_point_type const& p, my_spatial_index |
boost::geometry::adaptors::nearest_filter(my_point_type(5, 5)) |
boost::geometry::adaptors::filter(my_polygon))
{
   // do something with sorted points
}

Instead, it should look like this:

BOOST_FOREACH(my_point_type const& p, my_spatial_index |
boost::geometry::adaptors::nearest_filter(my_point_type(5, 5),
max_distance) | boost::geometry::adaptors::filter(my_polygon))
{
   // do something with sorted points
}

Btw, most basic spacial query might look like this:

BOOST_FOREACH(my_point_type const& p, my_points_vector |
boost::geometry::adaptors::filter(my_aabb))
{
   // do something with sorted points
}

Regards,
Adam Wulkiewicz


Geometry list run by mateusz at loskot.net