Skip to content

Commit 6ae8e07

Browse files
Merge pull request #3 from Siddharth-coder13/revert-2-3d-geometries
Revert "Polyhedral read feature"
2 parents 9649062 + 4cb5697 commit 6ae8e07

File tree

12 files changed

+2
-278
lines changed

12 files changed

+2
-278
lines changed

example/01_point_example.cpp

-23
Original file line numberDiff line numberDiff line change
@@ -107,29 +107,6 @@ int main()
107107

108108

109109
// Some ways of getting point values
110-
typedef model::point<double, 3, cs::cartesian> point_t;
111-
typedef model::ring<point_t> ring_t;
112-
typedef model::PolyhedralSurface<ring_t> poly_t;
113-
114-
poly_t polyhedron1;
115-
poly_t polyhedron2 = {{{0,0,0}, {0, 1, 0}, {1, 1, 0}, {1, 0, 0}, {0, 0, 0}}, {{0, 0, 0}, {0, 1, 0}, {0, 1, 1}, {0, 0, 1}, {0, 0, 0}},
116-
{{0, 0, 0}, {1, 0, 0}, {1, 0, 1}, {0, 0, 1}, {0, 0, 0}}, {{1, 1, 1}, {1, 0, 1}, {0, 0, 1}, {0, 1, 1}, {1, 1, 1}}, {{1, 1, 1}, {1, 0, 1}, {1, 0, 0}, {1, 1, 0}, {1, 1, 1}},
117-
{{1, 1, 1}, {1, 1, 0}, {0, 1, 0}, {0, 1, 1}, {1, 1, 1}} };
118-
119-
//append(polyhedron1[0], point_t{1, 0, 0});
120-
//append(polyhedron1[0], point_t{0, 0, 0});
121-
//append(polyhedron1[0], point_t{0, 1, 0});
122-
//append(polyhedron1[0], point_t{1, 1, 0});
123-
//append(polyhedron1[0], point_t{0, 0, 0});
124-
read_wkt("POLYHEDRALSURFACE Z(((0 0 0, 0 1 0, 1 1 0, 1 0 0, 0 0 0)), ((0 0 0, 0 1 0, 0 1 1, 0 0 1, 0 0 0)), ((0 0 0, 1 0 0, 1 0 1, 0 0 1, 0 0 0)), ((1 1 1, 1 0 1, 0 0 1, 0 1 1, 1 1 1)), ((1 1 1, 1 0 1, 1 0 0, 1 1 0, 1 1 1)), ((1 1 1, 1 1 0, 0 1 0, 0 1 1, 1 1 1)))", polyhedron1);
125-
126-
typedef model::polygon<point_2d> poly;
127-
poly polygon1;
128-
read_wkt("POLYGON((0 0, 0 7, 4 2, 2 0, 0 0))", polygon1);
129-
130-
typedef model::linestring<point_2d> lines;
131-
lines line;
132-
read_wkt("LINESTRING(0 0, 2 2, 3 1)", line);
133110

134111
// 1: using the "get" function following the concepts behind
135112
std::cout << get<0>(p2) << "," << get<1>(p2) << std::endl;

include/boost/geometry/algorithms/clear.hpp

-5
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,6 @@ struct clear<Geometry, ring_tag>
123123
: detail::clear::collection_clear<Geometry>
124124
{};
125125

126-
// Clear for Polyhedral surface
127-
template <typename Geometry>
128-
struct clear<Geometry, polyhedral_surface_tag>
129-
: detail::clear::no_action<Geometry>
130-
{};
131126

132127
// Polygon can (indirectly) use std for clear
133128
template <typename Polygon>

include/boost/geometry/core/point_type.hpp

-10
Original file line numberDiff line numberDiff line change
@@ -92,16 +92,6 @@ struct point_type<ring_tag, Ring>
9292
typedef typename boost::range_value<Ring>::type type;
9393
};
9494

95-
// Specialization for PolyhedralSurface: the point-type is the point-type of its rings
96-
template <typename PolyhedralSurface>
97-
struct point_type<polyhedral_surface_tag, PolyhedralSurface>
98-
{
99-
typedef typename point_type
100-
<
101-
ring_tag,
102-
typename ring_type<polyhedral_surface_tag, PolyhedralSurface>::type
103-
>::type type;
104-
};
10595

10696
// Specialization for polygon: the point-type is the point-type of its rings
10797
template <typename Polygon>

include/boost/geometry/core/ring_type.hpp

+1-21
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include <type_traits>
2424

2525
#include <boost/range/value_type.hpp>
26+
2627
#include <boost/geometry/core/static_assert.hpp>
2728
#include <boost/geometry/core/tag.hpp>
2829
#include <boost/geometry/core/tags.hpp>
@@ -60,13 +61,6 @@ struct ring_mutable_type
6061
Geometry);
6162
};
6263

63-
template <typename Geometry>
64-
struct Poly_ring_type
65-
{
66-
BOOST_GEOMETRY_STATIC_ASSERT_FALSE(
67-
"Not implemented for this Geometry type.",
68-
Geometry);
69-
};
7064

7165
} // namespace traits
7266

@@ -93,11 +87,6 @@ struct ring_return_type<ring_tag, Ring>
9387
typedef Ring& type;
9488
};
9589

96-
template <typename PolyhedralSurface>
97-
struct ring_return_type<polyhedral_surface_tag, PolyhedralSurface>
98-
{
99-
typedef typename traits::Poly_ring_type<PolyhedralSurface>::type type;
100-
};
10190

10291
template <typename Polygon>
10392
struct ring_return_type<polygon_tag, Polygon>
@@ -156,15 +145,6 @@ struct ring_type<ring_tag, Ring>
156145
typedef Ring type;
157146
};
158147

159-
template <typename PolyhedralSurface>
160-
struct ring_type<polyhedral_surface_tag, PolyhedralSurface>
161-
{
162-
typedef typename std::remove_reference
163-
<
164-
typename ring_return_type<polyhedral_surface_tag, PolyhedralSurface>::type
165-
>::type type;
166-
};
167-
168148

169149
template <typename Polygon>
170150
struct ring_type<polygon_tag, Polygon>

include/boost/geometry/core/tags.hpp

-3
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,6 @@ struct box_tag : single_tag, areal_tag {};
105105
/// Convenience segment (2-points) identifying tag
106106
struct segment_tag : single_tag, linear_tag {};
107107

108-
/// OGC Polyhedral surface identifying tag
109-
struct polyhedral_surface_tag : single_tag, volumetric_tag {};
110-
111108

112109
/// OGC Multi point identifying tag
113110
struct multi_point_tag : multi_tag, pointlike_tag {};

include/boost/geometry/geometries/PolyhedralSurface.hpp

-113
This file was deleted.

include/boost/geometry/geometries/concepts/PolyhedralSurface_concept.hpp

-40
This file was deleted.

include/boost/geometry/geometries/concepts/check.hpp

+1-5
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
#include <boost/geometry/geometries/concepts/polygon_concept.hpp>
4040
#include <boost/geometry/geometries/concepts/ring_concept.hpp>
4141
#include <boost/geometry/geometries/concepts/segment_concept.hpp>
42-
#include <boost/geometry/geometries/concepts/PolyhedralSurface_concept.hpp>
42+
4343
#include <boost/geometry/algorithms/not_implemented.hpp>
4444

4545
namespace boost { namespace geometry
@@ -121,10 +121,6 @@ struct check<Geometry, polygon_tag, false>
121121
: detail::concept_check::check<concepts::Polygon<Geometry> >
122122
{};
123123

124-
template <typename Geometry>
125-
struct check<Geometry, polyhedral_surface_tag, false>
126-
: detail::concept_check::check<concepts::PolyhedralSurface<Geometry> >
127-
{};
128124

129125
template <typename Geometry>
130126
struct check<Geometry, box_tag, true>

include/boost/geometry/geometries/geometries.hpp

-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,5 @@
2929
#include <boost/geometry/geometries/polygon.hpp>
3030
#include <boost/geometry/geometries/ring.hpp>
3131
#include <boost/geometry/geometries/segment.hpp>
32-
#include <boost/geometry/geometries/PolyhedralSurface.hpp>
3332

3433
#endif // BOOST_GEOMETRY_GEOMETRIES_HPP

include/boost/geometry/geometries/register/PolyhedralSurface.hpp

-17
This file was deleted.

include/boost/geometry/io/wkt/detail/prefix.hpp

-5
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,6 @@ struct prefix_linestring
4747
static inline const char* apply() { return "LINESTRING"; }
4848
};
4949

50-
struct prefix_polyhedral_surface
51-
{
52-
static inline const char* apply() { return "POLYHEDRALSURFACE Z"; }
53-
};
54-
5550
struct prefix_multipoint
5651
{
5752
static inline const char* apply() { return "MULTIPOINT"; }

include/boost/geometry/io/wkt/read.hpp

-35
Original file line numberDiff line numberDiff line change
@@ -453,32 +453,6 @@ struct polygon_parser
453453
}
454454
};
455455

456-
template<typename PolyhedralSurface>
457-
struct polyhderal_surface_parser
458-
{
459-
typedef typename ring_return_type<PolyhedralSurface>::type ring_return_type;
460-
typedef container_appender<ring_return_type> appender;
461-
462-
static inline void apply(tokenizer::iterator& it,
463-
tokenizer::iterator const& end,
464-
std::string const& wkt,
465-
PolyhedralSurface& Poly)
466-
{
467-
handle_open_parenthesis(it, end, wkt);
468-
typename ring_type<PolyhedralSurface>::type ring;
469-
while(it != end && *it != ")"){
470-
appender::apply(it, end, wkt, ring);
471-
if(it!=end && *it == ",")
472-
{
473-
//skip after ring is parsed
474-
++it;
475-
}
476-
477-
}
478-
handle_close_parenthesis(it, end, wkt);
479-
}
480-
};
481-
482456

483457
inline bool one_of(tokenizer::iterator const& it,
484458
std::string const& value,
@@ -870,15 +844,6 @@ struct read_wkt<polygon_tag, Geometry>
870844
>
871845
{};
872846

873-
template <typename Geometry>
874-
struct read_wkt<polyhedral_surface_tag, Geometry>
875-
: detail::wkt::geometry_parser
876-
<
877-
Geometry,
878-
detail::wkt::polyhderal_surface_parser,
879-
detail::wkt::prefix_polyhedral_surface
880-
>
881-
{};
882847

883848
template <typename MultiGeometry>
884849
struct read_wkt<multi_point_tag, MultiGeometry>

0 commit comments

Comments
 (0)