|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r68709 - in trunk/boost/geometry: algorithms/detail extensions/gis/io/shapelib
From: barend.gehrels_at_[hidden]
Date: 2011-02-08 02:45:58
Author: barendgehrels
Date: 2011-02-08 02:45:54 EST (Tue, 08 Feb 2011)
New Revision: 68709
URL: http://svn.boost.org/trac/boost/changeset/68709
Log:
Fixed accidental usage of bg::
Text files modified:
trunk/boost/geometry/algorithms/detail/calculate_sum.hpp | 2 +-
trunk/boost/geometry/extensions/gis/io/shapelib/shp_read_object.hpp | 30 +++++++++++++++---------------
2 files changed, 16 insertions(+), 16 deletions(-)
Modified: trunk/boost/geometry/algorithms/detail/calculate_sum.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/detail/calculate_sum.hpp (original)
+++ trunk/boost/geometry/algorithms/detail/calculate_sum.hpp 2011-02-08 02:45:54 EST (Tue, 08 Feb 2011)
@@ -44,7 +44,7 @@
static inline ReturnType apply(Polygon const& poly, Strategy const& strategy)
{
return Policy::apply(exterior_ring(poly), strategy)
- + sum_interior_rings(bg::interior_rings(poly), strategy)
+ + sum_interior_rings(interior_rings(poly), strategy)
;
}
};
Modified: trunk/boost/geometry/extensions/gis/io/shapelib/shp_read_object.hpp
==============================================================================
--- trunk/boost/geometry/extensions/gis/io/shapelib/shp_read_object.hpp (original)
+++ trunk/boost/geometry/extensions/gis/io/shapelib/shp_read_object.hpp 2011-02-08 02:45:54 EST (Tue, 08 Feb 2011)
@@ -50,7 +50,7 @@
{
static inline SHPObject* apply(LineString const& linestring)
{
- typedef typename bg::point_type<Linestring>::type point_type;
+ typedef typename geometry::point_type<Linestring>::type point_type;
if (shape.nSHPType == SHPT_ARCZ && shape.nParts == 1)
{
@@ -60,8 +60,8 @@
for (int i = 0; i < shape.nVertices; i++)
{
point_type point;
- bg::set<0>(point, x[i]);
- bg::set<1>(point, y[i]);
+ geometry::set<0>(point, x[i]);
+ geometry::set<1>(point, y[i]);
linestring.push_back(point);
}
@@ -78,8 +78,8 @@
{
static inline SHPObject* apply(Polygon const& polygon)
{
- typedef typename bg::point_type<Polygon>::type point_type;
- typedef typename bg::ring_type<Polygon>::type ring_type;
+ typedef typename geometry::point_type<Polygon>::type point_type;
+ typedef typename geometry::ring_type<Polygon>::type ring_type;
if (shape.nSHPType == SHPT_POLYGON)
{
@@ -103,11 +103,11 @@
for (v = first; v < last; v++)
{
point_type point;
- bg::set<0>(point, x[v]);
- bg::set<1>(point, y[v]);
+ geometry::set<0>(point, x[v]);
+ geometry::set<1>(point, y[v]);
rings[p].first.push_back(point);
}
- rings[p].second = bg::math::abs(bg::area(rings[p].first));
+ rings[p].second = geometry::math::abs(geometry::area(rings[p].first));
}
if (rings.size() > 1)
@@ -117,20 +117,20 @@
sort_on_area_desc<ring_plus_area>());
// Largest area (either positive or negative) is outer ring
// Rest of the rings are holes
- bg::exterior_ring(polygon) = rings.front().first;
+ geometry::exterior_ring(polygon) = rings.front().first;
for (int i = 1; i < rings.size(); i++)
{
- bg::interior_rings(polygon).push_back(rings[i].first);
- if (! bg::within(rings[i].first.front(), bg::exterior_ring(polygon))
- && ! bg::within(rings[i].first.at(1), bg::exterior_ring(polygon))
+ geometry::interior_rings(polygon).push_back(rings[i].first);
+ if (! geometry::within(rings[i].first.front(), geometry::exterior_ring(polygon))
+ && ! geometry::within(rings[i].first.at(1), geometry::exterior_ring(polygon))
)
{
#if ! defined(NDEBUG)
std::cout << "Error: inconsistent ring!" << std::endl;
BOOST_FOREACH(ring_plus_area const& r, rings)
{
- std::cout << bg::area(r.first) << " "
- << bg::wkt(r.first.front()) << " "
+ std::cout << geometry::area(r.first) << " "
+ << geometry::wkt(r.first.front()) << " "
<< std::endl;
}
#endif
@@ -139,7 +139,7 @@
}
else if (rings.size() == 1)
{
- bg::exterior_ring(polygon) = rings.front().first;
+ geometry::exterior_ring(polygon) = rings.front().first;
}
return true;
}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk