From 3bc49457d6054a1dd6fcc934841c25e0b914c630 Mon Sep 17 00:00:00 2001 From: Menelaos Karavelas Date: Mon, 9 Mar 2015 17:43:51 +0200 Subject: [PATCH 01/89] [algorithms][disjoint] remove duplicate code; move template parameters inside classes when possible; re-arrange code a bit; --- .../detail/disjoint/point_geometry.hpp | 47 +++++++++---------- 1 file changed, 21 insertions(+), 26 deletions(-) diff --git a/include/boost/geometry/algorithms/detail/disjoint/point_geometry.hpp b/include/boost/geometry/algorithms/detail/disjoint/point_geometry.hpp index a58bff41d..9064905f2 100644 --- a/include/boost/geometry/algorithms/detail/disjoint/point_geometry.hpp +++ b/include/boost/geometry/algorithms/detail/disjoint/point_geometry.hpp @@ -1,12 +1,12 @@ // Boost.Geometry (aka GGL, Generic Geometry Library) -// Copyright (c) 2007-2014 Barend Gehrels, Amsterdam, the Netherlands. -// Copyright (c) 2008-2014 Bruno Lalande, Paris, France. -// Copyright (c) 2009-2014 Mateusz Loskot, London, UK. -// Copyright (c) 2013-2014 Adam Wulkiewicz, Lodz, Poland. +// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Bruno Lalande, Paris, France. +// Copyright (c) 2009-2015 Mateusz Loskot, London, UK. +// Copyright (c) 2013-2015 Adam Wulkiewicz, Lodz, Poland. -// This file was modified by Oracle on 2013-2014. -// Modifications copyright (c) 2013-2014, Oracle and/or its affiliates. +// This file was modified by Oracle on 2013, 2014, 2015. +// Modifications copyright (c) 2013-2015, Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle @@ -39,20 +39,25 @@ namespace detail { namespace disjoint { -template -struct disjoint_point_linear +struct disjoint_point_segment { - static inline - bool apply(Point const& pt, Geometry const& g) + template + static inline bool apply(Point const& point, Segment const& segment) { - return !geometry::covered_by(pt, g); + typedef geometry::model::referring_segment other_segment; + + other_segment other(point, point); + return disjoint_segment + < + Segment, other_segment + >::apply(segment, other); } }; -template struct reverse_covered_by { + template static inline bool apply(Geometry1 const& geometry1, Geometry2 const& geometry2) { @@ -74,30 +79,20 @@ namespace dispatch template struct disjoint - : public detail::disjoint::disjoint_point_linear + : detail::disjoint::reverse_covered_by {}; template struct disjoint - : detail::disjoint::reverse_covered_by + : detail::disjoint::reverse_covered_by {}; template struct disjoint -{ - static inline bool apply(Point const& point, Segment const& segment) - { - typedef geometry::model::referring_segment other_segment; - - other_segment other(point, point); - return detail::disjoint::disjoint_segment - < - Segment, other_segment - >::apply(segment, other); - } -}; + : detail::disjoint::disjoint_point_segment +{}; } // namespace dispatch From 84f0e306d9978b9af21f30b4088387f51f499118 Mon Sep 17 00:00:00 2001 From: Menelaos Karavelas Date: Mon, 9 Mar 2015 17:45:14 +0200 Subject: [PATCH 02/89] [algorithms][disjoint] apply coding rules; (add space between "template" and "<"); implement disjoint(multipoint, linear) using partition; --- .../detail/disjoint/multipoint_geometry.hpp | 136 +++++++++++++++++- 1 file changed, 130 insertions(+), 6 deletions(-) diff --git a/include/boost/geometry/algorithms/detail/disjoint/multipoint_geometry.hpp b/include/boost/geometry/algorithms/detail/disjoint/multipoint_geometry.hpp index 7d1bb0524..bb0b4b97b 100644 --- a/include/boost/geometry/algorithms/detail/disjoint/multipoint_geometry.hpp +++ b/include/boost/geometry/algorithms/detail/disjoint/multipoint_geometry.hpp @@ -1,6 +1,6 @@ // Boost.Geometry (aka GGL, Generic Geometry Library) -// Copyright (c) 2014, Oracle and/or its affiliates. +// Copyright (c) 2014-2015, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle @@ -16,7 +16,17 @@ #include #include +#include + +#include + +#include + +#include +#include + #include +#include #include #include #include @@ -33,7 +43,8 @@ namespace boost { namespace geometry namespace detail { namespace disjoint { -template + +template class multipoint_multipoint { private: @@ -90,6 +101,98 @@ public: }; +template +class multipoint_linear +{ +private: + // structs for partition -- start + struct expand_box + { + template + static inline void apply(Box& total, Geometry const& geometry) + { + geometry::expand(total, geometry::return_envelope(geometry)); + } + + }; + + struct overlaps_box + { + template + static inline bool apply(Box const& box, Geometry const& geometry) + { + return ! dispatch::disjoint::apply(geometry, box); + } + }; + + class item_visitor_type + { + public: + item_visitor_type() : m_intersection_found(false) {} + + template + inline void apply(Item1 const& item1, Item2 const& item2) + { + if (! m_intersection_found + && ! dispatch::disjoint::apply(item1, item2)) + { + m_intersection_found = true; + } + } + + inline bool intersection_found() const { return m_intersection_found; } + + private: + bool m_intersection_found; + }; + // structs for partition -- end + + class segment_range + { + public: + typedef geometry::segment_iterator const_iterator; + typedef const_iterator iterator; + + segment_range(Linear const& linear) + : m_linear(linear) + {} + + const_iterator begin() const + { + return geometry::segments_begin(m_linear); + } + + const_iterator end() const + { + return geometry::segments_end(m_linear); + } + + private: + Linear const& m_linear; + }; + +public: + static inline bool apply(MultiPoint const& multipoint, Linear const& linear) + { + item_visitor_type visitor; + + geometry::partition + < + geometry::model::box::type>, + expand_box, + overlaps_box + >::apply(multipoint, segment_range(linear), visitor); + + return ! visitor.intersection_found(); + } + + static inline bool apply(Linear const& linear, MultiPoint const& multipoint) + { + return apply(multipoint, linear); + } +}; + + }} // namespace detail::disjoint #endif // DOXYGEN_NO_DETAIL @@ -101,7 +204,7 @@ namespace dispatch { -template +template struct disjoint < Point, MultiPoint, DimensionCount, point_tag, multi_point_tag, false @@ -109,7 +212,7 @@ struct disjoint {}; -template +template struct disjoint < MultiPoint, Segment, DimensionCount, multi_point_tag, segment_tag, false @@ -117,7 +220,7 @@ struct disjoint {}; -template +template struct disjoint < MultiPoint, Box, DimensionCount, multi_point_tag, box_tag, false @@ -125,7 +228,12 @@ struct disjoint {}; -template +template +< + typename MultiPoint1, + typename MultiPoint2, + std::size_t DimensionCount +> struct disjoint < MultiPoint1, MultiPoint2, DimensionCount, @@ -151,6 +259,22 @@ struct disjoint }; +template +struct disjoint + < + Linear, MultiPoint, DimensionCount, linear_tag, multi_point_tag, false + > : detail::disjoint::multipoint_linear +{}; + + +template +struct disjoint + < + MultiPoint, Linear, DimensionCount, multi_point_tag, linear_tag, false + > : detail::disjoint::multipoint_linear +{}; + + } // namespace dispatch #endif // DOXYGEN_NO_DISPATCH From 442223945f344e14e8d4a1303825c048dcce4a4f Mon Sep 17 00:00:00 2001 From: Menelaos Karavelas Date: Mon, 9 Mar 2015 17:46:32 +0200 Subject: [PATCH 03/89] [test][algorithms][disjoint] enable test cases for multipoint/linear geometries; modify existing duplicate test case and add new test cases for multipoint/linear; --- .../disjoint/disjoint_coverage.cpp | 27 ++++++++++++++++--- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/test/algorithms/relational_operations/disjoint/disjoint_coverage.cpp b/test/algorithms/relational_operations/disjoint/disjoint_coverage.cpp index 4708fd6db..0b50a3f74 100644 --- a/test/algorithms/relational_operations/disjoint/disjoint_coverage.cpp +++ b/test/algorithms/relational_operations/disjoint/disjoint_coverage.cpp @@ -360,9 +360,19 @@ inline void test_multipoint_linestring() false); tester::apply("mp-l-07", - from_wkt("MULTIPOINT(-1 -1,2 0)"), + from_wkt("MULTIPOINT(-1 -1,2 0,-1 -1,2 0)"), from_wkt("LINESTRING(1 0,3 0)"), false); + + tester::apply("mp-l-08", + from_wkt("MULTIPOINT(2 0)"), + from_wkt("LINESTRING(1 0)"), + true); + + tester::apply("mp-l-09", + from_wkt("MULTIPOINT(3 0,0 0,3 0)"), + from_wkt("LINESTRING(1 0,2 0)"), + true); } template @@ -393,6 +403,16 @@ inline void test_multipoint_multilinestring() from_wkt("MULTIPOINT(0 1,1 0)"), from_wkt("MULTILINESTRING((0 0,2 2,4 4),(0 0,2 0,4 0))"), false); + + tester::apply("mp-ml-05", + from_wkt("MULTIPOINT(0 0,10 0)"), + from_wkt("MULTILINESTRING((0 0,2 2,4 4),(0 0,2 0,4 0))"), + false); + + tester::apply("mp-ml-06", + from_wkt("MULTIPOINT(-1 0,3 0)"), + from_wkt("MULTILINESTRING((0 0,2 2,4 4),(0 0,2 0,4 0))"), + false); } //============================================================================ @@ -1587,9 +1607,8 @@ inline void test_pointlike_linear() test_point_multilinestring(); test_point_segment(); - // not implemented yet - // test_multipoint_linestring(); - // test_multipoint_multilinestring(); + test_multipoint_linestring(); + test_multipoint_multilinestring(); test_multipoint_segment(); } From eb763405bc69c467732967d250075a3df3f582fe Mon Sep 17 00:00:00 2001 From: Menelaos Karavelas Date: Tue, 10 Mar 2015 01:35:34 +0200 Subject: [PATCH 04/89] [doc][algorithms][status][release notes] update disjoint status; add newly supported combinations for disjoint in release notes (for 1.59); --- doc/reference/status/disjoint_status.qbk | 6 +++--- doc/release_notes.qbk | 8 ++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/doc/reference/status/disjoint_status.qbk b/doc/reference/status/disjoint_status.qbk index f4fd4c77b..4c7b59ce1 100644 --- a/doc/reference/status/disjoint_status.qbk +++ b/doc/reference/status/disjoint_status.qbk @@ -4,11 +4,11 @@ [[Point][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ]] [[Segment][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ]] [[Box][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ]] -[[Linestring][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/nyi.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ]] +[[Linestring][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ]] [[Ring][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/nyi.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ]] [[Polygon][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/nyi.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ]] -[[MultiPoint][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/ok.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ]] -[[MultiLinestring][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/nyi.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ]] +[[MultiPoint][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/nyi.png] ][ [$img/nyi.png] ]] +[[MultiLinestring][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ]] [[MultiPolygon][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/nyi.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ]] [[Variant][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/nyi.png] ][ [$img/ok.png] ][ [$img/ok.png] ][ [$img/ok.png] ]] ] diff --git a/doc/release_notes.qbk b/doc/release_notes.qbk index 57dd261b0..e269a84cb 100644 --- a/doc/release_notes.qbk +++ b/doc/release_notes.qbk @@ -18,6 +18,14 @@ [section:release_notes Release Notes] +[/=================] +[heading Boost 1.59] +[/=================] + +[*Additional functionality] + +* Disjoint and intersects support the following geometry combinations: multipoint/linestring, multipoint/multilinestring + [/=================] [heading Boost 1.58] [/=================] From bda35568f0c837465d719464cd3f8b3b3c76af2a Mon Sep 17 00:00:00 2001 From: Menelaos Karavelas Date: Tue, 10 Mar 2015 16:40:12 +0200 Subject: [PATCH 05/89] [algorithms][overlay] implement intersection and difference for pointlike/linear geometries --- .../detail/overlay/intersection_insert.hpp | 80 +++- .../detail/overlay/pointlike_linear.hpp | 344 ++++++++++++++++++ .../detail/overlay/pointlike_pointlike.hpp | 4 +- 3 files changed, 423 insertions(+), 5 deletions(-) create mode 100644 include/boost/geometry/algorithms/detail/overlay/pointlike_linear.hpp diff --git a/include/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp b/include/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp index 3101de8c3..491a540c1 100644 --- a/include/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp @@ -1,9 +1,9 @@ // Boost.Geometry (aka GGL, Generic Geometry Library) -// Copyright (c) 2007-2014 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands. -// This file was modified by Oracle on 2014. -// Modifications copyright (c) 2014 Oracle and/or its affiliates. +// This file was modified by Oracle on 2014, 2015. +// Modifications copyright (c) 2014-2015 Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle @@ -42,6 +42,7 @@ #include #include +#include #if defined(BOOST_GEOMETRY_DEBUG_FOLLOW) #include @@ -700,6 +701,79 @@ struct intersection_insert {}; +// dispatch for difference/intersection of pointlike-linear geometries +template +< + typename Point, typename Linear, typename PointOut, + overlay_type OverlayType, + bool Reverse1, bool Reverse2, bool ReverseOut, + typename Tag +> +struct intersection_insert + < + Point, Linear, PointOut, OverlayType, + Reverse1, Reverse2, ReverseOut, + point_tag, Tag, point_tag, + false, false, false + > : detail_dispatch::overlay::pointlike_linear_point + < + Point, Linear, PointOut, OverlayType, + point_tag, typename tag_cast::type + > +{}; + + +template +< + typename MultiPoint, typename Linear, typename PointOut, + overlay_type OverlayType, + bool Reverse1, bool Reverse2, bool ReverseOut, + typename Tag +> +struct intersection_insert + < + MultiPoint, Linear, PointOut, OverlayType, + Reverse1, Reverse2, ReverseOut, + multi_point_tag, Tag, point_tag, + false, false, false + > : detail_dispatch::overlay::pointlike_linear_point + < + MultiPoint, Linear, PointOut, OverlayType, + multi_point_tag, + typename tag_cast::type + > +{}; + + +template +< + typename Linestring, typename MultiPoint, typename PointOut, + bool Reverse1, bool Reverse2, bool ReverseOut +> +struct intersection_insert + < + Linestring, MultiPoint, PointOut, overlay_intersection, + Reverse1, Reverse2, ReverseOut, + linestring_tag, multi_point_tag, point_tag, + false, false, false + > +{ + template + static inline OutputIterator apply(Linestring const& linestring, + MultiPoint const& multipoint, + RobustPolicy const& robust_policy, + OutputIterator out, + Strategy const& strategy) + { + return detail_dispatch::overlay::pointlike_linear_point + < + MultiPoint, Linestring, PointOut, overlay_intersection, + multi_point_tag, linear_tag + >::apply(multipoint, linestring, robust_policy, out, strategy); + } +}; + + } // namespace dispatch #endif // DOXYGEN_NO_DISPATCH diff --git a/include/boost/geometry/algorithms/detail/overlay/pointlike_linear.hpp b/include/boost/geometry/algorithms/detail/overlay/pointlike_linear.hpp new file mode 100644 index 000000000..ad8756473 --- /dev/null +++ b/include/boost/geometry/algorithms/detail/overlay/pointlike_linear.hpp @@ -0,0 +1,344 @@ +// Boost.Geometry (aka GGL, Generic Geometry Library) + +// Copyright (c) 2015, Oracle and/or its affiliates. + +// Licensed under the Boost Software License version 1.0. +// http://www.boost.org/users/license.html + +// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle + + +#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_POINTLIKE_LINEAR_HPP +#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_POINTLIKE_LINEAR_HPP + +#include +#include + +#include +#include + +#include + +#include + +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + + +namespace boost { namespace geometry +{ + + +#ifndef DOXYGEN_NO_DETAIL +namespace detail { namespace overlay +{ + + +// action struct for pointlike-linear difference/intersection +// it works the same as its pointlike-pointlike counterpart, hence the +// derivation +template +struct action_selector_pl_l + : action_selector_pl_pl +{}; + +// difference/intersection of point-linear +template +< + typename Point, + typename Linear, + typename PointOut, + overlay_type OverlayType, + typename Policy +> +struct point_linear_point +{ + template + static inline OutputIterator apply(Point const& point, + Linear const& linear, + RobustPolicy const&, + OutputIterator oit, + Strategy const&) + { + action_selector_pl_l + < + PointOut, OverlayType + >::apply(point, Policy::apply(point, linear), oit); + return oit; + } +}; + +// difference/intersection of multipoint-segment +template +< + typename MultiPoint, + typename Segment, + typename PointOut, + overlay_type OverlayType, + typename Policy +> +struct multipoint_segment_point +{ + template + static inline OutputIterator apply(MultiPoint const& multipoint, + Segment const& segment, + RobustPolicy const&, + OutputIterator oit, + Strategy const&) + { + for (typename boost::range_iterator::type + it = boost::begin(multipoint); + it != boost::end(multipoint); + ++it) + { + action_selector_pl_l + < + PointOut, OverlayType + >::apply(*it, Policy::apply(*it, segment), oit); + } + + return oit; + } +}; + + +// difference/intersection of multipoint-linear +template +< + typename MultiPoint, + typename Linear, + typename PointOut, + overlay_type OverlayType, + typename Policy +> +class multipoint_linear_point +{ +private: + // structs for partition -- start + struct expand_box + { + template + static inline void apply(Box& total, Geometry const& geometry) + { + geometry::expand(total, geometry::return_envelope(geometry)); + } + + }; + + struct overlaps_box + { + template + static inline bool apply(Box const& box, Geometry const& geometry) + { + return ! geometry::disjoint(geometry, box); + } + }; + + template + class item_visitor_type + { + public: + item_visitor_type(OutputIterator& oit) : m_oit(oit) {} + + template + inline void apply(Item1 const& item1, Item2 const& item2) + { + action_selector_pl_l + < + PointOut, overlay_intersection + >::apply(item1, Policy::apply(item1, item2), m_oit); + } + + private: + OutputIterator& m_oit; + }; + // structs for partition -- end + + class segment_range + { + public: + typedef geometry::segment_iterator const_iterator; + typedef const_iterator iterator; + + segment_range(Linear const& linear) + : m_linear(linear) + {} + + const_iterator begin() const + { + return geometry::segments_begin(m_linear); + } + + const_iterator end() const + { + return geometry::segments_end(m_linear); + } + + private: + Linear const& m_linear; + }; + + template + static inline OutputIterator get_common_points(MultiPoint const& multipoint, + Linear const& linear, + OutputIterator oit) + { + item_visitor_type item_visitor(oit); + + segment_range rng(linear); + + geometry::partition + < + geometry::model::box + < + typename boost::range_value::type + >, + expand_box, + overlaps_box + >::apply(multipoint, rng, item_visitor); + + return oit; + } + +public: + template + static inline OutputIterator apply(MultiPoint const& multipoint, + Linear const& linear, + RobustPolicy const& robust_policy, + OutputIterator oit, + Strategy const& strategy) + { + typedef std::vector + < + typename boost::range_value::type + > point_vector_type; + + point_vector_type common_points; + + // compute the common points + get_common_points(multipoint, linear, + std::back_inserter(common_points)); + + return multipoint_multipoint_point + < + MultiPoint, point_vector_type, PointOut, OverlayType + >::apply(multipoint, common_points, robust_policy, oit, strategy); + } +}; + + +}} // namespace detail::overlay +#endif // DOXYGEN_NO_DETAIL + + +#ifndef DOXYGEN_NO_DISPATCH +namespace detail_dispatch { namespace overlay +{ + +// dispatch struct for pointlike-linear difference/intersection computation +template +< + typename PointLike, + typename Linear, + typename PointOut, + overlay_type OverlayType, + typename Tag1, + typename Tag2 +> +struct pointlike_linear_point + : not_implemented +{}; + + +template +< + typename Point, + typename Linear, + typename PointOut, + overlay_type OverlayType +> +struct pointlike_linear_point + < + Point, Linear, PointOut, OverlayType, point_tag, linear_tag + > : detail::overlay::point_linear_point + < + Point, Linear, PointOut, OverlayType, + detail::not_ + > +{}; + + +template +< + typename Point, + typename Segment, + typename PointOut, + overlay_type OverlayType +> +struct pointlike_linear_point + < + Point, Segment, PointOut, OverlayType, point_tag, segment_tag + > : detail::overlay::point_linear_point + < + Point, Segment, PointOut, OverlayType, + detail::not_ + > +{}; + + +template +< + typename MultiPoint, + typename Linear, + typename PointOut, + overlay_type OverlayType +> +struct pointlike_linear_point + < + MultiPoint, Linear, PointOut, OverlayType, multi_point_tag, linear_tag + > : detail::overlay::multipoint_linear_point + < + MultiPoint, Linear, PointOut, OverlayType, + detail::not_ + > +{}; + + +template +< + typename MultiPoint, + typename Segment, + typename PointOut, + overlay_type OverlayType +> +struct pointlike_linear_point + < + MultiPoint, Segment, PointOut, OverlayType, multi_point_tag, segment_tag + > : detail::overlay::multipoint_segment_point + < + MultiPoint, Segment, PointOut, OverlayType, + detail::not_ + > +{}; + + +}} // namespace detail_dispatch::overlay +#endif // DOXYGEN_NO_DISPATCH + + +}} // namespace boost::geometry + + +#endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_POINTLIKE_LINEAR_HPP diff --git a/include/boost/geometry/algorithms/detail/overlay/pointlike_pointlike.hpp b/include/boost/geometry/algorithms/detail/overlay/pointlike_pointlike.hpp index 0af062d27..3e0641329 100644 --- a/include/boost/geometry/algorithms/detail/overlay/pointlike_pointlike.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/pointlike_pointlike.hpp @@ -1,6 +1,6 @@ // Boost.Geometry (aka GGL, Generic Geometry Library) -// Copyright (c) 2014, Oracle and/or its affiliates. +// Copyright (c) 2014-2015, Oracle and/or its affiliates. // Licensed under the Boost Software License version 1.0. // http://www.boost.org/users/license.html @@ -264,7 +264,7 @@ struct multipoint_multipoint_point >::apply(multipoint2, multipoint1, robust_policy, oit, strategy); } - std::vector::type> + std::vector::type> points2(boost::begin(multipoint2), boost::end(multipoint2)); std::sort(points2.begin(), points2.end(), detail::relate::less()); From a4b062583ce6a28dcf91306023043f63b4d59e91 Mon Sep 17 00:00:00 2001 From: Menelaos Karavelas Date: Tue, 10 Mar 2015 16:46:28 +0200 Subject: [PATCH 06/89] [test][algorithms][set operations] add unit tests for intersection and difference for pointlike/linear geometries --- .../difference/difference_pl_l.cpp | 674 +++++++++++++++++ .../intersection/intersection_pl_l.cpp | 702 ++++++++++++++++++ 2 files changed, 1376 insertions(+) create mode 100644 test/algorithms/set_operations/difference/difference_pl_l.cpp create mode 100644 test/algorithms/set_operations/intersection/intersection_pl_l.cpp diff --git a/test/algorithms/set_operations/difference/difference_pl_l.cpp b/test/algorithms/set_operations/difference/difference_pl_l.cpp new file mode 100644 index 000000000..9592ec56d --- /dev/null +++ b/test/algorithms/set_operations/difference/difference_pl_l.cpp @@ -0,0 +1,674 @@ +// Boost.Geometry (aka GGL, Generic Geometry Library) + +// Copyright (c) 2015, Oracle and/or its affiliates. + +// Licensed under the Boost Software License version 1.0. +// http://www.boost.org/users/license.html + +// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle + +#ifndef BOOST_TEST_MODULE +#define BOOST_TEST_MODULE test_difference_pointlike_linear +#endif + +#include +#include + +#include + +#include "../test_set_ops_pointlike.hpp" + +#include +#include +#include +#include +#include + +typedef bg::model::point point_type; +typedef bg::model::segment segment_type; +typedef bg::model::linestring linestring_type; +typedef bg::model::multi_point multi_point_type; +typedef bg::model::multi_linestring multi_linestring_type; + + +//=========================================================================== +//=========================================================================== +//=========================================================================== + + +BOOST_AUTO_TEST_CASE( test_difference_point_segment ) +{ +#ifdef BOOST_GEOMETRY_TEST_DEBUG + std::cout << "size of std::size_t: " << sizeof(std::size_t) << std::endl; + std::cout << "size of range_iterator: " + << sizeof(boost::range_iterator::type) + << std::endl; + std::cout << "size of range_iterator: " + << sizeof(boost::range_iterator::type) + << std::endl; + std::cout << "size of point_iterator: " + << sizeof(bg::point_iterator) << std::endl; + std::cout << "size of point_iterator: " + << sizeof(bg::point_iterator) << std::endl; + std::cout << "size of point_iterator: " + << sizeof(bg::point_iterator) << std::endl; + std::cout << "size of segment_iterator: " + << sizeof(bg::segment_iterator) << std::endl; + std::cout << "size of segment_iterator: " + << sizeof(bg::segment_iterator) << std::endl; + + std::cout << std::endl << std::endl << std::endl; + std::cout << "*** POINT / SEGMENT DIFFERENCE ***" << std::endl; + std::cout << std::endl; +#endif + + typedef point_type P; + typedef segment_type S; + typedef multi_point_type MP; + + typedef test_set_op_of_pointlike_geometries + < + P, S, MP, bg::overlay_difference + > tester; + + tester::apply + ("psdf01", + from_wkt

("POINT(0 0)"), + from_wkt("SEGMENT(1 1,2 2)"), + from_wkt("MULTIPOINT(0 0)") + ); + + tester::apply + ("psdf02", + from_wkt

("POINT(0 0)"), + from_wkt("SEGMENT(0 0,1 1)"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("psdf03", + from_wkt

("POINT(1 1)"), + from_wkt("SEGMENT(0 0,2 2)"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("psdf04", + from_wkt

("POINT(3 3)"), + from_wkt("SEGMENT(0 0,2 2)"), + from_wkt("MULTIPOINT(3 3)") + ); +} + + +BOOST_AUTO_TEST_CASE( test_difference_point_linestring ) +{ +#ifdef BOOST_GEOMETRY_TEST_DEBUG + std::cout << std::endl << std::endl << std::endl; + std::cout << "*** POINT / LINESTRING DIFFERENCE ***" << std::endl; + std::cout << std::endl; +#endif + + typedef point_type P; + typedef linestring_type L; + typedef multi_point_type MP; + + typedef test_set_op_of_pointlike_geometries + < + P, L, MP, bg::overlay_difference + > tester; + + tester::apply + ("pldf01", + from_wkt

("POINT(0 0)"), + from_wkt("LINESTRING(1 1,2 2)"), + from_wkt("MULTIPOINT(0 0)") + ); + + tester::apply + ("pldf02", + from_wkt

("POINT(0 0)"), + from_wkt("LINESTRING(0 0,1 1)"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("pldf03", + from_wkt

("POINT(1 1)"), + from_wkt("LINESTRING(0 0,2 2)"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("pldf04", + from_wkt

("POINT(3 3)"), + from_wkt("LINESTRING(0 0,2 2)"), + from_wkt("MULTIPOINT(3 3)") + ); + + // linestrings with more than two points + tester::apply + ("pldf05", + from_wkt

("POINT(1 1)"), + from_wkt("LINESTRING(0 0,1 1,2 2)"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("pldf06", + from_wkt

("POINT(2 2)"), + from_wkt("LINESTRING(0 0,1 1,4 4)"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("pldf07", + from_wkt

("POINT(10 10)"), + from_wkt("LINESTRING(0 0,1 1,4 4)"), + from_wkt("MULTIPOINT(10 10)") + ); + + tester::apply + ("pldf08", + from_wkt

("POINT(0 1)"), + from_wkt("LINESTRING(0 0,1 1,4 4)"), + from_wkt("MULTIPOINT(0 1)") + ); + + tester::apply + ("pldf09", + from_wkt

("POINT(4 4)"), + from_wkt("LINESTRING(0 0,1 1,4 4)"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("pldf10", + from_wkt

("POINT(0 0)"), + from_wkt("LINESTRING(0 0,1 1,4 4)"), + from_wkt("MULTIPOINT()") + ); +} + + +BOOST_AUTO_TEST_CASE( test_difference_point_multilinestring ) +{ +#ifdef BOOST_GEOMETRY_TEST_DEBUG + std::cout << std::endl << std::endl << std::endl; + std::cout << "*** POINT / MULTILINESTRING DIFFERENCE ***" << std::endl; + std::cout << std::endl; +#endif + + typedef point_type P; + typedef multi_linestring_type ML; + typedef multi_point_type MP; + + typedef test_set_op_of_pointlike_geometries + < + P, ML, MP, bg::overlay_difference + > tester; + + tester::apply + ("pmldf01", + from_wkt

("POINT(0 0)"), + from_wkt("MULTILINESTRING((1 1,2 2))"), + from_wkt("MULTIPOINT(0 0)") + ); + + tester::apply + ("pmldf02", + from_wkt

("POINT(0 0)"), + from_wkt("MULTILINESTRING((0 0,1 1))"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("pmldf03", + from_wkt

("POINT(1 1)"), + from_wkt("MULTILINESTRING((0 0,2 2))"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("pmldf04", + from_wkt

("POINT(3 3)"), + from_wkt("MULTILINESTRING((0 0,2 2))"), + from_wkt("MULTIPOINT(3 3)") + ); + + // linestrings with more than two points + tester::apply + ("pmldf05", + from_wkt

("POINT(1 1)"), + from_wkt("MULTILINESTRING((0 0,1 1,2 2))"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("pmldf06", + from_wkt

("POINT(2 2)"), + from_wkt("MULTILINESTRING((0 0,1 1,4 4))"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("pmldf07", + from_wkt

("POINT(10 10)"), + from_wkt("MULTILINESTRING((0 0,1 1,4 4))"), + from_wkt("MULTIPOINT(10 10)") + ); + + tester::apply + ("pmldf08", + from_wkt

("POINT(0 1)"), + from_wkt("MULTILINESTRING((0 0,1 1,4 4))"), + from_wkt("MULTIPOINT(0 1)") + ); + + tester::apply + ("pmldf09", + from_wkt

("POINT(4 4)"), + from_wkt("MULTILINESTRING((0 0,1 1,4 4))"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("pmldf10", + from_wkt

("POINT(0 0)"), + from_wkt("MULTILINESTRING((0 0,1 1,4 4))"), + from_wkt("MULTIPOINT()") + ); + + // multilinestrings with more than one linestring + tester::apply + ("pmldf11", + from_wkt

("POINT(0 0)"), + from_wkt("MULTILINESTRING((-10,-10),(0 0,1 1,4 4))"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("pmldf12", + from_wkt

("POINT(0 0)"), + from_wkt("MULTILINESTRING((-10 0,0 0,10 0),(0 0,1 1,4 4))"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("pmldf13", + from_wkt

("POINT(0 0)"), + from_wkt("MULTILINESTRING((-10 0,10 0),(0 0,1 1,4 4))"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("pmldf14", + from_wkt

("POINT(-20 0)"), + from_wkt("MULTILINESTRING((-10 0,10 0),(0 0,1 1,4 4))"), + from_wkt("MULTIPOINT(-20 0)") + ); + + tester::apply + ("pmldf15", + from_wkt

("POINT(0 1)"), + from_wkt("MULTILINESTRING((-10 0,10 0),(0 0,1 1,4 4))"), + from_wkt("MULTIPOINT(0 1)") + ); +} + + +BOOST_AUTO_TEST_CASE( test_difference_multipoint_segment ) +{ +#ifdef BOOST_GEOMETRY_TEST_DEBUG + std::cout << std::endl << std::endl << std::endl; + std::cout << "*** MULTIPOINT / SEGMENT DIFFERENCE ***" << std::endl; + std::cout << std::endl; +#endif + + typedef multi_point_type MP; + typedef segment_type S; + + typedef test_set_op_of_pointlike_geometries + < + MP, S, MP, bg::overlay_difference + > tester; + + tester::apply + ("mpsdf01", + from_wkt("MULTIPOINT(0 0)"), + from_wkt("SEGMENT(1 1,2 2)"), + from_wkt("MULTIPOINT(0 0)") + ); + + tester::apply + ("mpsdf02", + from_wkt("MULTIPOINT(0 0)"), + from_wkt("SEGMENT(0 0,1 1)"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("mpsdf03", + from_wkt("MULTIPOINT(0 0,0 0)"), + from_wkt("SEGMENT(1 1,2 2)"), + from_wkt("MULTIPOINT(0 0,0 0)") + ); + + tester::apply + ("mpsdf04", + from_wkt("MULTIPOINT(0 0,0 0)"), + from_wkt("SEGMENT(0 0,1 1)"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("mpsdf05", + from_wkt("MULTIPOINT(0 0,0 0,1 0)"), + from_wkt("SEGMENT(1 1,2 2)"), + from_wkt("MULTIPOINT(0 0,0 0,1 0)") + ); + + tester::apply + ("mpsf06", + from_wkt("MULTIPOINT(0 0,0 0,1 0)"), + from_wkt("SEGMENT(1 0,2 0)"), + from_wkt("MULTIPOINT(0 0,0 0)") + ); + + tester::apply + ("mpsdf07", + from_wkt("MULTIPOINT(0 0,0 0,2 0)"), + from_wkt("SEGMENT(0 0,1 0)"), + from_wkt("MULTIPOINT(2 0)") + ); + + tester::apply + ("mpsdf08", + from_wkt("MULTIPOINT()"), + from_wkt("SEGMENT(0 0,1 1)"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("mpsdf09", + from_wkt("MULTIPOINT(0 0,0 0,2 0)"), + from_wkt("SEGMENT(-1 0,1 0)"), + from_wkt("MULTIPOINT(2 0)") + ); + + tester::apply + ("mpsdf10", + from_wkt("MULTIPOINT(0 0,0 0,2 0)"), + from_wkt("SEGMENT(1 0,3 0)"), + from_wkt("MULTIPOINT(0 0,0 0)") + ); + + tester::apply + ("mpsdf11", + from_wkt("MULTIPOINT(0 0,0 0,2 0)"), + from_wkt("SEGMENT(-1 0,3 0)"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("mpsdf12", + from_wkt("MULTIPOINT(0 0,0 0,2 0)"), + from_wkt("SEGMENT(3 0,3 0)"), + from_wkt("MULTIPOINT(0 0,0 0,2 0)") + ); + + tester::apply + ("mpsdf12a", + from_wkt("MULTIPOINT(0 0,2 0,0 0)"), + from_wkt("SEGMENT(3 0,3 0)"), + from_wkt("MULTIPOINT(0 0,0 0,2 0)") + ); + + tester::apply + ("mpsdf12b", + from_wkt("MULTIPOINT(0 0,2 0,0 0,2 0)"), + from_wkt("SEGMENT(3 0,3 0)"), + from_wkt("MULTIPOINT(0 0,0 0,2 0,2 0)") + ); + + tester::apply + ("mpsdf12c", + from_wkt("MULTIPOINT(0 0,2 0,0 0,2 0,0 0)"), + from_wkt("SEGMENT(3 0,3 0)"), + from_wkt("MULTIPOINT(0 0,0 0,0 0,2 0,2 0)") + ); + + tester::apply + ("mpsdf13", + from_wkt("MULTIPOINT(0 0,0 0,2 0)"), + from_wkt("SEGMENT(2 0,2 0)"), + from_wkt("MULTIPOINT(0 0,0 0)") + ); + + tester::apply + ("mpsdf14", + from_wkt("MULTIPOINT(0 0,0 0,2 0)"), + from_wkt("SEGMENT(0 0,0 0)"), + from_wkt("MULTIPOINT(2 0)") + ); + + tester::apply + ("mpsdf15", + from_wkt("MULTIPOINT()"), + from_wkt("SEGMENT(0 0,1 0)"), + from_wkt("MULTIPOINT()") + ); +} + + +BOOST_AUTO_TEST_CASE( test_difference_multipoint_linestring ) +{ +#ifdef BOOST_GEOMETRY_TEST_DEBUG + std::cout << std::endl << std::endl << std::endl; + std::cout << "*** MULTIPOINT / LINESTRING DIFFERENCE ***" << std::endl; + std::cout << std::endl; +#endif + + typedef multi_point_type MP; + typedef linestring_type L; + + typedef test_set_op_of_pointlike_geometries + < + MP, L, MP, bg::overlay_difference + > tester; + + tester::apply + ("mpldf01", + from_wkt("MULTIPOINT(0 0)"), + from_wkt("LINESTRING(1 1,2 2,3 3,4 4,5 5)"), + from_wkt("MULTIPOINT(0 0)") + ); + + tester::apply + ("mpldf02", + from_wkt("MULTIPOINT(0 0)"), + from_wkt("LINESTRING(0 0,1 1)"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("mpldf03", + from_wkt("MULTIPOINT(0 0,0 0)"), + from_wkt("LINESTRING(1 1,2 2)"), + from_wkt("MULTIPOINT(0 0,0 0)") + ); + + tester::apply + ("mpldf04", + from_wkt("MULTIPOINT(0 0,0 0)"), + from_wkt("LINESTRING(0 0,1 1)"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("mpldf05", + from_wkt("MULTIPOINT(0 0,0 0,1 0)"), + from_wkt("LINESTRING(1 1,2 2)"), + from_wkt("MULTIPOINT(0 0,0 0,1 0)") + ); + + tester::apply + ("mplf06", + from_wkt("MULTIPOINT(0 0,0 0,1 0)"), + from_wkt("LINESTRING(1 0,2 0)"), + from_wkt("MULTIPOINT(0 0,0 0)") + ); + + tester::apply + ("mpldf07", + from_wkt("MULTIPOINT(0 0,0 0,2 0)"), + from_wkt("LINESTRING(0 0,1 0)"), + from_wkt("MULTIPOINT(2 0)") + ); + + tester::apply + ("mpldf08", + from_wkt("MULTIPOINT()"), + from_wkt("LINESTRING(0 0,1 1)"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("mpldf09", + from_wkt("MULTIPOINT(0 0,0 0,2 0)"), + from_wkt("LINESTRING(-1 0,1 0)"), + from_wkt("MULTIPOINT(2 0)") + ); + + tester::apply + ("mpldf10", + from_wkt("MULTIPOINT(0 0,0 0,2 0)"), + from_wkt("LINESTRING(1 0,3 0)"), + from_wkt("MULTIPOINT(0 0,0 0)") + ); + + tester::apply + ("mpldf11", + from_wkt("MULTIPOINT(0 0,0 0,2 0)"), + from_wkt("LINESTRING(-1 0,3 0)"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("mpldf12", + from_wkt("MULTIPOINT(0 0,0 0,2 0)"), + from_wkt("LINESTRING(3 0,3 0)"), + from_wkt("MULTIPOINT(0 0,0 0,2 0)") + ); + + tester::apply + ("mpldf13", + from_wkt("MULTIPOINT(0 0,0 0,2 0)"), + from_wkt("LINESTRING(2 0,2 0)"), + from_wkt("MULTIPOINT(0 0,0 0)") + ); + + tester::apply + ("mpldf14", + from_wkt("MULTIPOINT(0 0,0 0,2 0)"), + from_wkt("LINESTRING(0 0,0 0)"), + from_wkt("MULTIPOINT(2 0)") + ); + + tester::apply + ("mpldf15", + from_wkt("MULTIPOINT()"), + from_wkt("LINESTRING(0 0,1 0,2 0,3 0)"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("mpldf16", + from_wkt("MULTIPOINT()"), + from_wkt("LINESTRING()"), + from_wkt("MULTIPOINT()") + ); +} + + +BOOST_AUTO_TEST_CASE( test_difference_multipoint_multilinestring ) +{ +#ifdef BOOST_GEOMETRY_TEST_DEBUG + std::cout << std::endl << std::endl << std::endl; + std::cout << "*** MULTIPOINT / MULTILINESTRING DIFFERENCE ***" << std::endl; + std::cout << std::endl; +#endif + + typedef multi_point_type MP; + typedef multi_linestring_type ML; + + typedef test_set_op_of_pointlike_geometries + < + MP, ML, MP, bg::overlay_difference + > tester; + + tester::apply + ("mpmldf01", + from_wkt("MULTIPOINT(0 0,1 0,2 0)"), + from_wkt("MULTILINESTRING((1 0,1 1,1 1,4 4))"), + from_wkt("MULTIPOINT(0 0,2 0)") + ); + + tester::apply + ("mpmldf02", + from_wkt("MULTIPOINT(2 2,3 3,0 0,0 0,2 2,1 1,1 1,1 0,1 0)"), + from_wkt("MULTILINESTRING((1 0,1 1,1 1,4 4))"), + from_wkt("MULTIPOINT(0 0,0 0)") + ); + + tester::apply + ("mpmldf03", + from_wkt("MULTIPOINT(5 5,3 3,0 0,0 0,5 5,1 1,1 1,1 0,1 0)"), + from_wkt("MULTILINESTRING((1 0,1 1,1 1,4 4))"), + from_wkt("MULTIPOINT(5 5,5 5,0 0,0 0)") + ); + + tester::apply + ("mpmldf04", + from_wkt("MULTIPOINT(0 0,1 1,1 0,1 1)"), + from_wkt("MULTILINESTRING((1 0,0 0,1 1,0 0))"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("mpmldf05", + from_wkt("MULTIPOINT(0 0,1 0,2 0,5 0)"), + from_wkt("MULTILINESTRING((0 1,0 0,1 2,1 0),\ + (0 1,2 0,0 10,2 0,2 10,5 10,5 0,5 10))"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("mpmldf05a", + from_wkt("MULTIPOINT(0 0,1 0,6 0,7 0,2 0,5 0,7 0,8 0)"), + from_wkt("MULTILINESTRING((0 1,0 0,1 2,1 0),\ + (0 1,2 0,0 10,2 0,2 10,5 10,5 0,5 10))"), + from_wkt("MULTIPOINT(7 0,7 0,8 0,6 0)") + ); + + tester::apply + ("mpmldf06", + from_wkt("MULTIPOINT(0 0,1 1,1 0,1 1)"), + from_wkt("MULTILINESTRING(())"), + from_wkt("MULTIPOINT(0 0,1 1,1 0,1 1)") + ); + + tester::apply + ("mpmldf07", + from_wkt("MULTIPOINT()"), + from_wkt("MULTILINESTRING(())"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("mpmldf08", + from_wkt("MULTIPOINT()"), + from_wkt("MULTILINESTRING((0 0,1 0),(9 0,10 0))"), + from_wkt("MULTIPOINT()") + ); +} diff --git a/test/algorithms/set_operations/intersection/intersection_pl_l.cpp b/test/algorithms/set_operations/intersection/intersection_pl_l.cpp new file mode 100644 index 000000000..fd4575f0b --- /dev/null +++ b/test/algorithms/set_operations/intersection/intersection_pl_l.cpp @@ -0,0 +1,702 @@ +// Boost.Geometry (aka GGL, Generic Geometry Library) + +// Copyright (c) 2015, Oracle and/or its affiliates. + +// Licensed under the Boost Software License version 1.0. +// http://www.boost.org/users/license.html + +// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle + +#ifndef BOOST_TEST_MODULE +#define BOOST_TEST_MODULE test_intersection_pointlike_linear +#endif + +#include +#include + +#include + +#include "../test_set_ops_pointlike.hpp" + +#include +#include +#include +#include +#include + +typedef bg::model::point point_type; +typedef bg::model::segment segment_type; +typedef bg::model::linestring linestring_type; +typedef bg::model::multi_point multi_point_type; +typedef bg::model::multi_linestring multi_linestring_type; + + +//=========================================================================== +//=========================================================================== +//=========================================================================== + + +BOOST_AUTO_TEST_CASE( test_intersection_point_segment ) +{ +#ifdef BOOST_GEOMETRY_TEST_DEBUG + std::cout << std::endl << std::endl << std::endl; + std::cout << "*** POINT / SEGMENT INTERSECTION ***" << std::endl; + std::cout << std::endl; +#endif + + typedef point_type P; + typedef segment_type S; + typedef multi_point_type MP; + + typedef test_set_op_of_pointlike_geometries + < + P, S, MP, bg::overlay_intersection + > tester; + + tester::apply + ("psi01", + from_wkt

("POINT(0 0)"), + from_wkt("SEGMENT(1 1,2 2)"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("psi02", + from_wkt

("POINT(0 0)"), + from_wkt("SEGMENT(0 0,1 1)"), + from_wkt("MULTIPOINT(0 0)") + ); + + tester::apply + ("psi03", + from_wkt

("POINT(1 1)"), + from_wkt("SEGMENT(0 0,2 2)"), + from_wkt("MULTIPOINT(1 1)") + ); + + tester::apply + ("psi04", + from_wkt

("POINT(3 3)"), + from_wkt("SEGMENT(0 0,2 2)"), + from_wkt("MULTIPOINT()") + ); +} + + +BOOST_AUTO_TEST_CASE( test_intersection_point_linestring ) +{ +#ifdef BOOST_GEOMETRY_TEST_DEBUG + std::cout << std::endl << std::endl << std::endl; + std::cout << "*** POINT / LINESTRING INTERSECTION ***" << std::endl; + std::cout << std::endl; +#endif + + typedef point_type P; + typedef linestring_type L; + typedef multi_point_type MP; + + typedef test_set_op_of_pointlike_geometries + < + P, L, MP, bg::overlay_intersection + > tester; + + tester::apply + ("pli01", + from_wkt

("POINT(0 0)"), + from_wkt("LINESTRING(1 1,2 2)"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("pli02", + from_wkt

("POINT(0 0)"), + from_wkt("LINESTRING(0 0,1 1)"), + from_wkt("MULTIPOINT(0 0)") + ); + + tester::apply + ("pli03", + from_wkt

("POINT(1 1)"), + from_wkt("LINESTRING(0 0,2 2)"), + from_wkt("MULTIPOINT(1 1)") + ); + + tester::apply + ("pli04", + from_wkt

("POINT(3 3)"), + from_wkt("LINESTRING(0 0,2 2)"), + from_wkt("MULTIPOINT()") + ); + + // linestrings with more than two points + tester::apply + ("pli05", + from_wkt

("POINT(1 1)"), + from_wkt("LINESTRING(0 0,1 1,2 2)"), + from_wkt("MULTIPOINT(1 1)") + ); + + tester::apply + ("pli06", + from_wkt

("POINT(2 2)"), + from_wkt("LINESTRING(0 0,1 1,4 4)"), + from_wkt("MULTIPOINT(2 2)") + ); + + tester::apply + ("pli07", + from_wkt

("POINT(10 10)"), + from_wkt("LINESTRING(0 0,1 1,4 4)"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("pli08", + from_wkt

("POINT(0 1)"), + from_wkt("LINESTRING(0 0,1 1,4 4)"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("pli09", + from_wkt

("POINT(4 4)"), + from_wkt("LINESTRING(0 0,1 1,4 4)"), + from_wkt("MULTIPOINT(4 4)") + ); + + tester::apply + ("pli10", + from_wkt

("POINT(0 0)"), + from_wkt("LINESTRING(0 0,1 1,4 4)"), + from_wkt("MULTIPOINT(0 0)") + ); +} + + +BOOST_AUTO_TEST_CASE( test_intersection_point_multilinestring ) +{ +#ifdef BOOST_GEOMETRY_TEST_DEBUG + std::cout << std::endl << std::endl << std::endl; + std::cout << "*** POINT / MULTILINESTRING INTERSECTION ***" << std::endl; + std::cout << std::endl; +#endif + + typedef point_type P; + typedef multi_linestring_type ML; + typedef multi_point_type MP; + + typedef test_set_op_of_pointlike_geometries + < + P, ML, MP, bg::overlay_intersection + > tester; + + tester::apply + ("pmli01", + from_wkt

("POINT(0 0)"), + from_wkt("MULTILINESTRING((1 1,2 2))"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("pmli02", + from_wkt

("POINT(0 0)"), + from_wkt("MULTILINESTRING((0 0,1 1))"), + from_wkt("MULTIPOINT(0 0)") + ); + + tester::apply + ("pmli03", + from_wkt

("POINT(1 1)"), + from_wkt("MULTILINESTRING((0 0,2 2))"), + from_wkt("MULTIPOINT(1 1)") + ); + + tester::apply + ("pmli04", + from_wkt

("POINT(3 3)"), + from_wkt("MULTILINESTRING((0 0,2 2))"), + from_wkt("MULTIPOINT()") + ); + + // linestrings with more than two points + tester::apply + ("pmli05", + from_wkt

("POINT(1 1)"), + from_wkt("MULTILINESTRING((0 0,1 1,2 2))"), + from_wkt("MULTIPOINT(1 1)") + ); + + tester::apply + ("pmli06", + from_wkt

("POINT(2 2)"), + from_wkt("MULTILINESTRING((0 0,1 1,4 4))"), + from_wkt("MULTIPOINT(2 2)") + ); + + tester::apply + ("pmli07", + from_wkt

("POINT(10 10)"), + from_wkt("MULTILINESTRING((0 0,1 1,4 4))"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("pmli08", + from_wkt

("POINT(0 1)"), + from_wkt("MULTILINESTRING((0 0,1 1,4 4))"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("pmli09", + from_wkt

("POINT(4 4)"), + from_wkt("MULTILINESTRING((0 0,1 1,4 4))"), + from_wkt("MULTIPOINT(4 4)") + ); + + tester::apply + ("pmli10", + from_wkt

("POINT(0 0)"), + from_wkt("MULTILINESTRING((0 0,1 1,4 4))"), + from_wkt("MULTIPOINT(0 0)") + ); + + // multilinestrings with more than one linestring + tester::apply + ("pmli11", + from_wkt

("POINT(0 0)"), + from_wkt("MULTILINESTRING((-10,-10),(0 0,1 1,4 4))"), + from_wkt("MULTIPOINT(0 0)") + ); + + tester::apply + ("pmli12", + from_wkt

("POINT(0 0)"), + from_wkt("MULTILINESTRING((-10 0,0 0,10 0),(0 0,1 1,4 4))"), + from_wkt("MULTIPOINT(0 0)") + ); + + tester::apply + ("pmli13", + from_wkt

("POINT(0 0)"), + from_wkt("MULTILINESTRING((-10 0,10 0),(0 0,1 1,4 4))"), + from_wkt("MULTIPOINT(0 0)") + ); + + tester::apply + ("pmli14", + from_wkt

("POINT(-20 0)"), + from_wkt("MULTILINESTRING((-10 0,10 0),(0 0,1 1,4 4))"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("pmli15", + from_wkt

("POINT(0 1)"), + from_wkt("MULTILINESTRING((-10 0,10 0),(0 0,1 1,4 4))"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("pmli16", + from_wkt

("POINT(1 0)"), + from_wkt("MULTILINESTRING((-10 0,10 0),(-1 0,2 0,20 0))"), + from_wkt("MULTIPOINT(1 0)") + ); + + tester::apply + ("pmli17", + from_wkt

("POINT(1 0)"), + from_wkt("MULTILINESTRING((-10 0,10 0),(0 -1,0 2,0 4))"), + from_wkt("MULTIPOINT(1 0)") + ); +} + + +BOOST_AUTO_TEST_CASE( test_intersection_multipoint_segment ) +{ +#ifdef BOOST_GEOMETRY_TEST_DEBUG + std::cout << std::endl << std::endl << std::endl; + std::cout << "*** MULTIPOINT / SEGMENT INTERSECTION ***" << std::endl; + std::cout << std::endl; +#endif + + typedef multi_point_type MP; + typedef segment_type S; + + typedef test_set_op_of_pointlike_geometries + < + MP, S, MP, bg::overlay_intersection + > tester; + + tester::apply + ("mpsi01", + from_wkt("MULTIPOINT(0 0)"), + from_wkt("SEGMENT(1 1,2 2)"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("mpsi02", + from_wkt("MULTIPOINT(0 0)"), + from_wkt("SEGMENT(0 0,1 1)"), + from_wkt("MULTIPOINT(0 0)") + ); + + tester::apply + ("mpsi03", + from_wkt("MULTIPOINT(0 0,0 0)"), + from_wkt("SEGMENT(1 1,2 2)"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("mpsi04", + from_wkt("MULTIPOINT(0 0,0 0)"), + from_wkt("SEGMENT(0 0,1 1)"), + from_wkt("MULTIPOINT(0 0,0 0)") + ); + + tester::apply + ("mpsi05", + from_wkt("MULTIPOINT(0 0,0 0,1 0)"), + from_wkt("SEGMENT(1 1,2 2)"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("mpsf06", + from_wkt("MULTIPOINT(0 0,0 0,1 0)"), + from_wkt("SEGMENT(1 0,2 0)"), + from_wkt("MULTIPOINT(1 0)") + ); + + tester::apply + ("mpsi07", + from_wkt("MULTIPOINT(0 0,0 0,2 0)"), + from_wkt("SEGMENT(0 0,1 0)"), + from_wkt("MULTIPOINT(0 0,0 0)") + ); + + tester::apply + ("mpsi07a", + from_wkt("MULTIPOINT(0 0,0 0,2 0)"), + from_wkt("SEGMENT(0 0,3 0)"), + from_wkt("MULTIPOINT(0 0,0 0,2 0)") + ); + + tester::apply + ("mpsi08", + from_wkt("MULTIPOINT()"), + from_wkt("SEGMENT(0 0,1 1)"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("mpsi09", + from_wkt("MULTIPOINT(0 0,0 0,2 0)"), + from_wkt("SEGMENT(-1 0,1 0)"), + from_wkt("MULTIPOINT(0 0,0 0)") + ); + + tester::apply + ("mpsi10", + from_wkt("MULTIPOINT(0 0,0 0,2 0)"), + from_wkt("SEGMENT(1 0,3 0)"), + from_wkt("MULTIPOINT(2 0)") + ); + + tester::apply + ("mpsi11", + from_wkt("MULTIPOINT(0 0,0 0,2 0)"), + from_wkt("SEGMENT(-1 0,3 0)"), + from_wkt("MULTIPOINT(0 0,0 0,2 0)") + ); + + tester::apply + ("mpsi12", + from_wkt("MULTIPOINT(0 0,0 0,2 0)"), + from_wkt("SEGMENT(3 0,3 0)"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("mpsi12a", + from_wkt("MULTIPOINT(0 0,2 0,0 0)"), + from_wkt("SEGMENT(3 0,3 0)"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("mpsi12b", + from_wkt("MULTIPOINT(0 0,2 0,0 0,2 0)"), + from_wkt("SEGMENT(3 0,3 0)"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("mpsi12c", + from_wkt("MULTIPOINT(0 0,2 0,0 0,2 0,0 0)"), + from_wkt("SEGMENT(3 0,3 0)"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("mpsi13", + from_wkt("MULTIPOINT(0 0,0 0,2 0)"), + from_wkt("SEGMENT(2 0,2 0)"), + from_wkt("MULTIPOINT(2 0)") + ); + + tester::apply + ("mpsi14", + from_wkt("MULTIPOINT(0 0,0 0,2 0)"), + from_wkt("SEGMENT(0 0,0 0)"), + from_wkt("MULTIPOINT(0 0,0 0)") + ); + + tester::apply + ("mpsi15", + from_wkt("MULTIPOINT()"), + from_wkt("SEGMENT(0 0,1 0)"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("mpsi16", + from_wkt("MULTIPOINT(0 0,2 0,0 0,2 0,0 0)"), + from_wkt("SEGMENT(-1 0,10 0)"), + from_wkt("MULTIPOINT(0 0,0 0,0 0,2 0,2 0)") + ); +} + + +BOOST_AUTO_TEST_CASE( test_intersection_multipoint_linestring ) +{ +#ifdef BOOST_GEOMETRY_TEST_DEBUG + std::cout << std::endl << std::endl << std::endl; + std::cout << "*** MULTIPOINT / LINESTRING INTERSECTION ***" << std::endl; + std::cout << std::endl; +#endif + + typedef multi_point_type MP; + typedef linestring_type L; + + typedef test_set_op_of_pointlike_geometries + < + MP, L, MP, bg::overlay_intersection + > tester; + + tester::apply + ("mpli01", + from_wkt("MULTIPOINT(0 0)"), + from_wkt("LINESTRING(1 1,2 2,3 3,4 4,5 5)"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("mpli02", + from_wkt("MULTIPOINT(0 0)"), + from_wkt("LINESTRING(0 0,1 1)"), + from_wkt("MULTIPOINT(0 0)") + ); + + tester::apply + ("mpli03", + from_wkt("MULTIPOINT(0 0,0 0)"), + from_wkt("LINESTRING(1 1,2 2)"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("mpli04", + from_wkt("MULTIPOINT(0 0,0 0)"), + from_wkt("LINESTRING(0 0,1 1)"), + from_wkt("MULTIPOINT(0 0,0 0)") + ); + + tester::apply + ("mpli05", + from_wkt("MULTIPOINT(0 0,0 0,1 0)"), + from_wkt("LINESTRING(1 1,2 2)"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("mpli06", + from_wkt("MULTIPOINT(0 0,0 0,1 0)"), + from_wkt("LINESTRING(1 0,2 0)"), + from_wkt("MULTIPOINT(1 0)") + ); + + tester::apply + ("mpli07", + from_wkt("MULTIPOINT(0 0,0 0,2 0)"), + from_wkt("LINESTRING(0 0,1 0)"), + from_wkt("MULTIPOINT(0 0,0 0)") + ); + + tester::apply + ("mpli08", + from_wkt("MULTIPOINT()"), + from_wkt("LINESTRING(0 0,1 1)"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("mpli09", + from_wkt("MULTIPOINT(0 0,0 0,2 0)"), + from_wkt("LINESTRING(-1 0,1 0)"), + from_wkt("MULTIPOINT(0 0,0 0)") + ); + + tester::apply + ("mpli10", + from_wkt("MULTIPOINT(0 0,0 0,2 0)"), + from_wkt("LINESTRING(1 0,3 0)"), + from_wkt("MULTIPOINT(2 0)") + ); + + tester::apply + ("mpli10a", + from_wkt("MULTIPOINT(2 0,0 0,2 0,0 0,2 0)"), + from_wkt("LINESTRING(1 0,3 0)"), + from_wkt("MULTIPOINT(2 0,2 0,2 0)") + ); + + tester::apply + ("mpli11", + from_wkt("MULTIPOINT(0 0,0 0,2 0)"), + from_wkt("LINESTRING(-1 0,3 0)"), + from_wkt("MULTIPOINT(2 0,0 0,0 0)") + ); + + tester::apply + ("mpli12", + from_wkt("MULTIPOINT(0 0,0 0,2 0)"), + from_wkt("LINESTRING(3 0,3 0)"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("mpli13", + from_wkt("MULTIPOINT(0 0,0 0,2 0)"), + from_wkt("LINESTRING(2 0,2 0)"), + from_wkt("MULTIPOINT(2 0)") + ); + + tester::apply + ("mpli14", + from_wkt("MULTIPOINT(0 0,0 0,2 0)"), + from_wkt("LINESTRING(0 0,0 0)"), + from_wkt("MULTIPOINT(0 0,0 0)") + ); + + tester::apply + ("mpli15", + from_wkt("MULTIPOINT()"), + from_wkt("LINESTRING(0 0,1 0,2 0,3 0)"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("mpli16", + from_wkt("MULTIPOINT()"), + from_wkt("LINESTRING()"), + from_wkt("MULTIPOINT()") + ); +} + + +BOOST_AUTO_TEST_CASE( test_intersection_multipoint_multilinestring ) +{ +#ifdef BOOST_GEOMETRY_TEST_DEBUG + std::cout << std::endl << std::endl << std::endl; + std::cout << "*** MULTIPOINT / MULTILINESTRING INTERSECTION ***" + << std::endl; + std::cout << std::endl; +#endif + + typedef multi_point_type MP; + typedef multi_linestring_type ML; + + typedef test_set_op_of_pointlike_geometries + < + MP, ML, MP, bg::overlay_intersection + > tester; + + tester::apply + ("mpmli01", + from_wkt("MULTIPOINT(0 0,1 0,2 0)"), + from_wkt("MULTILINESTRING((1 0,1 1,1 1,4 4))"), + from_wkt("MULTIPOINT(1 0)") + ); + + tester::apply + ("mpmli02", + from_wkt("MULTIPOINT(2 2,3 3,0 0,0 0,2 2,1 1,1 1,1 0,1 0)"), + from_wkt("MULTILINESTRING((1 0,1 1,1 1,4 4))"), + from_wkt("MULTIPOINT(2 2,2 2,3 3,1 1,1 1,1 0,1 0)") + ); + + tester::apply + ("mpmli03", + from_wkt("MULTIPOINT(5 5,3 3,0 0,0 0,5 5,1 1,1 1,1 0,1 0)"), + from_wkt("MULTILINESTRING((1 0,1 1,1 1,4 4))"), + from_wkt("MULTIPOINT(1 0,1 0,3 3,1 1,1 1)") + ); + + tester::apply + ("mpmli04", + from_wkt("MULTIPOINT(0 0,1 1,1 0,1 1)"), + from_wkt("MULTILINESTRING((1 0,0 0,1 1,0 0))"), + from_wkt("MULTIPOINT(1 0,0 0,1 1,1 1)") + ); + + tester::apply + ("mpmli05", + from_wkt("MULTIPOINT(0 0,1 0,2 0,5 0)"), + from_wkt("MULTILINESTRING((0 1,0 0,1 2,1 0),\ + (0 1,2 0,0 10,2 0,2 10,5 10,5 0,5 10))"), + from_wkt("MULTIPOINT(0 0,1 0,2 0,5 0)") + ); + + tester::apply + ("mpmli06", + from_wkt("MULTIPOINT(0 0,1 1,1 0,1 1)"), + from_wkt("MULTILINESTRING(())"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("mpmli07", + from_wkt("MULTIPOINT()"), + from_wkt("MULTILINESTRING(())"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("mpmli08", + from_wkt("MULTIPOINT()"), + from_wkt("MULTILINESTRING((0 0,1 0),(9 0,10 0))"), + from_wkt("MULTIPOINT()") + ); + + tester::apply + ("mpmli09", + from_wkt("MULTIPOINT(0 0,1 1,0 0,0 0,0 0,0 0,0 0,0 0,\ + 0 0,0 0,0 0,0 0,0 0)"), + from_wkt("MULTILINESTRING((0 0,0 1),(0 0,2 0),(0 0,0 3),\ + (0 0,4 0),(0 0,0 5),(0 0,6 0),(0 0,7 0),(0 0,8 0))"), + from_wkt("MULTIPOINT(0 0,0 0,0 0,0 0,0 0,0 0,0 0,\ + 0 0,0 0,0 0,0 0,0 0)") + ); + + tester::apply + ("mpmli09a", + from_wkt("MULTIPOINT(0 0,1 1,0 0)"), + from_wkt("MULTILINESTRING((0 0,0 1),(0 0,2 0),(0 0,0 3),\ + (0 0,4 0),(0 0,0 5),(0 0,6 0),(0 0,7 0),(0 0,8 0))"), + from_wkt("MULTIPOINT(0 0,0 0)") + ); +} From 9c860772fff0275bb5836fe937500003d595c40e Mon Sep 17 00:00:00 2001 From: Menelaos Karavelas Date: Tue, 10 Mar 2015 16:52:14 +0200 Subject: [PATCH 07/89] [test][algorithms][set operations] update Jamfiles with the new unit tests --- test/algorithms/set_operations/difference/Jamfile.v2 | 11 ++++++----- .../algorithms/set_operations/intersection/Jamfile.v2 | 11 ++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/test/algorithms/set_operations/difference/Jamfile.v2 b/test/algorithms/set_operations/difference/Jamfile.v2 index 2903d9cc5..bead4559e 100644 --- a/test/algorithms/set_operations/difference/Jamfile.v2 +++ b/test/algorithms/set_operations/difference/Jamfile.v2 @@ -1,11 +1,11 @@ # Boost.Geometry (aka GGL, Generic Geometry Library) # -# Copyright (c) 2007-2014 Barend Gehrels, Amsterdam, the Netherlands. -# Copyright (c) 2008-2014 Bruno Lalande, Paris, France. -# Copyright (c) 2009-2014 Mateusz Loskot, London, UK. +# Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands. +# Copyright (c) 2008-2015 Bruno Lalande, Paris, France. +# Copyright (c) 2009-2015 Mateusz Loskot, London, UK. # -# This file was modified by Oracle on 2014. -# Modifications copyright (c) 2014, Oracle and/or its affiliates. +# This file was modified by Oracle on 2014, 2015. +# Modifications copyright (c) 2014-2015, Oracle and/or its affiliates. # # Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle # Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle @@ -18,6 +18,7 @@ test-suite boost-geometry-algorithms-difference : [ run difference.cpp : : : BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE msvc:/bigobj ] [ run difference_linear_linear.cpp ] + [ run difference_pl_l.cpp ] [ run difference_pl_pl.cpp ] [ run multi_difference.cpp : : : BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE msvc:/bigobj ] [ run multi_difference_spike.cpp : : : BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE msvc:/bigobj ] diff --git a/test/algorithms/set_operations/intersection/Jamfile.v2 b/test/algorithms/set_operations/intersection/Jamfile.v2 index c039b1664..e66bfb166 100644 --- a/test/algorithms/set_operations/intersection/Jamfile.v2 +++ b/test/algorithms/set_operations/intersection/Jamfile.v2 @@ -1,11 +1,11 @@ # Boost.Geometry (aka GGL, Generic Geometry Library) # -# Copyright (c) 2007-2014 Barend Gehrels, Amsterdam, the Netherlands. -# Copyright (c) 2008-2014 Bruno Lalande, Paris, France. -# Copyright (c) 2009-2014 Mateusz Loskot, London, UK. +# Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands. +# Copyright (c) 2008-2015 Bruno Lalande, Paris, France. +# Copyright (c) 2009-2015 Mateusz Loskot, London, UK. # -# This file was modified by Oracle on 2014. -# Modifications copyright (c) 2014, Oracle and/or its affiliates. +# This file was modified by Oracle on 2014, 2015. +# Modifications copyright (c) 2014-2015, Oracle and/or its affiliates. # # Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle # Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle @@ -18,6 +18,7 @@ test-suite boost-geometry-algorithms-intersection : [ run intersection.cpp : : : BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE msvc:/bigobj ] [ run intersection_linear_linear.cpp ] + [ run intersection_pl_l.cpp ] [ run intersection_pl_pl.cpp ] [ run multi_intersection.cpp : : : BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE msvc:/bigobj ] ; From e29125aff2ccb25c12ce49b240e4a4c6fda87720 Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Thu, 9 Apr 2015 16:15:23 +0200 Subject: [PATCH 08/89] [geometries] Enable the support for std::initializer_list. --- include/boost/geometry/geometries/linestring.hpp | 4 ---- include/boost/geometry/geometries/multi_linestring.hpp | 10 ++++------ include/boost/geometry/geometries/multi_point.hpp | 4 ---- include/boost/geometry/geometries/multi_polygon.hpp | 10 ++++------ include/boost/geometry/geometries/polygon.hpp | 9 ++++----- include/boost/geometry/geometries/ring.hpp | 4 ---- 6 files changed, 12 insertions(+), 29 deletions(-) diff --git a/include/boost/geometry/geometries/linestring.hpp b/include/boost/geometry/geometries/linestring.hpp index 68dc87a3c..481fda2f9 100644 --- a/include/boost/geometry/geometries/linestring.hpp +++ b/include/boost/geometry/geometries/linestring.hpp @@ -26,12 +26,10 @@ #include -#ifdef BOOST_GEOMETRY_EXPERIMENTAL_ENABLE_INITIALIZER_LIST #include #ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST #include #endif -#endif namespace boost { namespace geometry { @@ -76,7 +74,6 @@ public : : base_type(begin, end) {} -#ifdef BOOST_GEOMETRY_EXPERIMENTAL_ENABLE_INITIALIZER_LIST #ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST /// \constructor_initializer_list{linestring} @@ -97,7 +94,6 @@ public : // } //#endif -#endif #endif }; diff --git a/include/boost/geometry/geometries/multi_linestring.hpp b/include/boost/geometry/geometries/multi_linestring.hpp index 195a58139..829da9a22 100644 --- a/include/boost/geometry/geometries/multi_linestring.hpp +++ b/include/boost/geometry/geometries/multi_linestring.hpp @@ -23,12 +23,10 @@ #include #include -#ifdef BOOST_GEOMETRY_EXPERIMENTAL_ENABLE_INITIALIZER_LIST #include #ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST #include #endif -#endif namespace boost { namespace geometry { @@ -58,7 +56,10 @@ class multi_linestring : public Container > { BOOST_CONCEPT_ASSERT( (concept::Linestring) ); -#ifdef BOOST_GEOMETRY_EXPERIMENTAL_ENABLE_INITIALIZER_LIST +#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST + + // default constructor and base_type definitions are required only + // if the constructor taking std::initializer_list is defined typedef Container > base_type; @@ -68,8 +69,6 @@ public: : base_type() {} -#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST - /// \constructor_initializer_list{multi_linestring} inline multi_linestring(std::initializer_list l) : base_type(l.begin(), l.end()) @@ -88,7 +87,6 @@ public: // } //#endif -#endif #endif }; diff --git a/include/boost/geometry/geometries/multi_point.hpp b/include/boost/geometry/geometries/multi_point.hpp index a5e64bb91..98cb283a1 100644 --- a/include/boost/geometry/geometries/multi_point.hpp +++ b/include/boost/geometry/geometries/multi_point.hpp @@ -23,12 +23,10 @@ #include #include -#ifdef BOOST_GEOMETRY_EXPERIMENTAL_ENABLE_INITIALIZER_LIST #include #ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST #include #endif -#endif namespace boost { namespace geometry { @@ -74,7 +72,6 @@ public : : base_type(begin, end) {} -#ifdef BOOST_GEOMETRY_EXPERIMENTAL_ENABLE_INITIALIZER_LIST #ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST /// \constructor_initializer_list{multi_point} @@ -95,7 +92,6 @@ public : // } //#endif -#endif #endif }; diff --git a/include/boost/geometry/geometries/multi_polygon.hpp b/include/boost/geometry/geometries/multi_polygon.hpp index 51fcf235f..10b1ac6a1 100644 --- a/include/boost/geometry/geometries/multi_polygon.hpp +++ b/include/boost/geometry/geometries/multi_polygon.hpp @@ -23,12 +23,10 @@ #include #include -#ifdef BOOST_GEOMETRY_EXPERIMENTAL_ENABLE_INITIALIZER_LIST #include #ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST #include #endif -#endif namespace boost { namespace geometry { @@ -57,7 +55,10 @@ class multi_polygon : public Container > { BOOST_CONCEPT_ASSERT( (concept::Polygon) ); -#ifdef BOOST_GEOMETRY_EXPERIMENTAL_ENABLE_INITIALIZER_LIST +#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST + + // default constructor and base_type definitions are required only + // if the constructor taking std::initializer_list is defined typedef Container > base_type; @@ -67,8 +68,6 @@ public: : base_type() {} -#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST - /// \constructor_initializer_list{multi_polygon} inline multi_polygon(std::initializer_list l) : base_type(l.begin(), l.end()) @@ -87,7 +86,6 @@ public: // } //#endif -#endif #endif }; diff --git a/include/boost/geometry/geometries/polygon.hpp b/include/boost/geometry/geometries/polygon.hpp index 5f2e87a11..25b21d98f 100644 --- a/include/boost/geometry/geometries/polygon.hpp +++ b/include/boost/geometry/geometries/polygon.hpp @@ -27,12 +27,10 @@ #include #include -#ifdef BOOST_GEOMETRY_EXPERIMENTAL_ENABLE_INITIALIZER_LIST #include #ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST #include #endif -#endif namespace boost { namespace geometry { @@ -91,7 +89,10 @@ public: inline ring_type& outer() { return m_outer; } inline inner_container_type & inners() { return m_inners; } -#ifdef BOOST_GEOMETRY_EXPERIMENTAL_ENABLE_INITIALIZER_LIST +#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST + + // default constructor definition is required only + // if the constructor taking std::initializer_list is defined /// \constructor_default{polygon} inline polygon() @@ -99,7 +100,6 @@ public: , m_inners() {} -#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST /// \constructor_initializer_list{polygon} inline polygon(std::initializer_list l) : m_outer(l.size() > 0 ? *l.begin() : ring_type()) @@ -128,7 +128,6 @@ public: // } //#endif -#endif #endif /// Utility method, clears outer and inner rings diff --git a/include/boost/geometry/geometries/ring.hpp b/include/boost/geometry/geometries/ring.hpp index 502c95d75..a496480b9 100644 --- a/include/boost/geometry/geometries/ring.hpp +++ b/include/boost/geometry/geometries/ring.hpp @@ -27,12 +27,10 @@ #include -#ifdef BOOST_GEOMETRY_EXPERIMENTAL_ENABLE_INITIALIZER_LIST #include #ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST #include #endif -#endif namespace boost { namespace geometry { @@ -80,7 +78,6 @@ public : : base_type(begin, end) {} -#ifdef BOOST_GEOMETRY_EXPERIMENTAL_ENABLE_INITIALIZER_LIST #ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST /// \constructor_initializer_list{ring} @@ -101,7 +98,6 @@ public : // } //#endif -#endif #endif }; From c086babbd431bc52bc48afb7db2449181c7b45f7 Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Thu, 9 Apr 2015 16:16:29 +0200 Subject: [PATCH 09/89] [test][geometries] Remove unneeded define enabling experimental support for std::initializer_list. --- test/geometries/Jamfile.v2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/geometries/Jamfile.v2 b/test/geometries/Jamfile.v2 index c09ff95ad..9999c7280 100644 --- a/test/geometries/Jamfile.v2 +++ b/test/geometries/Jamfile.v2 @@ -25,6 +25,6 @@ test-suite boost-geometry-geometries # custom_linestring_test_fail_clear #] [ run custom_linestring.cpp ] - [ run geometries.cpp : : : BOOST_GEOMETRY_EXPERIMENTAL_ENABLE_INITIALIZER_LIST ] + [ run geometries.cpp ] [ run segment.cpp ] ; From aa58f4a0228aa6bd415ed672a63214026872b6af Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Thu, 9 Apr 2015 16:25:59 +0200 Subject: [PATCH 10/89] [geometries][doc] Improve the description of constructors of non-complex geometries. Add missing descriptions. Unify the non-initializing default constructors descriptions. --- doc/doxy/Doxyfile | 1 + include/boost/geometry/geometries/box.hpp | 1 + include/boost/geometry/geometries/point.hpp | 2 +- include/boost/geometry/geometries/point_xy.hpp | 2 +- include/boost/geometry/geometries/segment.hpp | 7 +++++++ 5 files changed, 11 insertions(+), 2 deletions(-) diff --git a/doc/doxy/Doxyfile b/doc/doxy/Doxyfile index 92098767d..3aa8b86f4 100644 --- a/doc/doxy/Doxyfile +++ b/doc/doxy/Doxyfile @@ -89,6 +89,7 @@ ALIASES = qbk{1}="\xmlonly \1 \endxmlonly" \ param_x="First coordinate (usually x-coordinate)" \ param_y="Second coordinate (usually y-coordinate)" \ param_z="Third coordinate (usually z-coordinate)" \ + constructor_default_no_init="Default constructor, no initialization" \ constructor_default{1}="Default constructor, creating an empty \1" \ constructor_begin_end{1}="Constructor with begin and end, filling the \1" \ constructor_initializer_list{1}="Constructor taking std::initializer_list, filling the \1" \ diff --git a/include/boost/geometry/geometries/box.hpp b/include/boost/geometry/geometries/box.hpp index a2e3d4fd7..6c69f16d4 100644 --- a/include/boost/geometry/geometries/box.hpp +++ b/include/boost/geometry/geometries/box.hpp @@ -50,6 +50,7 @@ class box public: + /// \constructor_default_no_init inline box() {} /*! diff --git a/include/boost/geometry/geometries/point.hpp b/include/boost/geometry/geometries/point.hpp index 056c7d5d0..56046225f 100644 --- a/include/boost/geometry/geometries/point.hpp +++ b/include/boost/geometry/geometries/point.hpp @@ -108,7 +108,7 @@ private: public: - /// @brief Default constructor, no initialization + /// \constructor_default_no_init inline point() { BOOST_STATIC_ASSERT(DimensionCount >= 1); diff --git a/include/boost/geometry/geometries/point_xy.hpp b/include/boost/geometry/geometries/point_xy.hpp index 652930666..0957c282d 100644 --- a/include/boost/geometry/geometries/point_xy.hpp +++ b/include/boost/geometry/geometries/point_xy.hpp @@ -45,7 +45,7 @@ class point_xy : public model::point { public: - /// Default constructor, does not initialize anything + /// \constructor_default_no_init inline point_xy() : model::point() {} diff --git a/include/boost/geometry/geometries/segment.hpp b/include/boost/geometry/geometries/segment.hpp index 3f47f79ec..54e084eda 100644 --- a/include/boost/geometry/geometries/segment.hpp +++ b/include/boost/geometry/geometries/segment.hpp @@ -40,9 +40,13 @@ template class segment : public std::pair { public : + /// \constructor_default_no_init inline segment() {} + /*! + \brief Constructor taking the first and the second point + */ inline segment(Point const& p1, Point const& p2) { this->first = p1; @@ -83,6 +87,9 @@ public: point_type& first; point_type& second; + /*! + \brief Constructor taking the first and the second point + */ inline referring_segment(point_type& p1, point_type& p2) : first(p1) , second(p2) From bbb69c92f7c21940f5a17d96029d70f21a144da7 Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Thu, 9 Apr 2015 16:48:17 +0200 Subject: [PATCH 11/89] [geometries] Small compile-time check consistency improvement. Add Point concept check to segment. Move DimensionCount check from constructor to the body of a point class and use MPL_ASSERT_MSG instead of STATIC_ASSERT. --- include/boost/geometry/geometries/point.hpp | 11 ++++++----- include/boost/geometry/geometries/segment.hpp | 2 ++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/include/boost/geometry/geometries/point.hpp b/include/boost/geometry/geometries/point.hpp index 56046225f..fb9ccf3a8 100644 --- a/include/boost/geometry/geometries/point.hpp +++ b/include/boost/geometry/geometries/point.hpp @@ -22,8 +22,8 @@ #include +#include #include -#include #include #include @@ -100,7 +100,10 @@ template > class point { -private: + BOOST_MPL_ASSERT_MSG((DimensionCount >= 1), + DIMENSION_GREATER_THAN_ZERO_EXPECTED, + (boost::mpl::int_)); + // The following enum is used to fully instantiate the // CoordinateSystem class and check the correctness of the units // passed for non-Cartesian coordinate systems. @@ -110,9 +113,7 @@ public: /// \constructor_default_no_init inline point() - { - BOOST_STATIC_ASSERT(DimensionCount >= 1); - } + {} /// @brief Constructor to set one value explicit inline point(CoordinateType const& v0) diff --git a/include/boost/geometry/geometries/segment.hpp b/include/boost/geometry/geometries/segment.hpp index 54e084eda..e93d59456 100644 --- a/include/boost/geometry/geometries/segment.hpp +++ b/include/boost/geometry/geometries/segment.hpp @@ -39,6 +39,8 @@ namespace model template class segment : public std::pair { + BOOST_CONCEPT_ASSERT( (concept::Point) ); + public : /// \constructor_default_no_init inline segment() From 80fe5418151baff22f1f8e064820c8e1b49e4c88 Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Thu, 9 Apr 2015 17:02:29 +0200 Subject: [PATCH 12/89] [geometries] Make the default ctor of non-complex geometries default function if possible. --- include/boost/geometry/geometries/box.hpp | 9 ++++++++- include/boost/geometry/geometries/point.hpp | 6 ++++++ include/boost/geometry/geometries/point_xy.hpp | 7 ++++++- include/boost/geometry/geometries/segment.hpp | 6 ++++++ 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/include/boost/geometry/geometries/box.hpp b/include/boost/geometry/geometries/box.hpp index 6c69f16d4..04ee6a435 100644 --- a/include/boost/geometry/geometries/box.hpp +++ b/include/boost/geometry/geometries/box.hpp @@ -17,6 +17,7 @@ #include #include +#include #include #include @@ -50,8 +51,14 @@ class box public: +#ifndef BOOST_NO_CXX11_DEFAULTED_FUNCTIONS /// \constructor_default_no_init - inline box() {} + box() = default; +#else + /// \constructor_default_no_init + inline box() + {} +#endif /*! \brief Constructor taking the minimum corner point and the maximum corner point diff --git a/include/boost/geometry/geometries/point.hpp b/include/boost/geometry/geometries/point.hpp index fb9ccf3a8..44ebfd988 100644 --- a/include/boost/geometry/geometries/point.hpp +++ b/include/boost/geometry/geometries/point.hpp @@ -22,6 +22,7 @@ #include +#include #include #include @@ -111,9 +112,14 @@ class point public: +#ifndef BOOST_NO_CXX11_DEFAULTED_FUNCTIONS + /// \constructor_default_no_init + point() = default; +#else /// \constructor_default_no_init inline point() {} +#endif /// @brief Constructor to set one value explicit inline point(CoordinateType const& v0) diff --git a/include/boost/geometry/geometries/point_xy.hpp b/include/boost/geometry/geometries/point_xy.hpp index 0957c282d..dabb70b65 100644 --- a/include/boost/geometry/geometries/point_xy.hpp +++ b/include/boost/geometry/geometries/point_xy.hpp @@ -16,6 +16,7 @@ #include +#include #include #include @@ -45,10 +46,14 @@ class point_xy : public model::point { public: +#ifndef BOOST_NO_CXX11_DEFAULTED_FUNCTIONS + /// \constructor_default_no_init + point_xy() = default; +#else /// \constructor_default_no_init inline point_xy() - : model::point() {} +#endif /// Constructor with x/y values inline point_xy(CoordinateType const& x, CoordinateType const& y) diff --git a/include/boost/geometry/geometries/segment.hpp b/include/boost/geometry/geometries/segment.hpp index e93d59456..eb3ce936e 100644 --- a/include/boost/geometry/geometries/segment.hpp +++ b/include/boost/geometry/geometries/segment.hpp @@ -42,9 +42,15 @@ class segment : public std::pair BOOST_CONCEPT_ASSERT( (concept::Point) ); public : + +#ifndef BOOST_NO_CXX11_DEFAULTED_FUNCTIONS + /// \constructor_default_no_init + segment() = default; +#else /// \constructor_default_no_init inline segment() {} +#endif /*! \brief Constructor taking the first and the second point From 55fd4261f595bdb8e35654c9bdf2feca938eef9a Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Thu, 9 Apr 2015 17:50:53 +0200 Subject: [PATCH 13/89] [doc][geometries] Simplify the point example (mention only bg::get<> and bg::set<>). --- doc/src/examples/geometries/point.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/src/examples/geometries/point.cpp b/doc/src/examples/geometries/point.cpp index 82774cd83..1e675e197 100644 --- a/doc/src/examples/geometries/point.cpp +++ b/doc/src/examples/geometries/point.cpp @@ -19,11 +19,12 @@ int main() { bg::model::point point1; bg::model::point point2(1.0, 2.0, 3.0); /*< Construct, assigning three coordinates >*/ - point1.set<0>(1.0); /*< Set a coordinate. [*Note]: prefer using `bg::set<0>(point1, 1.0);` >*/ - point1.set<1>(2.0); - double x = point1.get<0>(); /*< Get a coordinate. [*Note]: prefer using `x = bg::get<0>(point1);` >*/ - double y = point1.get<1>(); + bg::set<0>(point1, 1.0); /*< Set a coordinate. >*/ + bg::set<1>(point1, 2.0); + + double x = bg::get<0>(point1); /*< Get a coordinate. >*/ + double y = bg::get<1>(point1); std::cout << x << ", " << y << std::endl; return 0; From c8d97f052881c58223aca856286b20636934d011 Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Thu, 9 Apr 2015 21:48:06 +0200 Subject: [PATCH 14/89] [doc][geometries] Add example for model::box. --- doc/imports.qbk | 2 + doc/reference/geometries/box.qbk | 16 +++++++ doc/src/examples/geometries/Jamfile.v2 | 1 + doc/src/examples/geometries/box.cpp | 55 +++++++++++++++++++++++ include/boost/geometry/geometries/box.hpp | 25 ++++++----- 5 files changed, 88 insertions(+), 11 deletions(-) create mode 100644 doc/reference/geometries/box.qbk create mode 100644 doc/src/examples/geometries/box.cpp diff --git a/doc/imports.qbk b/doc/imports.qbk index eb49aef9c..dd240c2ba 100644 --- a/doc/imports.qbk +++ b/doc/imports.qbk @@ -83,6 +83,8 @@ [import src/examples/core/tag_cast.cpp] [import src/examples/geometries/point.cpp] +[import src/examples/geometries/box.cpp] + [import src/examples/geometries/adapted/c_array.cpp] [import src/examples/geometries/adapted/boost_array.cpp] [import src/examples/geometries/adapted/boost_fusion.cpp] diff --git a/doc/reference/geometries/box.qbk b/doc/reference/geometries/box.qbk new file mode 100644 index 000000000..100db1387 --- /dev/null +++ b/doc/reference/geometries/box.qbk @@ -0,0 +1,16 @@ +[/============================================================================ + Boost.Geometry (aka GGL, Generic Geometry Library) + + Copyright (c) 2009-2012 Barend Gehrels, Amsterdam, the Netherlands. + Copyright (c) 2009-2012 Mateusz Loskot, London, UK. + Copyright (c) 2009-2012 Bruno Lalande, Paris, France. + Copyright (c) 2015 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 + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================/] + +[heading Examples] +[box] +[box_output] diff --git a/doc/src/examples/geometries/Jamfile.v2 b/doc/src/examples/geometries/Jamfile.v2 index 68a99b57a..6f6af323c 100644 --- a/doc/src/examples/geometries/Jamfile.v2 +++ b/doc/src/examples/geometries/Jamfile.v2 @@ -14,6 +14,7 @@ project boost-geometry-doc-src-example-geometries ; exe point : point.cpp ; +exe box : box.cpp ; build-project adapted ; build-project register ; diff --git a/doc/src/examples/geometries/box.cpp b/doc/src/examples/geometries/box.cpp new file mode 100644 index 000000000..2ac6a7cbf --- /dev/null +++ b/doc/src/examples/geometries/box.cpp @@ -0,0 +1,55 @@ +// Boost.Geometry +// QuickBook Example + +// Copyright (c) 2011-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2015 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 +// http://www.boost.org/LICENSE_1_0.txt) + +//[box +//` Declaration and use of the Boost.Geometry model::box, modelling the Box Concept + +#include +#include + +namespace bg = boost::geometry; + +int main() +{ + typedef bg::model::point point_t; + typedef bg::model::box box_t; + + box_t box1; /*< Default-construct a box >*/ + box_t box2(point_t(0.0, 0.0), point_t(5.0, 5.0)); /*< Construct, assigning min and max corner point >*/ +#ifndef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX + box_t box3{{0.0, 0.0}, {5.0, 5.0}}; /*< Construct, using C++11 unified initialization syntax >*/ +#endif + + bg::set(box1, 1.0); /*< Set a coordinate, generic. >*/ + bg::set(box1, 2.0); + box1.max_corner().set<0>(3.0); /*< Set a coordinate, class-specific ([*Note]: prefer `bg::set();`). >*/ + box1.max_corner().set<1>(4.0); + + double x0 = bg::get(box1); /*< Get a coordinate. >*/ + double y0 = bg::get(box1); + double x1 = box1.max_corner().get<0>(); /*< Get a coordinate, class-specific ([*Note]: prefer `bg::get();`). >*/ + double y1 = box1.max_corner().get<1>(); + + std::cout << x0 << ", " << y0 << ", " << x1 << ", " << y1 << std::endl; + + return 0; +} + +//] + + +//[box_output +/*` +Output: +[pre +1, 2, 3, 4 +] +*/ +//] diff --git a/include/boost/geometry/geometries/box.hpp b/include/boost/geometry/geometries/box.hpp index 04ee6a435..99c6b76e0 100644 --- a/include/boost/geometry/geometries/box.hpp +++ b/include/boost/geometry/geometries/box.hpp @@ -30,18 +30,21 @@ namespace boost { namespace geometry namespace model { - /*! - \brief Class box: defines a box made of two describing points - \ingroup geometries - \details Box is always described by a min_corner() and a max_corner() point. If another - rectangle is used, use linear_ring or polygon. - \note Boxes are for selections and for calculating the envelope of geometries. Not all algorithms - are implemented for box. Boxes are also used in Spatial Indexes. - \tparam Point point type. The box takes a point type as template parameter. - The point type can be any point type. - It can be 2D but can also be 3D or more dimensional. - The box can also take a latlong point type as template parameter. +\brief Class box: defines a box made of two describing points +\ingroup geometries +\details Box is always described by a min_corner() and a max_corner() point. If another + rectangle is used, use linear_ring or polygon. +\note Boxes are for selections and for calculating the envelope of geometries. Not all algorithms +are implemented for box. Boxes are also used in Spatial Indexes. +\tparam Point point type. The box takes a point type as template parameter. +The point type can be any point type. +It can be 2D but can also be 3D or more dimensional. +The box can also take a latlong point type as template parameter. + +\qbk{[include reference/geometries/box.qbk]} +\qbk{before.synopsis, [heading Model of]} +\qbk{before.synopsis, [link geometry.reference.concepts.concept_box Box Concept]} */ template From 877c6686a1c9cd5206ef386c5d95baf72f3cf88c Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Thu, 9 Apr 2015 21:49:14 +0200 Subject: [PATCH 15/89] [doc][geometries] Restore the example for class-specific get/set of model::point. --- doc/src/examples/geometries/point.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/src/examples/geometries/point.cpp b/doc/src/examples/geometries/point.cpp index 1e675e197..0d6ebd67c 100644 --- a/doc/src/examples/geometries/point.cpp +++ b/doc/src/examples/geometries/point.cpp @@ -20,11 +20,11 @@ int main() bg::model::point point1; bg::model::point point2(1.0, 2.0, 3.0); /*< Construct, assigning three coordinates >*/ - bg::set<0>(point1, 1.0); /*< Set a coordinate. >*/ - bg::set<1>(point1, 2.0); + bg::set<0>(point1, 1.0); /*< Set a coordinate, generic. >*/ + point1.set<1>(2.0); /*< Set a coordinate, class-specific ([*Note]: prefer `bg::set();`). >*/ - double x = bg::get<0>(point1); /*< Get a coordinate. >*/ - double y = bg::get<1>(point1); + double x = bg::get<0>(point1); /*< Get a coordinate, generic. >*/ + double y = point1.get<1>(); /*< Get a coordinate, class-specific ([*Note]: prefer `bg::get();`). >*/ std::cout << x << ", " << y << std::endl; return 0; From 716e6e656a84224d729d1a836b6cd52d1be587e8 Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Thu, 9 Apr 2015 23:38:31 +0200 Subject: [PATCH 16/89] [doc][geometries] Add examples (cpp and qbk files) for all models. --- doc/imports.qbk | 9 ++- doc/reference/geometries/linestring.qbk | 16 +++++ doc/reference/geometries/multi_linestring.qbk | 16 +++++ doc/reference/geometries/multi_point.qbk | 16 +++++ doc/reference/geometries/multi_polygon.qbk | 16 +++++ doc/reference/geometries/point_xy.qbk | 18 +++++ doc/reference/geometries/polygon.qbk | 16 +++++ doc/reference/geometries/ring.qbk | 16 +++++ doc/reference/geometries/segment.qbk | 16 +++++ doc/src/examples/geometries/Jamfile.v2 | 10 ++- doc/src/examples/geometries/box.cpp | 16 ++--- doc/src/examples/geometries/linestring.cpp | 51 +++++++++++++ .../examples/geometries/multi_linestring.cpp | 58 +++++++++++++++ doc/src/examples/geometries/multi_point.cpp | 51 +++++++++++++ doc/src/examples/geometries/multi_polygon.cpp | 71 +++++++++++++++++++ doc/src/examples/geometries/point_xy.cpp | 44 ++++++++++++ doc/src/examples/geometries/polygon.cpp | 61 ++++++++++++++++ doc/src/examples/geometries/ring.cpp | 53 ++++++++++++++ doc/src/examples/geometries/segment.cpp | 56 +++++++++++++++ 19 files changed, 600 insertions(+), 10 deletions(-) create mode 100644 doc/reference/geometries/linestring.qbk create mode 100644 doc/reference/geometries/multi_linestring.qbk create mode 100644 doc/reference/geometries/multi_point.qbk create mode 100644 doc/reference/geometries/multi_polygon.qbk create mode 100644 doc/reference/geometries/point_xy.qbk create mode 100644 doc/reference/geometries/polygon.qbk create mode 100644 doc/reference/geometries/ring.qbk create mode 100644 doc/reference/geometries/segment.qbk create mode 100644 doc/src/examples/geometries/linestring.cpp create mode 100644 doc/src/examples/geometries/multi_linestring.cpp create mode 100644 doc/src/examples/geometries/multi_point.cpp create mode 100644 doc/src/examples/geometries/multi_polygon.cpp create mode 100644 doc/src/examples/geometries/point_xy.cpp create mode 100644 doc/src/examples/geometries/polygon.cpp create mode 100644 doc/src/examples/geometries/ring.cpp create mode 100644 doc/src/examples/geometries/segment.cpp diff --git a/doc/imports.qbk b/doc/imports.qbk index dd240c2ba..e7b05e791 100644 --- a/doc/imports.qbk +++ b/doc/imports.qbk @@ -82,8 +82,15 @@ [import src/examples/core/tag.cpp] [import src/examples/core/tag_cast.cpp] -[import src/examples/geometries/point.cpp] [import src/examples/geometries/box.cpp] +[import src/examples/geometries/linestring.cpp] +[import src/examples/geometries/multi_linestring.cpp] +[import src/examples/geometries/multi_point.cpp] +[import src/examples/geometries/multi_polygon.cpp] +[import src/examples/geometries/point.cpp] +[import src/examples/geometries/polygon.cpp] +[import src/examples/geometries/ring.cpp] +[import src/examples/geometries/segment.cpp] [import src/examples/geometries/adapted/c_array.cpp] [import src/examples/geometries/adapted/boost_array.cpp] diff --git a/doc/reference/geometries/linestring.qbk b/doc/reference/geometries/linestring.qbk new file mode 100644 index 000000000..b22e8d2ea --- /dev/null +++ b/doc/reference/geometries/linestring.qbk @@ -0,0 +1,16 @@ +[/============================================================================ + Boost.Geometry (aka GGL, Generic Geometry Library) + + Copyright (c) 2009-2012 Barend Gehrels, Amsterdam, the Netherlands. + Copyright (c) 2009-2012 Mateusz Loskot, London, UK. + Copyright (c) 2009-2012 Bruno Lalande, Paris, France. + Copyright (c) 2015 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 + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================/] + +[heading Examples] +[linestring] +[linestring_output] diff --git a/doc/reference/geometries/multi_linestring.qbk b/doc/reference/geometries/multi_linestring.qbk new file mode 100644 index 000000000..b2ee9b155 --- /dev/null +++ b/doc/reference/geometries/multi_linestring.qbk @@ -0,0 +1,16 @@ +[/============================================================================ + Boost.Geometry (aka GGL, Generic Geometry Library) + + Copyright (c) 2009-2012 Barend Gehrels, Amsterdam, the Netherlands. + Copyright (c) 2009-2012 Mateusz Loskot, London, UK. + Copyright (c) 2009-2012 Bruno Lalande, Paris, France. + Copyright (c) 2015 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 + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================/] + +[heading Examples] +[multi_linestring] +[multi_linestring_output] diff --git a/doc/reference/geometries/multi_point.qbk b/doc/reference/geometries/multi_point.qbk new file mode 100644 index 000000000..342242f86 --- /dev/null +++ b/doc/reference/geometries/multi_point.qbk @@ -0,0 +1,16 @@ +[/============================================================================ + Boost.Geometry (aka GGL, Generic Geometry Library) + + Copyright (c) 2009-2012 Barend Gehrels, Amsterdam, the Netherlands. + Copyright (c) 2009-2012 Mateusz Loskot, London, UK. + Copyright (c) 2009-2012 Bruno Lalande, Paris, France. + Copyright (c) 2015 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 + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================/] + +[heading Examples] +[multi_point] +[multi_point_output] diff --git a/doc/reference/geometries/multi_polygon.qbk b/doc/reference/geometries/multi_polygon.qbk new file mode 100644 index 000000000..1397dba17 --- /dev/null +++ b/doc/reference/geometries/multi_polygon.qbk @@ -0,0 +1,16 @@ +[/============================================================================ + Boost.Geometry (aka GGL, Generic Geometry Library) + + Copyright (c) 2009-2012 Barend Gehrels, Amsterdam, the Netherlands. + Copyright (c) 2009-2012 Mateusz Loskot, London, UK. + Copyright (c) 2009-2012 Bruno Lalande, Paris, France. + Copyright (c) 2015 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 + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================/] + +[heading Examples] +[multi_polygon] +[multi_polygon_output] diff --git a/doc/reference/geometries/point_xy.qbk b/doc/reference/geometries/point_xy.qbk new file mode 100644 index 000000000..ead56d36f --- /dev/null +++ b/doc/reference/geometries/point_xy.qbk @@ -0,0 +1,18 @@ +[/============================================================================ + Boost.Geometry (aka GGL, Generic Geometry Library) + + Copyright (c) 2009-2012 Barend Gehrels, Amsterdam, the Netherlands. + Copyright (c) 2009-2012 Mateusz Loskot, London, UK. + Copyright (c) 2009-2012 Bruno Lalande, Paris, France. + + Use, modification and distribution is subject to the Boost Software License, + Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================/] + +[heading Examples] +[point_xy] +[point_xy_output] + +[include reference/geometries/point_assign_warning.qbk] + diff --git a/doc/reference/geometries/polygon.qbk b/doc/reference/geometries/polygon.qbk new file mode 100644 index 000000000..7b6909088 --- /dev/null +++ b/doc/reference/geometries/polygon.qbk @@ -0,0 +1,16 @@ +[/============================================================================ + Boost.Geometry (aka GGL, Generic Geometry Library) + + Copyright (c) 2009-2012 Barend Gehrels, Amsterdam, the Netherlands. + Copyright (c) 2009-2012 Mateusz Loskot, London, UK. + Copyright (c) 2009-2012 Bruno Lalande, Paris, France. + Copyright (c) 2015 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 + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================/] + +[heading Examples] +[polygon] +[polygon_output] diff --git a/doc/reference/geometries/ring.qbk b/doc/reference/geometries/ring.qbk new file mode 100644 index 000000000..746466a44 --- /dev/null +++ b/doc/reference/geometries/ring.qbk @@ -0,0 +1,16 @@ +[/============================================================================ + Boost.Geometry (aka GGL, Generic Geometry Library) + + Copyright (c) 2009-2012 Barend Gehrels, Amsterdam, the Netherlands. + Copyright (c) 2009-2012 Mateusz Loskot, London, UK. + Copyright (c) 2009-2012 Bruno Lalande, Paris, France. + Copyright (c) 2015 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 + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================/] + +[heading Examples] +[ring] +[ring_output] diff --git a/doc/reference/geometries/segment.qbk b/doc/reference/geometries/segment.qbk new file mode 100644 index 000000000..1336dcaac --- /dev/null +++ b/doc/reference/geometries/segment.qbk @@ -0,0 +1,16 @@ +[/============================================================================ + Boost.Geometry (aka GGL, Generic Geometry Library) + + Copyright (c) 2009-2012 Barend Gehrels, Amsterdam, the Netherlands. + Copyright (c) 2009-2012 Mateusz Loskot, London, UK. + Copyright (c) 2009-2012 Bruno Lalande, Paris, France. + Copyright (c) 2015 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 + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================/] + +[heading Examples] +[segment] +[segment_output] diff --git a/doc/src/examples/geometries/Jamfile.v2 b/doc/src/examples/geometries/Jamfile.v2 index 6f6af323c..cd0e71e6d 100644 --- a/doc/src/examples/geometries/Jamfile.v2 +++ b/doc/src/examples/geometries/Jamfile.v2 @@ -13,8 +13,16 @@ project boost-geometry-doc-src-example-geometries : # requirements ; -exe point : point.cpp ; exe box : box.cpp ; +exe linestring : linestring.cpp ; +exe point : point.cpp ; +exe point_xy : point_xy.cpp ; +exe polygon : polygon.cpp ; +exe multi_linestring : multi_linestring.cpp ; +exe multi_point : multi_point.cpp ; +exe multi_polygon : multi_polygon.cpp ; +exe ring : ring.cpp ; +exe segment : segment.cpp ; build-project adapted ; build-project register ; diff --git a/doc/src/examples/geometries/box.cpp b/doc/src/examples/geometries/box.cpp index 2ac6a7cbf..8ec272cf7 100644 --- a/doc/src/examples/geometries/box.cpp +++ b/doc/src/examples/geometries/box.cpp @@ -21,10 +21,10 @@ int main() typedef bg::model::point point_t; typedef bg::model::box box_t; - box_t box1; /*< Default-construct a box >*/ - box_t box2(point_t(0.0, 0.0), point_t(5.0, 5.0)); /*< Construct, assigning min and max corner point >*/ + box_t box1; /*< Default-construct a box. >*/ + box_t box2(point_t(0.0, 0.0), point_t(5.0, 5.0)); /*< Construct, assigning min and max corner point. >*/ #ifndef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX - box_t box3{{0.0, 0.0}, {5.0, 5.0}}; /*< Construct, using C++11 unified initialization syntax >*/ + box_t box3{{0.0, 0.0}, {5.0, 5.0}}; /*< Construct, using C++11 unified initialization syntax. >*/ #endif bg::set(box1, 1.0); /*< Set a coordinate, generic. >*/ @@ -32,12 +32,12 @@ int main() box1.max_corner().set<0>(3.0); /*< Set a coordinate, class-specific ([*Note]: prefer `bg::set();`). >*/ box1.max_corner().set<1>(4.0); - double x0 = bg::get(box1); /*< Get a coordinate. >*/ - double y0 = bg::get(box1); - double x1 = box1.max_corner().get<0>(); /*< Get a coordinate, class-specific ([*Note]: prefer `bg::get();`). >*/ - double y1 = box1.max_corner().get<1>(); + double min_x = bg::get(box1); /*< Get a coordinate, generic. >*/ + double min_y = bg::get(box1); + double max_x = box1.max_corner().get<0>(); /*< Get a coordinate, class-specific ([*Note]: prefer `bg::get();`). >*/ + double max_y = box1.max_corner().get<1>(); - std::cout << x0 << ", " << y0 << ", " << x1 << ", " << y1 << std::endl; + std::cout << min_x << ", " << min_y << ", " << max_x << ", " << max_y << std::endl; return 0; } diff --git a/doc/src/examples/geometries/linestring.cpp b/doc/src/examples/geometries/linestring.cpp new file mode 100644 index 000000000..36f767c8f --- /dev/null +++ b/doc/src/examples/geometries/linestring.cpp @@ -0,0 +1,51 @@ +// Boost.Geometry +// QuickBook Example + +// Copyright (c) 2011-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2015 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 +// http://www.boost.org/LICENSE_1_0.txt) + +//[linestring +//` Declaration and use of the Boost.Geometry model::linestring, modelling the Linestring Concept + +#include +#include +#include + +namespace bg = boost::geometry; + +int main() +{ + typedef bg::model::point point_t; + typedef bg::model::linestring linestring_t; + + linestring_t ls1; /*< Default-construct a linestring. >*/ +#ifndef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX + linestring_t ls2{{0.0, 0.0}, {1.0, 0.0}, {1.0, 2.0}}; /*< Construct a linestring containing three points, using C++11 unified initialization syntax. >*/ +#endif + + bg::append(ls1, point_t(0.0, 0.0)); /*< Append point. >*/ + bg::append(ls1, point_t(1.0, 0.0)); + bg::append(ls1, point_t(1.0, 2.0)); + + double l = bg::length(ls1); + + std::cout << l << std::endl; + + return 0; +} + +//] + + +//[linestring_output +/*` +Output: +[pre +3 +] +*/ +//] diff --git a/doc/src/examples/geometries/multi_linestring.cpp b/doc/src/examples/geometries/multi_linestring.cpp new file mode 100644 index 000000000..af36df583 --- /dev/null +++ b/doc/src/examples/geometries/multi_linestring.cpp @@ -0,0 +1,58 @@ +// Boost.Geometry +// QuickBook Example + +// Copyright (c) 2011-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2015 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 +// http://www.boost.org/LICENSE_1_0.txt) + +//[multi_linestring +//` Declaration and use of the Boost.Geometry model::multi_linestring, modelling the MultiLinestring Concept + +#include +#include +#include + +namespace bg = boost::geometry; + +int main() +{ + typedef bg::model::point point_t; + typedef bg::model::linestring linestring_t; + typedef bg::model::multi_linestring mlinestring_t; + + mlinestring_t mls1; /*< Default-construct a multi_linestring. >*/ +#ifndef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX + mlinestring_t mls2{{{0.0, 0.0}, {0.0, 1.0}, {2.0, 1.0}}, + {{1.0, 0.0}, {2.0, 0.0}}}; /*< Construct a multi_linestring containing two linestrings, using C++11 unified initialization syntax. >*/ +#endif + + mls1.resize(2); /*< Resize a multi_linestring, store two linestrings. >*/ + + bg::append(mls1[0], point_t(0.0, 0.0)); /*< Append point to the first linestring. >*/ + bg::append(mls1[0], point_t(0.0, 1.0)); + bg::append(mls1[0], point_t(2.0, 1.0)); + + bg::append(mls1[1], point_t(1.0, 0.0)); /*< Append point to the second linestring. >*/ + bg::append(mls1[1], point_t(2.0, 0.0)); + + double l = bg::length(mls1); + + std::cout << l << std::endl; + + return 0; +} + +//] + + +//[multi_linestring_output +/*` +Output: +[pre +4 +] +*/ +//] diff --git a/doc/src/examples/geometries/multi_point.cpp b/doc/src/examples/geometries/multi_point.cpp new file mode 100644 index 000000000..209165874 --- /dev/null +++ b/doc/src/examples/geometries/multi_point.cpp @@ -0,0 +1,51 @@ +// Boost.Geometry +// QuickBook Example + +// Copyright (c) 2011-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2015 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 +// http://www.boost.org/LICENSE_1_0.txt) + +//[multi_point +//` Declaration and use of the Boost.Geometry model::multi_point, modelling the MultiPoint Concept + +#include +#include +#include + +namespace bg = boost::geometry; + +int main() +{ + typedef bg::model::point point_t; + typedef bg::model::multi_point mpoint_t; + + mpoint_t mpt1; /*< Default-construct a multi_point. >*/ +#ifndef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX + mpoint_t mpt2{{{0.0, 0.0}, {1.0, 1.0}, {2.0, 2.0}}}; /*< Construct a multi_point containing three points, using C++11 unified initialization syntax. >*/ +#endif + + bg::append(mpt1, point_t(0.0, 0.0)); /*< Append point to the multi_point. >*/ + bg::append(mpt1, point_t(1.0, 1.0)); + bg::append(mpt1, point_t(2.0, 2.0)); + + std::size_t count = bg::num_points(mpt1); + + std::cout << count << std::endl; + + return 0; +} + +//] + + +//[multi_point_output +/*` +Output: +[pre +3 +] +*/ +//] diff --git a/doc/src/examples/geometries/multi_polygon.cpp b/doc/src/examples/geometries/multi_polygon.cpp new file mode 100644 index 000000000..ac1c177f8 --- /dev/null +++ b/doc/src/examples/geometries/multi_polygon.cpp @@ -0,0 +1,71 @@ +// Boost.Geometry +// QuickBook Example + +// Copyright (c) 2011-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2015 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 +// http://www.boost.org/LICENSE_1_0.txt) + +//[multi_polygon +//` Declaration and use of the Boost.Geometry model::multi_polygon, modelling the MultiPolygon Concept + +#include +#include +#include + +namespace bg = boost::geometry; + +int main() +{ + typedef bg::model::point point_t; + typedef bg::model::polygon polygon_t; /*< Default parameters, clockwise, closed polygon. >*/ + typedef bg::model::multi_polygon mpolygon_t; /*< Clockwise, closed multi_polygon. >*/ + + mpolygon_t mpoly1; /*< Default-construct a multi_polygon. >*/ +#ifndef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX + mpolygon_t mpoly2{{{{0.0, 0.0}, {0.0, 5.0}, {5.0, 5.0}, {5.0, 0.0}, {0.0, 0.0}}, + {{1.0, 1.0}, {4.0, 1.0}, {4.0, 4.0}, {1.0, 4.0}, {1.0, 1.0}}}, + {{{5.0, 5.0}, {5.0, 6.0}, {6.0, 6.0}, {6.0, 5.0}, {5.0, 5.0}}}}; /*< Construct a multi_polygon containing two polygons, using C++11 unified initialization syntax. >*/ +#endif + + mpoly1.resize(2); /*< Resize a multi_polygon, store two polygons. >*/ + + bg::append(mpoly1[0].outer(), point_t(0.0, 0.0)); /*< Append point to the exterior ring of the first polygon. >*/ + bg::append(mpoly1[0].outer(), point_t(0.0, 5.0)); + bg::append(mpoly1[0].outer(), point_t(5.0, 5.0)); + bg::append(mpoly1[0].outer(), point_t(5.0, 0.0)); + bg::append(mpoly1[0].outer(), point_t(0.0, 0.0)); + + mpoly1[0].inners().resize(1); /*< Resize a container of interior rings of the first polygon. >*/ + bg::append(mpoly1[0].inners()[0], point_t(1.0, 1.0)); /*< Append point to the interior ring of the first polygon. >*/ + bg::append(mpoly1[0].inners()[0], point_t(4.0, 1.0)); + bg::append(mpoly1[0].inners()[0], point_t(4.0, 4.0)); + bg::append(mpoly1[0].inners()[0], point_t(1.0, 4.0)); + bg::append(mpoly1[0].inners()[0], point_t(1.0, 1.0)); + + bg::append(mpoly1[1].outer(), point_t(5.0, 5.0)); /*< Append point to the exterior ring of the second polygon. >*/ + bg::append(mpoly1[1].outer(), point_t(5.0, 6.0)); + bg::append(mpoly1[1].outer(), point_t(6.0, 6.0)); + bg::append(mpoly1[1].outer(), point_t(6.0, 5.0)); + bg::append(mpoly1[1].outer(), point_t(5.0, 5.0)); + + double a = bg::area(mpoly1); + + std::cout << a << std::endl; + + return 0; +} + +//] + + +//[multi_polygon_output +/*` +Output: +[pre +17 +] +*/ +//] diff --git a/doc/src/examples/geometries/point_xy.cpp b/doc/src/examples/geometries/point_xy.cpp new file mode 100644 index 000000000..a94965622 --- /dev/null +++ b/doc/src/examples/geometries/point_xy.cpp @@ -0,0 +1,44 @@ +// Boost.Geometry (aka GGL, Generic Geometry Library) +// QuickBook Example + +// Copyright (c) 2011-2012 Barend Gehrels, Amsterdam, the Netherlands. + +// Use, modification and distribution is subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +//[point_xy +//` Declaration and use of the Boost.Geometry model::d2::point_xy, modelling the Point Concept + +#include +#include +#include + +namespace bg = boost::geometry; + +int main() +{ + bg::model::d2::point_xy point1; + bg::model::d2::point_xy point2(1.0, 2.0); /*< Construct, assigning coordinates. >*/ + + bg::set<0>(point1, 1.0); /*< Set a coordinate, generic. >*/ + point1.y(2.0); /*< Set a coordinate, class-specific ([*Note]: prefer `bg::set();`). >*/ + + double x = bg::get<0>(point1); /*< Get a coordinate, generic. >*/ + double y = point1.y(); /*< Get a coordinate, class-specific ([*Note]: prefer `bg::get();`). >*/ + + std::cout << x << ", " << y << std::endl; + return 0; +} + +//] + + +//[point_xy_output +/*` +Output: +[pre +1, 2 +] +*/ +//] diff --git a/doc/src/examples/geometries/polygon.cpp b/doc/src/examples/geometries/polygon.cpp new file mode 100644 index 000000000..563f842ff --- /dev/null +++ b/doc/src/examples/geometries/polygon.cpp @@ -0,0 +1,61 @@ +// Boost.Geometry +// QuickBook Example + +// Copyright (c) 2011-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2015 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 +// http://www.boost.org/LICENSE_1_0.txt) + +//[polygon +//` Declaration and use of the Boost.Geometry model::polygon, modelling the Polygon Concept + +#include +#include +#include + +namespace bg = boost::geometry; + +int main() +{ + typedef bg::model::point point_t; + typedef bg::model::polygon polygon_t; /*< Default parameters, clockwise, closed polygon. >*/ + + polygon_t poly1; /*< Default-construct a polygon. >*/ +#ifndef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX + polygon_t polygon2{{{0.0, 0.0}, {0.0, 5.0}, {5.0, 5.0}, {5.0, 0.0}, {0.0, 0.0}}, + {{1.0, 1.0}, {4.0, 1.0}, {4.0, 4.0}, {1.0, 4.0}, {1.0, 1.0}}}; /*< Construct a polygon containing an exterior and interior ring, using C++11 unified initialization syntax. >*/ +#endif + + bg::append(poly1.outer(), point_t(0.0, 0.0)); /*< Append point to the exterior ring. >*/ + bg::append(poly1.outer(), point_t(0.0, 5.0)); + bg::append(poly1.outer(), point_t(5.0, 5.0)); + bg::append(poly1.outer(), point_t(5.0, 0.0)); + bg::append(poly1.outer(), point_t(0.0, 0.0)); + + poly1.inners().resize(1); /*< Resize a container of interior rings. >*/ + bg::append(poly1.inners()[0], point_t(1.0, 1.0)); /*< Append point to the interior ring. >*/ + bg::append(poly1.inners()[0], point_t(4.0, 1.0)); + bg::append(poly1.inners()[0], point_t(4.0, 4.0)); + bg::append(poly1.inners()[0], point_t(1.0, 4.0)); + bg::append(poly1.inners()[0], point_t(1.0, 1.0)); + + double a = bg::area(poly1); + + std::cout << a << std::endl; + + return 0; +} + +//] + + +//[polygon_output +/*` +Output: +[pre +16 +] +*/ +//] diff --git a/doc/src/examples/geometries/ring.cpp b/doc/src/examples/geometries/ring.cpp new file mode 100644 index 000000000..acad825fd --- /dev/null +++ b/doc/src/examples/geometries/ring.cpp @@ -0,0 +1,53 @@ +// Boost.Geometry +// QuickBook Example + +// Copyright (c) 2011-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2015 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 +// http://www.boost.org/LICENSE_1_0.txt) + +//[ring +//` Declaration and use of the Boost.Geometry model::ring, modelling the Ring Concept + +#include +#include +#include + +namespace bg = boost::geometry; + +int main() +{ + typedef bg::model::point point_t; + typedef bg::model::ring ring_t; /*< Default parameters, clockwise, closed ring. >*/ + + ring_t ring1; /*< Default-construct a ring. >*/ +#ifndef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX + ring_t ring2{{0.0, 0.0}, {0.0, 5.0}, {5.0, 5.0}, {5.0, 0.0}, {0.0, 0.0}}; /*< Construct a ring containing four points plus one closing point, using C++11 unified initialization syntax. >*/ +#endif + + bg::append(ring1, point_t(0.0, 0.0)); /*< Append point. >*/ + bg::append(ring1, point_t(0.0, 5.0)); + bg::append(ring1, point_t(5.0, 5.0)); + bg::append(ring1, point_t(5.0, 0.0)); + bg::append(ring1, point_t(0.0, 0.0)); + + double a = bg::area(ring1); + + std::cout << a << std::endl; + + return 0; +} + +//] + + +//[ring_output +/*` +Output: +[pre +25 +] +*/ +//] diff --git a/doc/src/examples/geometries/segment.cpp b/doc/src/examples/geometries/segment.cpp new file mode 100644 index 000000000..66eea43b5 --- /dev/null +++ b/doc/src/examples/geometries/segment.cpp @@ -0,0 +1,56 @@ +// Boost.Geometry +// QuickBook Example + +// Copyright (c) 2011-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2015 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 +// http://www.boost.org/LICENSE_1_0.txt) + +//[segment +//` Declaration and use of the Boost.Geometry model::segment, modelling the Segment Concept + +#include +#include +#include + +namespace bg = boost::geometry; + +int main() +{ + typedef bg::model::point point_t; + typedef bg::model::segment segment_t; + + segment_t seg1; /*< Default-construct a segment. >*/ + segment_t seg2(point_t(0.0, 0.0), point_t(5.0, 5.0)); /*< Construct, assigning the first and the second point. >*/ +#ifndef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX + segment_t seg3{{0.0, 0.0}, {5.0, 5.0}}; /*< Construct, using C++11 unified initialization syntax. >*/ +#endif + + bg::set<0, 0>(seg1, 1.0); /*< Set a coordinate. >*/ + bg::set<0, 1>(seg1, 2.0); + bg::set<1, 0>(seg1, 3.0); + bg::set<1, 1>(seg1, 4.0); + + double x0 = bg::get<0, 0>(seg1); /*< Get a coordinate. >*/ + double y0 = bg::get<0, 1>(seg1); + double x1 = bg::get<1, 0>(seg1); + double y1 = bg::get<1, 1>(seg1); + + std::cout << x0 << ", " << y0 << ", " << x1 << ", " << y1 << std::endl; + + return 0; +} + +//] + + +//[segment_output +/*` +Output: +[pre +1, 2, 3, 4 +] +*/ +//] From 34dba9be8542a5f0b33f1ff1f068c6f1a766017c Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Thu, 9 Apr 2015 23:39:58 +0200 Subject: [PATCH 17/89] [geometries][doc] Add examples to descriptions of all geometries models. --- include/boost/geometry/geometries/linestring.hpp | 1 + include/boost/geometry/geometries/multi_linestring.hpp | 1 + include/boost/geometry/geometries/multi_point.hpp | 2 ++ include/boost/geometry/geometries/multi_polygon.hpp | 1 + include/boost/geometry/geometries/point_xy.hpp | 1 + include/boost/geometry/geometries/polygon.hpp | 1 + include/boost/geometry/geometries/ring.hpp | 1 + include/boost/geometry/geometries/segment.hpp | 6 ++++++ 8 files changed, 14 insertions(+) diff --git a/include/boost/geometry/geometries/linestring.hpp b/include/boost/geometry/geometries/linestring.hpp index 481fda2f9..22c9c99de 100644 --- a/include/boost/geometry/geometries/linestring.hpp +++ b/include/boost/geometry/geometries/linestring.hpp @@ -44,6 +44,7 @@ namespace model \tparam Container \tparam_container \tparam Allocator \tparam_allocator +\qbk{[include reference/geometries/linestring.qbk]} \qbk{before.synopsis, [heading Model of] [link geometry.reference.concepts.concept_linestring Linestring Concept] diff --git a/include/boost/geometry/geometries/multi_linestring.hpp b/include/boost/geometry/geometries/multi_linestring.hpp index 829da9a22..cd08fdbe1 100644 --- a/include/boost/geometry/geometries/multi_linestring.hpp +++ b/include/boost/geometry/geometries/multi_linestring.hpp @@ -41,6 +41,7 @@ namespace model e.g. a highway (with interruptions) \ingroup geometries +\qbk{[include reference/geometries/multi_linestring.qbk]} \qbk{before.synopsis, [heading Model of] [link geometry.reference.concepts.concept_multi_linestring MultiLineString Concept] diff --git a/include/boost/geometry/geometries/multi_point.hpp b/include/boost/geometry/geometries/multi_point.hpp index 98cb283a1..ab4cd8817 100644 --- a/include/boost/geometry/geometries/multi_point.hpp +++ b/include/boost/geometry/geometries/multi_point.hpp @@ -43,6 +43,8 @@ namespace model \tparam Allocator \tparam_allocator \details Multipoint can be used to group points belonging to each other, e.g. a constellation, or the result set of an intersection + +\qbk{[include reference/geometries/multi_point.qbk]} \qbk{before.synopsis, [heading Model of] [link geometry.reference.concepts.concept_multi_point MultiPoint Concept] diff --git a/include/boost/geometry/geometries/multi_polygon.hpp b/include/boost/geometry/geometries/multi_polygon.hpp index 10b1ac6a1..9db74b4ec 100644 --- a/include/boost/geometry/geometries/multi_polygon.hpp +++ b/include/boost/geometry/geometries/multi_polygon.hpp @@ -40,6 +40,7 @@ namespace model e.g. Hawaii \ingroup geometries +\qbk{[include reference/geometries/multi_polygon.qbk]} \qbk{before.synopsis, [heading Model of] [link geometry.reference.concepts.concept_multi_polygon MultiPolygon Concept] diff --git a/include/boost/geometry/geometries/point_xy.hpp b/include/boost/geometry/geometries/point_xy.hpp index dabb70b65..bbc35d5ce 100644 --- a/include/boost/geometry/geometries/point_xy.hpp +++ b/include/boost/geometry/geometries/point_xy.hpp @@ -33,6 +33,7 @@ namespace model { namespace d2 \tparam CoordinateType numeric type, for example, double, float, int \tparam CoordinateSystem coordinate system, defaults to cs::cartesian +\qbk{[include reference/geometries/point_xy.qbk]} \qbk{before.synopsis, [heading Model of] [link geometry.reference.concepts.concept_point Point Concept] diff --git a/include/boost/geometry/geometries/polygon.hpp b/include/boost/geometry/geometries/polygon.hpp index 25b21d98f..5e6064e89 100644 --- a/include/boost/geometry/geometries/polygon.hpp +++ b/include/boost/geometry/geometries/polygon.hpp @@ -55,6 +55,7 @@ namespace model \note The container collecting the points in the rings can be different from the container collecting the inner rings. They all default to vector. +\qbk{[include reference/geometries/polygon.qbk]} \qbk{before.synopsis, [heading Model of] [link geometry.reference.concepts.concept_polygon Polygon Concept] diff --git a/include/boost/geometry/geometries/ring.hpp b/include/boost/geometry/geometries/ring.hpp index a496480b9..01bcf58cf 100644 --- a/include/boost/geometry/geometries/ring.hpp +++ b/include/boost/geometry/geometries/ring.hpp @@ -48,6 +48,7 @@ namespace model \tparam Container container type, for example std::vector, std::deque \tparam Allocator container-allocator-type +\qbk{[include reference/geometries/ring.qbk]} \qbk{before.synopsis, [heading Model of] [link geometry.reference.concepts.concept_ring Ring Concept] diff --git a/include/boost/geometry/geometries/segment.hpp b/include/boost/geometry/geometries/segment.hpp index eb3ce936e..af406aa09 100644 --- a/include/boost/geometry/geometries/segment.hpp +++ b/include/boost/geometry/geometries/segment.hpp @@ -35,6 +35,12 @@ namespace model by two distinct end points, and contains every point on the line between its end points. \note There is also a point-referring-segment, class referring_segment, containing point references, where points are NOT copied + +\qbk{[include reference/geometries/segment.qbk]} +\qbk{before.synopsis, +[heading Model of] +[link geometry.reference.concepts.concept_segment Segment Concept] +} */ template class segment : public std::pair From ff67f4a6d08f098cfbf24a9cc69b10ca1c9807a1 Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Fri, 10 Apr 2015 00:20:15 +0200 Subject: [PATCH 18/89] [doc][geometries] Small fixes in examples of models. Add mising #ifdef conditions enabling the example of std::initializer_list support. Remove unneeded semicolons from comments. Add missing QBK import (point_xy). --- doc/imports.qbk | 1 + doc/src/examples/geometries/box.cpp | 7 +++++-- doc/src/examples/geometries/linestring.cpp | 6 +++++- doc/src/examples/geometries/multi_linestring.cpp | 6 +++++- doc/src/examples/geometries/multi_point.cpp | 6 +++++- doc/src/examples/geometries/multi_polygon.cpp | 6 +++++- doc/src/examples/geometries/point.cpp | 4 ++-- doc/src/examples/geometries/point_xy.cpp | 4 ++-- doc/src/examples/geometries/polygon.cpp | 6 +++++- doc/src/examples/geometries/ring.cpp | 6 +++++- doc/src/examples/geometries/segment.cpp | 3 +++ 11 files changed, 43 insertions(+), 12 deletions(-) diff --git a/doc/imports.qbk b/doc/imports.qbk index e7b05e791..3625fc2e8 100644 --- a/doc/imports.qbk +++ b/doc/imports.qbk @@ -87,6 +87,7 @@ [import src/examples/geometries/multi_linestring.cpp] [import src/examples/geometries/multi_point.cpp] [import src/examples/geometries/multi_polygon.cpp] +[import src/examples/geometries/point_xy.cpp] [import src/examples/geometries/point.cpp] [import src/examples/geometries/polygon.cpp] [import src/examples/geometries/ring.cpp] diff --git a/doc/src/examples/geometries/box.cpp b/doc/src/examples/geometries/box.cpp index 8ec272cf7..0dfecc83d 100644 --- a/doc/src/examples/geometries/box.cpp +++ b/doc/src/examples/geometries/box.cpp @@ -23,18 +23,21 @@ int main() box_t box1; /*< Default-construct a box. >*/ box_t box2(point_t(0.0, 0.0), point_t(5.0, 5.0)); /*< Construct, assigning min and max corner point. >*/ + #ifndef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX + box_t box3{{0.0, 0.0}, {5.0, 5.0}}; /*< Construct, using C++11 unified initialization syntax. >*/ + #endif bg::set(box1, 1.0); /*< Set a coordinate, generic. >*/ bg::set(box1, 2.0); - box1.max_corner().set<0>(3.0); /*< Set a coordinate, class-specific ([*Note]: prefer `bg::set();`). >*/ + box1.max_corner().set<0>(3.0); /*< Set a coordinate, class-specific ([*Note]: prefer `bg::set()`). >*/ box1.max_corner().set<1>(4.0); double min_x = bg::get(box1); /*< Get a coordinate, generic. >*/ double min_y = bg::get(box1); - double max_x = box1.max_corner().get<0>(); /*< Get a coordinate, class-specific ([*Note]: prefer `bg::get();`). >*/ + double max_x = box1.max_corner().get<0>(); /*< Get a coordinate, class-specific ([*Note]: prefer `bg::get()`). >*/ double max_y = box1.max_corner().get<1>(); std::cout << min_x << ", " << min_y << ", " << max_x << ", " << max_y << std::endl; diff --git a/doc/src/examples/geometries/linestring.cpp b/doc/src/examples/geometries/linestring.cpp index 36f767c8f..b2ba1ae8b 100644 --- a/doc/src/examples/geometries/linestring.cpp +++ b/doc/src/examples/geometries/linestring.cpp @@ -23,8 +23,12 @@ int main() typedef bg::model::linestring linestring_t; linestring_t ls1; /*< Default-construct a linestring. >*/ -#ifndef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX + +#if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) \ + && !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) + linestring_t ls2{{0.0, 0.0}, {1.0, 0.0}, {1.0, 2.0}}; /*< Construct a linestring containing three points, using C++11 unified initialization syntax. >*/ + #endif bg::append(ls1, point_t(0.0, 0.0)); /*< Append point. >*/ diff --git a/doc/src/examples/geometries/multi_linestring.cpp b/doc/src/examples/geometries/multi_linestring.cpp index af36df583..b7a039cf9 100644 --- a/doc/src/examples/geometries/multi_linestring.cpp +++ b/doc/src/examples/geometries/multi_linestring.cpp @@ -24,9 +24,13 @@ int main() typedef bg::model::multi_linestring mlinestring_t; mlinestring_t mls1; /*< Default-construct a multi_linestring. >*/ -#ifndef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX + +#if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) \ + && !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) + mlinestring_t mls2{{{0.0, 0.0}, {0.0, 1.0}, {2.0, 1.0}}, {{1.0, 0.0}, {2.0, 0.0}}}; /*< Construct a multi_linestring containing two linestrings, using C++11 unified initialization syntax. >*/ + #endif mls1.resize(2); /*< Resize a multi_linestring, store two linestrings. >*/ diff --git a/doc/src/examples/geometries/multi_point.cpp b/doc/src/examples/geometries/multi_point.cpp index 209165874..89d63d737 100644 --- a/doc/src/examples/geometries/multi_point.cpp +++ b/doc/src/examples/geometries/multi_point.cpp @@ -23,8 +23,12 @@ int main() typedef bg::model::multi_point mpoint_t; mpoint_t mpt1; /*< Default-construct a multi_point. >*/ -#ifndef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX + +#if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) \ + && !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) + mpoint_t mpt2{{{0.0, 0.0}, {1.0, 1.0}, {2.0, 2.0}}}; /*< Construct a multi_point containing three points, using C++11 unified initialization syntax. >*/ + #endif bg::append(mpt1, point_t(0.0, 0.0)); /*< Append point to the multi_point. >*/ diff --git a/doc/src/examples/geometries/multi_polygon.cpp b/doc/src/examples/geometries/multi_polygon.cpp index ac1c177f8..d5414868f 100644 --- a/doc/src/examples/geometries/multi_polygon.cpp +++ b/doc/src/examples/geometries/multi_polygon.cpp @@ -24,10 +24,14 @@ int main() typedef bg::model::multi_polygon mpolygon_t; /*< Clockwise, closed multi_polygon. >*/ mpolygon_t mpoly1; /*< Default-construct a multi_polygon. >*/ -#ifndef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX + +#if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) \ + && !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) + mpolygon_t mpoly2{{{{0.0, 0.0}, {0.0, 5.0}, {5.0, 5.0}, {5.0, 0.0}, {0.0, 0.0}}, {{1.0, 1.0}, {4.0, 1.0}, {4.0, 4.0}, {1.0, 4.0}, {1.0, 1.0}}}, {{{5.0, 5.0}, {5.0, 6.0}, {6.0, 6.0}, {6.0, 5.0}, {5.0, 5.0}}}}; /*< Construct a multi_polygon containing two polygons, using C++11 unified initialization syntax. >*/ + #endif mpoly1.resize(2); /*< Resize a multi_polygon, store two polygons. >*/ diff --git a/doc/src/examples/geometries/point.cpp b/doc/src/examples/geometries/point.cpp index 0d6ebd67c..6373217c8 100644 --- a/doc/src/examples/geometries/point.cpp +++ b/doc/src/examples/geometries/point.cpp @@ -21,10 +21,10 @@ int main() bg::model::point point2(1.0, 2.0, 3.0); /*< Construct, assigning three coordinates >*/ bg::set<0>(point1, 1.0); /*< Set a coordinate, generic. >*/ - point1.set<1>(2.0); /*< Set a coordinate, class-specific ([*Note]: prefer `bg::set();`). >*/ + point1.set<1>(2.0); /*< Set a coordinate, class-specific ([*Note]: prefer `bg::set()`). >*/ double x = bg::get<0>(point1); /*< Get a coordinate, generic. >*/ - double y = point1.get<1>(); /*< Get a coordinate, class-specific ([*Note]: prefer `bg::get();`). >*/ + double y = point1.get<1>(); /*< Get a coordinate, class-specific ([*Note]: prefer `bg::get()`). >*/ std::cout << x << ", " << y << std::endl; return 0; diff --git a/doc/src/examples/geometries/point_xy.cpp b/doc/src/examples/geometries/point_xy.cpp index a94965622..96eedf82b 100644 --- a/doc/src/examples/geometries/point_xy.cpp +++ b/doc/src/examples/geometries/point_xy.cpp @@ -22,10 +22,10 @@ int main() bg::model::d2::point_xy point2(1.0, 2.0); /*< Construct, assigning coordinates. >*/ bg::set<0>(point1, 1.0); /*< Set a coordinate, generic. >*/ - point1.y(2.0); /*< Set a coordinate, class-specific ([*Note]: prefer `bg::set();`). >*/ + point1.y(2.0); /*< Set a coordinate, class-specific ([*Note]: prefer `bg::set()`). >*/ double x = bg::get<0>(point1); /*< Get a coordinate, generic. >*/ - double y = point1.y(); /*< Get a coordinate, class-specific ([*Note]: prefer `bg::get();`). >*/ + double y = point1.y(); /*< Get a coordinate, class-specific ([*Note]: prefer `bg::get()`). >*/ std::cout << x << ", " << y << std::endl; return 0; diff --git a/doc/src/examples/geometries/polygon.cpp b/doc/src/examples/geometries/polygon.cpp index 563f842ff..199a00824 100644 --- a/doc/src/examples/geometries/polygon.cpp +++ b/doc/src/examples/geometries/polygon.cpp @@ -23,9 +23,13 @@ int main() typedef bg::model::polygon polygon_t; /*< Default parameters, clockwise, closed polygon. >*/ polygon_t poly1; /*< Default-construct a polygon. >*/ -#ifndef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX + +#if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) \ + && !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) + polygon_t polygon2{{{0.0, 0.0}, {0.0, 5.0}, {5.0, 5.0}, {5.0, 0.0}, {0.0, 0.0}}, {{1.0, 1.0}, {4.0, 1.0}, {4.0, 4.0}, {1.0, 4.0}, {1.0, 1.0}}}; /*< Construct a polygon containing an exterior and interior ring, using C++11 unified initialization syntax. >*/ + #endif bg::append(poly1.outer(), point_t(0.0, 0.0)); /*< Append point to the exterior ring. >*/ diff --git a/doc/src/examples/geometries/ring.cpp b/doc/src/examples/geometries/ring.cpp index acad825fd..1818ee127 100644 --- a/doc/src/examples/geometries/ring.cpp +++ b/doc/src/examples/geometries/ring.cpp @@ -23,8 +23,12 @@ int main() typedef bg::model::ring ring_t; /*< Default parameters, clockwise, closed ring. >*/ ring_t ring1; /*< Default-construct a ring. >*/ -#ifndef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX + +#if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) \ + && !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) + ring_t ring2{{0.0, 0.0}, {0.0, 5.0}, {5.0, 5.0}, {5.0, 0.0}, {0.0, 0.0}}; /*< Construct a ring containing four points plus one closing point, using C++11 unified initialization syntax. >*/ + #endif bg::append(ring1, point_t(0.0, 0.0)); /*< Append point. >*/ diff --git a/doc/src/examples/geometries/segment.cpp b/doc/src/examples/geometries/segment.cpp index 66eea43b5..3cbb4453c 100644 --- a/doc/src/examples/geometries/segment.cpp +++ b/doc/src/examples/geometries/segment.cpp @@ -24,8 +24,11 @@ int main() segment_t seg1; /*< Default-construct a segment. >*/ segment_t seg2(point_t(0.0, 0.0), point_t(5.0, 5.0)); /*< Construct, assigning the first and the second point. >*/ + #ifndef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX + segment_t seg3{{0.0, 0.0}, {5.0, 5.0}}; /*< Construct, using C++11 unified initialization syntax. >*/ + #endif bg::set<0, 0>(seg1, 1.0); /*< Set a coordinate. >*/ From 50539f96b46f187d82e7d80110fce3caf261e8ae Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Sun, 12 Apr 2015 05:11:51 +0200 Subject: [PATCH 19/89] [doc] Update 1.59 release notes (support for std::initializer_list). --- doc/release_notes.qbk | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/release_notes.qbk b/doc/release_notes.qbk index 8c28368f2..68a26d961 100644 --- a/doc/release_notes.qbk +++ b/doc/release_notes.qbk @@ -25,6 +25,7 @@ [*Additional functionality] * Added rtree const_iterator, begin(), end() and the support for Boost.Range. +* The support for C++11 `std::initializer_list` in geometries models. [*Improvements] From ff267b8c5078862efed761122a0f9997d3e6c5fb Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Tue, 21 Apr 2015 21:05:23 +0200 Subject: [PATCH 20/89] [test][centroid] Fix uninitialized variable usage reported by asan. --- test/algorithms/centroid.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/test/algorithms/centroid.cpp b/test/algorithms/centroid.cpp index dc6993996..b5fb87a81 100644 --- a/test/algorithms/centroid.cpp +++ b/test/algorithms/centroid.cpp @@ -145,6 +145,7 @@ void test_large_integers() bg::centroid(double_poly, double_centroid); int_point_type double_centroid_as_int; + bg::assign_zero(double_centroid_as_int); bg::assign(int_centroid, double_centroid_as_int); BOOST_CHECK_EQUAL(bg::get<0>(int_centroid), bg::get<0>(double_centroid_as_int)); From 86df91ed5670e25f0520e44d32ea04c7ae6b415b Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Tue, 21 Apr 2015 21:26:48 +0200 Subject: [PATCH 21/89] [geometries] Implement detection of access to uninitialized or destroyed point/box. --- include/boost/geometry/geometries/box.hpp | 56 +++++++++++++++++++-- include/boost/geometry/geometries/point.hpp | 48 +++++++++++++++++- 2 files changed, 98 insertions(+), 6 deletions(-) diff --git a/include/boost/geometry/geometries/box.hpp b/include/boost/geometry/geometries/box.hpp index 99c6b76e0..912592ab1 100644 --- a/include/boost/geometry/geometries/box.hpp +++ b/include/boost/geometry/geometries/box.hpp @@ -22,6 +22,9 @@ #include #include +#if defined(BOOST_GEOMETRY_ENABLE_ACCESS_DEBUGGING) +#include +#endif namespace boost { namespace geometry @@ -54,7 +57,8 @@ class box public: -#ifndef BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +#if !defined(BOOST_GEOMETRY_ENABLE_ACCESS_DEBUGGING) +#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) /// \constructor_default_no_init box() = default; #else @@ -62,6 +66,16 @@ public: inline box() {} #endif +#else // defined(BOOST_GEOMETRY_ENABLE_ACCESS_DEBUGGING) + inline box() + { + m_magic = 1; + } + ~box() + { + m_magic = 0; + } +#endif /*! \brief Constructor taking the minimum corner point and the maximum corner point @@ -70,18 +84,50 @@ public: { geometry::convert(min_corner, m_min_corner); geometry::convert(max_corner, m_max_corner); + +#if defined(BOOST_GEOMETRY_ENABLE_ACCESS_DEBUGGING) + m_magic = 1; +#endif } - inline Point const& min_corner() const { return m_min_corner; } - inline Point const& max_corner() const { return m_max_corner; } + inline Point const& min_corner() const + { +#if defined(BOOST_GEOMETRY_ENABLE_ACCESS_DEBUGGING) + BOOST_ASSERT(m_magic == 1); +#endif + return m_min_corner; + } + inline Point const& max_corner() const + { +#if defined(BOOST_GEOMETRY_ENABLE_ACCESS_DEBUGGING) + BOOST_ASSERT(m_magic == 1); +#endif + return m_max_corner; + } - inline Point& min_corner() { return m_min_corner; } - inline Point& max_corner() { return m_max_corner; } + inline Point& min_corner() + { +#if defined(BOOST_GEOMETRY_ENABLE_ACCESS_DEBUGGING) + BOOST_ASSERT(m_magic == 1); +#endif + return m_min_corner; + } + inline Point& max_corner() + { +#if defined(BOOST_GEOMETRY_ENABLE_ACCESS_DEBUGGING) + BOOST_ASSERT(m_magic == 1); +#endif + return m_max_corner; + } private: Point m_min_corner; Point m_max_corner; + +#if defined(BOOST_GEOMETRY_ENABLE_ACCESS_DEBUGGING) + int m_magic; +#endif }; diff --git a/include/boost/geometry/geometries/point.hpp b/include/boost/geometry/geometries/point.hpp index 44ebfd988..dadbe0e06 100644 --- a/include/boost/geometry/geometries/point.hpp +++ b/include/boost/geometry/geometries/point.hpp @@ -31,6 +31,11 @@ #include #include +#if defined(BOOST_GEOMETRY_ENABLE_ACCESS_DEBUGGING) +#include +#include +#endif + namespace boost { namespace geometry { @@ -112,7 +117,8 @@ class point public: -#ifndef BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +#if !defined(BOOST_GEOMETRY_ENABLE_ACCESS_DEBUGGING) +#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) /// \constructor_default_no_init point() = default; #else @@ -120,6 +126,18 @@ public: inline point() {} #endif +#else // defined(BOOST_GEOMETRY_ENABLE_ACCESS_DEBUGGING) + point() + { + m_magic = 1; + std::fill_n(m_magic_values, DimensionCount, 0); + } + ~point() + { + m_magic = 0; + std::fill_n(m_magic_values, DimensionCount, 0); + } +#endif /// @brief Constructor to set one value explicit inline point(CoordinateType const& v0) @@ -127,6 +145,11 @@ public: detail::array_assign::apply(m_values, v0); detail::array_assign::apply(m_values, CoordinateType()); detail::array_assign::apply(m_values, CoordinateType()); + +#if defined(BOOST_GEOMETRY_ENABLE_ACCESS_DEBUGGING) + m_magic = 1; + std::fill_n(m_magic_values, (std::min)(std::size_t(3), DimensionCount), 1); +#endif } /// @brief Constructor to set two values @@ -135,6 +158,11 @@ public: detail::array_assign::apply(m_values, v0); detail::array_assign::apply(m_values, v1); detail::array_assign::apply(m_values, CoordinateType()); + +#if defined(BOOST_GEOMETRY_ENABLE_ACCESS_DEBUGGING) + m_magic = 1; + std::fill_n(m_magic_values, (std::min)(std::size_t(3), DimensionCount), 1); +#endif } /// @brief Constructor to set three values @@ -144,6 +172,11 @@ public: detail::array_assign::apply(m_values, v0); detail::array_assign::apply(m_values, v1); detail::array_assign::apply(m_values, v2); + +#if defined(BOOST_GEOMETRY_ENABLE_ACCESS_DEBUGGING) + m_magic = 1; + std::fill_n(m_magic_values, (std::min)(std::size_t(3), DimensionCount), 1); +#endif } /// @brief Get a coordinate @@ -152,6 +185,10 @@ public: template inline CoordinateType const& get() const { +#if defined(BOOST_GEOMETRY_ENABLE_ACCESS_DEBUGGING) + BOOST_ASSERT(m_magic == 1); + BOOST_ASSERT(m_magic_values[K] == 1); +#endif BOOST_STATIC_ASSERT(K < DimensionCount); return m_values[K]; } @@ -162,6 +199,10 @@ public: template inline void set(CoordinateType const& value) { +#if defined(BOOST_GEOMETRY_ENABLE_ACCESS_DEBUGGING) + BOOST_ASSERT(m_magic == 1); + m_magic_values[K] = 1; +#endif BOOST_STATIC_ASSERT(K < DimensionCount); m_values[K] = value; } @@ -169,6 +210,11 @@ public: private: CoordinateType m_values[DimensionCount]; + +#if defined(BOOST_GEOMETRY_ENABLE_ACCESS_DEBUGGING) + int m_magic; + int m_magic_values[DimensionCount]; +#endif }; From 0851688794677d2722de78bb065033a006247cfc Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Wed, 22 Apr 2015 03:04:05 +0200 Subject: [PATCH 22/89] [test][intersection] Fix uninitialized variable usage. --- test/algorithms/set_operations/intersection/intersection.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/test/algorithms/set_operations/intersection/intersection.cpp b/test/algorithms/set_operations/intersection/intersection.cpp index e15c3ee54..f89e70fab 100644 --- a/test/algorithms/set_operations/intersection/intersection.cpp +++ b/test/algorithms/set_operations/intersection/intersection.cpp @@ -358,6 +358,7 @@ void test_boxes(std::string const& wkt1, std::string const& wkt2, double expecte bg::read_wkt(wkt2, box2); Box box_out; + bg::assign_zero(box_out); bool detected = bg::intersection(box1, box2, box_out); typename bg::default_area_result::type area = bg::area(box_out); From e94cc655f36a6cdb159c71881f3f4f80d2962a50 Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Wed, 22 Apr 2015 12:06:11 +0200 Subject: [PATCH 23/89] [extensions][projections] change usage of fpc of Boost.Test because does not exist in master --- extensions/test/gis/projections/projections.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/extensions/test/gis/projections/projections.cpp b/extensions/test/gis/projections/projections.cpp index 097539d2c..a684525fd 100644 --- a/extensions/test/gis/projections/projections.cpp +++ b/extensions/test/gis/projections/projections.cpp @@ -42,16 +42,8 @@ inline void check(double v, double ve, std::string const& name, std::string const& axis) { - //BOOST_CHECK_CLOSE(v, ve, 0.001); - // Instead of (non-existing) BOOST_CHECK_CLOSE_MESSAGE(v, ve, 0.001, bla bla) - - if (! boost::test_tools::check_is_close(v, ve, boost::test_tools::fpc::percent_tolerance(0.001))) - { - std::ostringstream out; - out << "\n" << name << " " << axis << " -> " << v << " != " << ve; - BOOST_ERROR(out.str()); - } - + // (non-existing) BOOST_CHECK_CLOSE_MESSAGE(v, ve, 0.001, "\n" << name << " " << axis << " -> " << v << " != " << ve); + BOOST_CHECK_CLOSE(v, ve, 0.001); } template From 34bdc44b1016c87459af75134c832d8f34fca5b1 Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Wed, 22 Apr 2015 15:19:28 +0200 Subject: [PATCH 24/89] [geometries] Rename magic names into more meaningful ones. --- include/boost/geometry/geometries/box.hpp | 16 +++++------ include/boost/geometry/geometries/point.hpp | 32 ++++++++++----------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/include/boost/geometry/geometries/box.hpp b/include/boost/geometry/geometries/box.hpp index 912592ab1..5fcf171f0 100644 --- a/include/boost/geometry/geometries/box.hpp +++ b/include/boost/geometry/geometries/box.hpp @@ -69,11 +69,11 @@ public: #else // defined(BOOST_GEOMETRY_ENABLE_ACCESS_DEBUGGING) inline box() { - m_magic = 1; + m_created = 1; } ~box() { - m_magic = 0; + m_created = 0; } #endif @@ -86,21 +86,21 @@ public: geometry::convert(max_corner, m_max_corner); #if defined(BOOST_GEOMETRY_ENABLE_ACCESS_DEBUGGING) - m_magic = 1; + m_created = 1; #endif } inline Point const& min_corner() const { #if defined(BOOST_GEOMETRY_ENABLE_ACCESS_DEBUGGING) - BOOST_ASSERT(m_magic == 1); + BOOST_ASSERT(m_created == 1); #endif return m_min_corner; } inline Point const& max_corner() const { #if defined(BOOST_GEOMETRY_ENABLE_ACCESS_DEBUGGING) - BOOST_ASSERT(m_magic == 1); + BOOST_ASSERT(m_created == 1); #endif return m_max_corner; } @@ -108,14 +108,14 @@ public: inline Point& min_corner() { #if defined(BOOST_GEOMETRY_ENABLE_ACCESS_DEBUGGING) - BOOST_ASSERT(m_magic == 1); + BOOST_ASSERT(m_created == 1); #endif return m_min_corner; } inline Point& max_corner() { #if defined(BOOST_GEOMETRY_ENABLE_ACCESS_DEBUGGING) - BOOST_ASSERT(m_magic == 1); + BOOST_ASSERT(m_created == 1); #endif return m_max_corner; } @@ -126,7 +126,7 @@ private: Point m_max_corner; #if defined(BOOST_GEOMETRY_ENABLE_ACCESS_DEBUGGING) - int m_magic; + int m_created; #endif }; diff --git a/include/boost/geometry/geometries/point.hpp b/include/boost/geometry/geometries/point.hpp index dadbe0e06..5f78bcff2 100644 --- a/include/boost/geometry/geometries/point.hpp +++ b/include/boost/geometry/geometries/point.hpp @@ -129,13 +129,13 @@ public: #else // defined(BOOST_GEOMETRY_ENABLE_ACCESS_DEBUGGING) point() { - m_magic = 1; - std::fill_n(m_magic_values, DimensionCount, 0); + m_created = 1; + std::fill_n(m_values_initialized, DimensionCount, 0); } ~point() { - m_magic = 0; - std::fill_n(m_magic_values, DimensionCount, 0); + m_created = 0; + std::fill_n(m_values_initialized, DimensionCount, 0); } #endif @@ -147,8 +147,8 @@ public: detail::array_assign::apply(m_values, CoordinateType()); #if defined(BOOST_GEOMETRY_ENABLE_ACCESS_DEBUGGING) - m_magic = 1; - std::fill_n(m_magic_values, (std::min)(std::size_t(3), DimensionCount), 1); + m_created = 1; + std::fill_n(m_values_initialized, (std::min)(std::size_t(3), DimensionCount), 1); #endif } @@ -160,8 +160,8 @@ public: detail::array_assign::apply(m_values, CoordinateType()); #if defined(BOOST_GEOMETRY_ENABLE_ACCESS_DEBUGGING) - m_magic = 1; - std::fill_n(m_magic_values, (std::min)(std::size_t(3), DimensionCount), 1); + m_created = 1; + std::fill_n(m_values_initialized, (std::min)(std::size_t(3), DimensionCount), 1); #endif } @@ -174,8 +174,8 @@ public: detail::array_assign::apply(m_values, v2); #if defined(BOOST_GEOMETRY_ENABLE_ACCESS_DEBUGGING) - m_magic = 1; - std::fill_n(m_magic_values, (std::min)(std::size_t(3), DimensionCount), 1); + m_created = 1; + std::fill_n(m_values_initialized, (std::min)(std::size_t(3), DimensionCount), 1); #endif } @@ -186,8 +186,8 @@ public: inline CoordinateType const& get() const { #if defined(BOOST_GEOMETRY_ENABLE_ACCESS_DEBUGGING) - BOOST_ASSERT(m_magic == 1); - BOOST_ASSERT(m_magic_values[K] == 1); + BOOST_ASSERT(m_created == 1); + BOOST_ASSERT(m_values_initialized[K] == 1); #endif BOOST_STATIC_ASSERT(K < DimensionCount); return m_values[K]; @@ -200,8 +200,8 @@ public: inline void set(CoordinateType const& value) { #if defined(BOOST_GEOMETRY_ENABLE_ACCESS_DEBUGGING) - BOOST_ASSERT(m_magic == 1); - m_magic_values[K] = 1; + BOOST_ASSERT(m_created == 1); + m_values_initialized[K] = 1; #endif BOOST_STATIC_ASSERT(K < DimensionCount); m_values[K] = value; @@ -212,8 +212,8 @@ private: CoordinateType m_values[DimensionCount]; #if defined(BOOST_GEOMETRY_ENABLE_ACCESS_DEBUGGING) - int m_magic; - int m_magic_values[DimensionCount]; + int m_created; + int m_values_initialized[DimensionCount]; #endif }; From 3b79baadba87e11a268a93aa25d31e0dfab5aaf5 Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Wed, 22 Apr 2015 15:53:07 +0200 Subject: [PATCH 25/89] [projections] commit changes for new generation (whitespace only) --- .../boost/geometry/extensions/gis/projections/proj/aeqd.hpp | 2 +- .../boost/geometry/extensions/gis/projections/proj/goode.hpp | 1 - .../boost/geometry/extensions/gis/projections/proj/putp6.hpp | 2 +- .../boost/geometry/extensions/gis/projections/proj/sterea.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/tmerc.hpp | 4 ++-- 5 files changed, 4 insertions(+), 7 deletions(-) diff --git a/include/boost/geometry/extensions/gis/projections/proj/aeqd.hpp b/include/boost/geometry/extensions/gis/projections/proj/aeqd.hpp index a0b599763..5e240ee1a 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/aeqd.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/aeqd.hpp @@ -115,7 +115,7 @@ namespace boost { namespace geometry { namespace projections ct = cos(t); st = sin(t); Az = atan2(sin(lp_lon) * ct, this->m_proj_parm.cosph0 * st - this->m_proj_parm.sinph0 * coslam * ct); cA = cos(Az); sA = sin(Az); - s = aasin( fabs(sA) < TOL ? + s = aasin(fabs(sA) < TOL ? (this->m_proj_parm.cosph0 * st - this->m_proj_parm.sinph0 * coslam * ct) / cA : sin(lp_lon) * ct / sA ); H = this->m_proj_parm.He * cA; diff --git a/include/boost/geometry/extensions/gis/projections/proj/goode.hpp b/include/boost/geometry/extensions/gis/projections/proj/goode.hpp index 56204bf83..2058f2c47 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/goode.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/goode.hpp @@ -41,7 +41,6 @@ #include #include #include - #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/putp6.hpp b/include/boost/geometry/extensions/gis/projections/proj/putp6.hpp index c04842e82..c91d847f8 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/putp6.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/putp6.hpp @@ -98,7 +98,7 @@ namespace boost { namespace geometry { namespace projections lp_lat = xy_y / this->m_proj_parm.C_y; r = sqrt(1. + lp_lat * lp_lat); lp_lon = xy_x / (this->m_proj_parm.C_x * (this->m_proj_parm.D - r)); - lp_lat = aasin( ( (this->m_proj_parm.A - r) * lp_lat - log(lp_lat + r) ) / this->m_proj_parm.B); + lp_lat = aasin(( (this->m_proj_parm.A - r) * lp_lat - log(lp_lat + r) ) / this->m_proj_parm.B); } }; diff --git a/include/boost/geometry/extensions/gis/projections/proj/sterea.hpp b/include/boost/geometry/extensions/gis/projections/proj/sterea.hpp index 95ed81a89..05bc9f5cd 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/sterea.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/sterea.hpp @@ -116,9 +116,7 @@ namespace boost { namespace geometry { namespace projections template void setup_sterea(Parameters& par, par_sterea& proj_parm) { - - double R; proj_parm.en = detail::gauss::gauss_ini(par.e, par.phi0, proj_parm.phic0, R); proj_parm.sinc0 = sin(proj_parm.phic0); diff --git a/include/boost/geometry/extensions/gis/projections/proj/tmerc.hpp b/include/boost/geometry/extensions/gis/projections/proj/tmerc.hpp index fff3798fd..fcacc828f 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/tmerc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/tmerc.hpp @@ -98,7 +98,7 @@ namespace boost { namespace geometry { namespace projections { xy_x = HUGE_VAL; xy_y = HUGE_VAL; - throw proj_exception( -14 ); + throw proj_exception(-14 ); return; } @@ -184,7 +184,7 @@ namespace boost { namespace geometry { namespace projections { xy_x = HUGE_VAL; xy_y = HUGE_VAL; - throw proj_exception( -14 ); + throw proj_exception(-14 ); return; } From aa1ec1c832ead914dec156dd2fda9233cdec1081 Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Wed, 22 Apr 2015 15:53:29 +0200 Subject: [PATCH 26/89] [projections] commit changes for new generation (comments only) --- .../boost/geometry/extensions/gis/projections/proj/aitoff.hpp | 2 ++ .../boost/geometry/extensions/gis/projections/proj/putp3.hpp | 1 - .../boost/geometry/extensions/gis/projections/proj/urm5.hpp | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/boost/geometry/extensions/gis/projections/proj/aitoff.hpp b/include/boost/geometry/extensions/gis/projections/proj/aitoff.hpp index dfa18b963..b20ca3fcb 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/aitoff.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/aitoff.hpp @@ -135,6 +135,7 @@ namespace boost { namespace geometry { namespace projections \par Projection characteristics - Miscellaneous - Spheroid + - no inverse \par Example \image html ex_aitoff.gif */ @@ -156,6 +157,7 @@ namespace boost { namespace geometry { namespace projections \par Projection characteristics - Miscellaneous - Spheroid + - no inverse - lat_1 \par Example \image html ex_wintri.gif diff --git a/include/boost/geometry/extensions/gis/projections/proj/putp3.hpp b/include/boost/geometry/extensions/gis/projections/proj/putp3.hpp index 4a674f8e3..46ac57bd9 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/putp3.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/putp3.hpp @@ -142,7 +142,6 @@ namespace boost { namespace geometry { namespace projections \tparam Parameters parameter type \par Projection characteristics - Pseudocylindrical - - no inverse - Spheroid \par Example \image html ex_putp3p.gif diff --git a/include/boost/geometry/extensions/gis/projections/proj/urm5.hpp b/include/boost/geometry/extensions/gis/projections/proj/urm5.hpp index 05c1501a6..7d1fba571 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/urm5.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/urm5.hpp @@ -106,7 +106,8 @@ namespace boost { namespace geometry { namespace projections \par Projection characteristics - Pseudocylindrical - Spheroid - - n= q= alphi= + - no inverse + - n= q= alpha= \par Example \image html ex_urm5.gif */ From 8a66ade71af1670c48bde7560fccec4f03ce03d4 Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Wed, 22 Apr 2015 15:54:04 +0200 Subject: [PATCH 27/89] [projections] commit changes for new generation (minor code changes) --- .../boost/geometry/extensions/gis/projections/proj/lcca.hpp | 5 +++-- .../geometry/extensions/gis/projections/proj/sconics.hpp | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/boost/geometry/extensions/gis/projections/proj/lcca.hpp b/include/boost/geometry/extensions/gis/projections/proj/lcca.hpp index 7fd3bcabb..3c7cdffe5 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/lcca.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/lcca.hpp @@ -117,7 +117,8 @@ namespace boost { namespace geometry { namespace projections template void setup_lcca(Parameters& par, par_lcca& proj_parm) { - double s2p0, N0, R0, tan0/*, tan20*/; + double s2p0, N0, R0, tan0, tan20; + boost::ignore_unused(tan20); pj_enfn(par.es, proj_parm.en); if (!pj_param(par.params, "tlat_0").i) throw proj_exception(50); if (par.phi0 == 0.) throw proj_exception(51); @@ -128,7 +129,7 @@ namespace boost { namespace geometry { namespace projections N0 = sqrt(R0); R0 *= par.one_es * N0; tan0 = tan(par.phi0); - //tan20 = tan0 * tan0; + tan20 = tan0 * tan0; proj_parm.r0 = N0 / tan0; proj_parm.C = 1. / (6. * R0 * N0); // par.inv = e_inverse; diff --git a/include/boost/geometry/extensions/gis/projections/proj/sconics.hpp b/include/boost/geometry/extensions/gis/projections/proj/sconics.hpp index f5a536af0..191d3e018 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/sconics.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/sconics.hpp @@ -112,7 +112,6 @@ namespace boost { namespace geometry { namespace projections break; case PCONIC: rho = this->m_proj_parm.c2 * (this->m_proj_parm.c1 - tan(lp_lat - this->m_proj_parm.sig)); - // rho = this->m_proj_parm.c2 * (this->m_proj_parm.c1 - tan(lp_lat)); BUG STILL IN proj (reported 2012-03-03) break; default: rho = this->m_proj_parm.rho_c - lp_lat; From cb7521056f3d1ea17d9d3637d5641b9e386aec0a Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Wed, 22 Apr 2015 16:36:08 +0200 Subject: [PATCH 28/89] [projections] use proj4 4.8, changes in projection Robin --- .../test/gis/projections/projections.cpp | 4 +- .../extensions/gis/projections/proj/robin.hpp | 89 ++++++++++--------- 2 files changed, 49 insertions(+), 44 deletions(-) diff --git a/extensions/test/gis/projections/projections.cpp b/extensions/test/gis/projections/projections.cpp index a684525fd..a825b3ff9 100644 --- a/extensions/test/gis/projections/projections.cpp +++ b/extensions/test/gis/projections/projections.cpp @@ -202,7 +202,7 @@ void test_all() test_forward

("putp6", 4.897000, 52.371000, 324931.055842, 5842588.644796, "+proj=putp6 +ellps=WGS84 +units=m"); test_forward

("putp6p", 4.897000, 52.371000, 338623.512107, 6396742.919679, "+proj=putp6p +ellps=WGS84 +units=m"); test_forward

("qua_aut", 4.897000, 52.371000, 370892.621714, 5629072.862494, "+proj=qua_aut +ellps=WGS84 +units=m"); - test_forward

("robin", 4.897000, 52.371000, 394576.507489, 5571243.439235, "+proj=robin +ellps=WGS84 +units=m"); + test_forward

("robin", 4.897000, 52.371000, 394576.507489, 5570940.631371, "+proj=robin +ellps=WGS84 +units=m"); test_forward

("rouss", 4.897000, 52.371000, 412826.227669, 6248368.849775, "+proj=rouss +ellps=WGS84 +units=m"); test_forward

("rpoly", 4.897000, 52.371000, 332447.130797, 5841164.662431, "+proj=rpoly +ellps=WGS84 +units=m"); test_forward

("sinu", 4.897000, 52.371000, 333528.909809, 5804625.044313, "+proj=sinu +ellps=WGS84 +units=m"); @@ -317,7 +317,7 @@ void test_all() test_inverse

("putp6", 324931.055842, 5842588.644796, 4.897000, 52.371000, "+proj=putp6 +ellps=WGS84 +units=m"); test_inverse

("putp6p", 338623.512107, 6396742.919679, 4.897000, 52.371000, "+proj=putp6p +ellps=WGS84 +units=m"); test_inverse

("qua_aut", 370892.621714, 5629072.862494, 4.897000, 52.371000, "+proj=qua_aut +ellps=WGS84 +units=m"); - test_inverse

("robin", 394576.507489, 5571243.439235, 4.897000, 52.371000, "+proj=robin +ellps=WGS84 +units=m"); + test_inverse

("robin", 394576.507489, 5570940.631371, 4.897000, 52.371000, "+proj=robin +ellps=WGS84 +units=m"); test_inverse

("rouss", 412826.227669, 6248368.849775, 4.959853, 52.433747, "+proj=rouss +ellps=WGS84 +units=m"); // F/I: 8188.459174 test_inverse

("sinu", 333528.909809, 5804625.044313, 4.897000, 52.371000, "+proj=sinu +ellps=WGS84 +units=m"); test_inverse

("somerc", 545131.546415, 6833623.829215, 4.897000, 52.371000, "+proj=somerc +ellps=WGS84 +units=m"); diff --git a/include/boost/geometry/extensions/gis/projections/proj/robin.hpp b/include/boost/geometry/extensions/gis/projections/proj/robin.hpp index 53769ceb9..8397c71a6 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/robin.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/robin.hpp @@ -55,49 +55,54 @@ namespace boost { namespace geometry { namespace projections static const double ONEEPS = 1.000001; static const double EPS = 1e-8; - /* note: following terms based upon 5 deg. intervals in degrees. */ - static struct COEFS { + + + struct COEFS { double c0, c1, c2, c3; - } X[] = { - {1, -5.67239e-12, -7.15511e-05, 3.11028e-06}, - {0.9986, -0.000482241, -2.4897e-05, -1.33094e-06}, - {0.9954, -0.000831031, -4.4861e-05, -9.86588e-07}, - {0.99, -0.00135363, -5.96598e-05, 3.67749e-06}, - {0.9822, -0.00167442, -4.4975e-06, -5.72394e-06}, - {0.973, -0.00214869, -9.03565e-05, 1.88767e-08}, - {0.96, -0.00305084, -9.00732e-05, 1.64869e-06}, - {0.9427, -0.00382792, -6.53428e-05, -2.61493e-06}, - {0.9216, -0.00467747, -0.000104566, 4.8122e-06}, - {0.8962, -0.00536222, -3.23834e-05, -5.43445e-06}, - {0.8679, -0.00609364, -0.0001139, 3.32521e-06}, - {0.835, -0.00698325, -6.40219e-05, 9.34582e-07}, - {0.7986, -0.00755337, -5.00038e-05, 9.35532e-07}, - {0.7597, -0.00798325, -3.59716e-05, -2.27604e-06}, - {0.7186, -0.00851366, -7.0112e-05, -8.63072e-06}, - {0.6732, -0.00986209, -0.000199572, 1.91978e-05}, - {0.6213, -0.010418, 8.83948e-05, 6.24031e-06}, - {0.5722, -0.00906601, 0.000181999, 6.24033e-06}, - {0.5322, 0.,0.,0.} }, - Y[] = { - {0, 0.0124, 3.72529e-10, 1.15484e-09}, - {0.062, 0.0124001, 1.76951e-08, -5.92321e-09}, - {0.124, 0.0123998, -7.09668e-08, 2.25753e-08}, - {0.186, 0.0124008, 2.66917e-07, -8.44523e-08}, - {0.248, 0.0123971, -9.99682e-07, 3.15569e-07}, - {0.31, 0.0124108, 3.73349e-06, -1.1779e-06}, - {0.372, 0.0123598, -1.3935e-05, 4.39588e-06}, - {0.434, 0.0125501, 5.20034e-05, -1.00051e-05}, - {0.4958, 0.0123198, -9.80735e-05, 9.22397e-06}, - {0.5571, 0.0120308, 4.02857e-05, -5.2901e-06}, - {0.6176, 0.0120369, -3.90662e-05, 7.36117e-07}, - {0.6769, 0.0117015, -2.80246e-05, -8.54283e-07}, - {0.7346, 0.0113572, -4.08389e-05, -5.18524e-07}, - {0.7903, 0.0109099, -4.86169e-05, -1.0718e-06}, - {0.8435, 0.0103433, -6.46934e-05, 5.36384e-09}, - {0.8936, 0.00969679, -6.46129e-05, -8.54894e-06}, - {0.9394, 0.00840949, -0.000192847, -4.21023e-06}, - {0.9761, 0.00616525, -0.000256001, -4.21021e-06}, - {1., 0.,0.,0} }; + }; + + static const struct COEFS X[] = { + {1, 2.2199e-17, -7.15515e-05, 3.1103e-06}, + {0.9986, -0.000482243, -2.4897e-05, -1.3309e-06}, + {0.9954, -0.00083103, -4.48605e-05, -9.86701e-07}, + {0.99, -0.00135364, -5.9661e-05, 3.6777e-06}, + {0.9822, -0.00167442, -4.49547e-06, -5.72411e-06}, + {0.973, -0.00214868, -9.03571e-05, 1.8736e-08}, + {0.96, -0.00305085, -9.00761e-05, 1.64917e-06}, + {0.9427, -0.00382792, -6.53386e-05, -2.6154e-06}, + {0.9216, -0.00467746, -0.00010457, 4.81243e-06}, + {0.8962, -0.00536223, -3.23831e-05, -5.43432e-06}, + {0.8679, -0.00609363, -0.000113898, 3.32484e-06}, + {0.835, -0.00698325, -6.40253e-05, 9.34959e-07}, + {0.7986, -0.00755338, -5.00009e-05, 9.35324e-07}, + {0.7597, -0.00798324, -3.5971e-05, -2.27626e-06}, + {0.7186, -0.00851367, -7.01149e-05, -8.6303e-06}, + {0.6732, -0.00986209, -0.000199569, 1.91974e-05}, + {0.6213, -0.010418, 8.83923e-05, 6.24051e-06}, + {0.5722, -0.00906601, 0.000182, 6.24051e-06}, + {0.5322, -0.00677797, 0.000275608, 6.24051e-06} + }; + static const struct COEFS Y[] = { + {-5.20417e-18, 0.0124, 1.21431e-18, -8.45284e-11}, + {0.062, 0.0124, -1.26793e-09, 4.22642e-10}, + {0.124, 0.0124, 5.07171e-09, -1.60604e-09}, + {0.186, 0.0123999, -1.90189e-08, 6.00152e-09}, + {0.248, 0.0124002, 7.10039e-08, -2.24e-08}, + {0.31, 0.0123992, -2.64997e-07, 8.35986e-08}, + {0.372, 0.0124029, 9.88983e-07, -3.11994e-07}, + {0.434, 0.0123893, -3.69093e-06, -4.35621e-07}, + {0.4958, 0.0123198, -1.02252e-05, -3.45523e-07}, + {0.5571, 0.0121916, -1.54081e-05, -5.82288e-07}, + {0.6176, 0.0119938, -2.41424e-05, -5.25327e-07}, + {0.6769, 0.011713, -3.20223e-05, -5.16405e-07}, + {0.7346, 0.0113541, -3.97684e-05, -6.09052e-07}, + {0.7903, 0.0109107, -4.89042e-05, -1.04739e-06}, + {0.8435, 0.0103431, -6.4615e-05, -1.40374e-09}, + {0.8936, 0.00969686, -6.4636e-05, -8.547e-06}, + {0.9394, 0.00840947, -0.000192841, -4.2106e-06}, + {0.9761, 0.00616527, -0.000256, -4.2106e-06}, + {1, 0.00328947, -0.000319159, -4.2106e-06} + }; // template class, using CRTP to implement forward/inverse template From ea22fa9540ac17535a3545425d20af3aa3fcd9d7 Mon Sep 17 00:00:00 2001 From: Mats Taraldsvik Date: Tue, 30 Sep 2014 14:46:21 +0200 Subject: [PATCH 29/89] [extensions][wkb] Change handling of wkb geometry_type to be more generic The geometry type is changed to be more flexible and able to handle multiple formats and different dimensions in the future. --- .../extensions/gis/io/wkb/detail/ogc.hpp | 128 +++++++++++++++++- .../extensions/gis/io/wkb/detail/parser.hpp | 65 ++++----- 2 files changed, 152 insertions(+), 41 deletions(-) diff --git a/include/boost/geometry/extensions/gis/io/wkb/detail/ogc.hpp b/include/boost/geometry/extensions/gis/io/wkb/detail/ogc.hpp index 34cd5330b..a8eaf2787 100644 --- a/include/boost/geometry/extensions/gis/io/wkb/detail/ogc.hpp +++ b/include/boost/geometry/extensions/gis/io/wkb/detail/ogc.hpp @@ -62,7 +62,7 @@ struct byte_order_type }; }; -struct geometry_type +struct geometry_type_ogc { enum enum_t { @@ -78,9 +78,131 @@ struct geometry_type }; }; -}} // namespace detail::endian +struct geometry_type_ewkt +{ + enum enum_t + { + point = 1, + linestring = 2, + polygon = 3, + + // TODO: Not implemented + //multipoint = 4, + //multilinestring = 5, + //multipolygon = 6, + //collection = 7 + + + pointz = 1001, + linestringz = 1002, + polygonz = 1003 + }; +}; + +struct ogc_policy +{ +}; + +struct ewkt_policy +{ +}; + +template +< + typename Geometry, + typename CheckPolicy = ogc_policy, + typename Tag = typename tag::type +> +struct geometry_type : not_implemented +{ +}; + +template +struct geometry_type +{ + static bool check(boost::uint32_t value) + { + return value == get_impl::value>(); + } + + static boost::uint32_t get() + { + return get_impl::value>(); + } + +private: + + template + static boost::uint32_t get_impl() + { + return geometry_type_ogc::point; + } + + template <> + static boost::uint32_t get_impl<3>() + { + return 1000 + geometry_type_ogc::point; + } +}; + +template +struct geometry_type +{ + static bool check(boost::uint32_t value) + { + return value == get_impl::value>(); + } + + static boost::uint32_t get() + { + return get_impl::value>(); + } + +private: + + template + static boost::uint32_t get_impl() + { + return geometry_type_ogc::linestring; + } + + template <> + static boost::uint32_t get_impl<3>() + { + return 1000 + geometry_type_ogc::linestring; + } +}; + +template +struct geometry_type +{ + static bool check(boost::uint32_t value) + { + return value == get_impl::value>(); + } + + static boost::uint32_t get() + { + return get_impl::value>(); + } + +private: + + template + static boost::uint32_t get_impl() + { + return geometry_type_ogc::polygon; + } + + template <> + static boost::uint32_t get_impl<3>() + { + return 1000 + geometry_type_ogc::polygon; + } +}; + +}} // namespace detail::wkb #endif // DOXYGEN_NO_IMPL }} // namespace boost::geometry - #endif // BOOST_GEOMETRY_IO_WKB_DETAIL_OGC_HPP diff --git a/include/boost/geometry/extensions/gis/io/wkb/detail/parser.hpp b/include/boost/geometry/extensions/gis/io/wkb/detail/parser.hpp index d91979b11..eeb1f5c88 100644 --- a/include/boost/geometry/extensions/gis/io/wkb/detail/parser.hpp +++ b/include/boost/geometry/extensions/gis/io/wkb/detail/parser.hpp @@ -101,23 +101,17 @@ struct byte_order_parser } }; +template struct geometry_type_parser { template - static bool parse(Iterator& it, Iterator end, geometry_type::enum_t& type, - byte_order_type::enum_t order) + static bool parse(Iterator& it, Iterator end, + byte_order_type::enum_t order) { boost::uint32_t value; if (value_parser::parse(it, end, value, order)) { - // TODO: Refine the test when multi* geometries are supported - - boost::uint32_t id = value & 0xff; - if (geometry_type::polygon >= id) - { - type = geometry_type::enum_t(id); - return true; - } + return geometry_type::check(value); } return false; } @@ -127,7 +121,8 @@ template struct parsing_assigner { template - static void run(Iterator& it, Iterator end, P& point, byte_order_type::enum_t order) + static void run(Iterator& it, Iterator end, P& point, + byte_order_type::enum_t order) { typedef typename coordinate_type

::type coordinate_type; @@ -154,7 +149,8 @@ template struct parsing_assigner { template - static void run(Iterator& it, Iterator end, P& point, byte_order_type::enum_t order) + static void run(Iterator& it, Iterator end, P& point, + byte_order_type::enum_t order) { // terminate boost::ignore_unused_variable_warning(it); @@ -168,14 +164,12 @@ template struct point_parser { template - static bool parse(Iterator& it, Iterator end, P& point, byte_order_type::enum_t order) + static bool parse(Iterator& it, Iterator end, P& point, + byte_order_type::enum_t order) { - // TODO: mloskot - Add assert on point dimension, 2d only - - geometry_type::enum_t type; - if (geometry_type_parser::parse(it, end, type, order)) + if (geometry_type_parser

::parse(it, end, order)) { - if (geometry_type::point == type && it != end) + if (it != end) { parsing_assigner::value>::run(it, end, point, order); } @@ -189,7 +183,8 @@ template struct point_container_parser { template - static bool parse(Iterator& it, Iterator end, C& container, byte_order_type::enum_t order) + static bool parse(Iterator& it, Iterator end, C& container, + byte_order_type::enum_t order) { typedef typename point_type::type point_type; @@ -208,15 +203,13 @@ struct point_container_parser if (std::distance(it, end) >= (container_size * point_size)) { point_type point_buffer; - std::back_insert_iterator output(std::back_inserter(container)); // Read coordinates into point and append point to line (ring) size_type points_parsed = 0; while (points_parsed < container_size && it != end) { parsing_assigner::value>::run(it, end, point_buffer, order); - output = point_buffer; - ++output; + boost::geometry::append(container, point_buffer); ++points_parsed; } @@ -225,6 +218,10 @@ struct point_container_parser return false; } } + else + { + return false; + } return true; } @@ -234,17 +231,12 @@ template struct linestring_parser { template - static bool parse(Iterator& it, Iterator end, L& linestring, byte_order_type::enum_t order) + static bool parse(Iterator& it, Iterator end, L& linestring, + byte_order_type::enum_t order) { typedef typename point_type::type point_type; - geometry_type::enum_t type; - if (!geometry_type_parser::parse(it, end, type, order)) - { - return false; - } - - if (geometry_type::linestring != type) + if (!geometry_type_parser::parse(it, end, order)) { return false; } @@ -258,17 +250,16 @@ template struct polygon_parser { template - static bool parse(Iterator& it, Iterator end, Polygon& polygon, byte_order_type::enum_t order) + static bool parse(Iterator& it, Iterator end, Polygon& polygon, + byte_order_type::enum_t order) { - geometry_type::enum_t type; - if (!geometry_type_parser::parse(it, end, type, order)) + if (!geometry_type_parser::parse(it, end, order)) { return false; } boost::uint32_t num_rings(0); - if (geometry_type::polygon != type || - !value_parser::parse(it, end, num_rings, order)) + if (!value_parser::parse(it, end, num_rings, order)) { return false; } @@ -276,7 +267,7 @@ struct polygon_parser typedef typename ring_type::type ring_type; std::size_t rings_parsed = 0; - while (rings_parsed < num_rings && it != end) //while (rings_parsed < num_rings && it != end) + while (rings_parsed < num_rings && it != end) { if (0 == rings_parsed) { @@ -311,6 +302,4 @@ struct polygon_parser #endif // DOXYGEN_NO_IMPL }} // namespace boost::geometry - - #endif // BOOST_GEOMETRY_IO_WKB_DETAIL_PARSER_HPP From 2ef1b1a024f50fe09697e842f1e62e45a38344dc Mon Sep 17 00:00:00 2001 From: Mats Taraldsvik Date: Tue, 30 Sep 2014 14:46:46 +0200 Subject: [PATCH 30/89] [extensions][test] Update and extend tests for reading wkb geometries Added tests for linestrings and polygons. Removed tests for reading into 2d points from other formats (3D, XYM, XYZM) and ignoring superfluous coordinates, as this is surprising behaviour that will ever only work with point types. --- extensions/test/gis/io/wkb/read_wkb.cpp | 233 ++++++++++++++++++++---- 1 file changed, 202 insertions(+), 31 deletions(-) diff --git a/extensions/test/gis/io/wkb/read_wkb.cpp b/extensions/test/gis/io/wkb/read_wkb.cpp index 815fc78a5..c5b13bfb8 100644 --- a/extensions/test/gis/io/wkb/read_wkb.cpp +++ b/extensions/test/gis/io/wkb/read_wkb.cpp @@ -11,10 +11,13 @@ #include #include +#include + #include #include #include #include +#include #include #include @@ -22,6 +25,10 @@ #include #include +#include +#include +#include + namespace bg = boost::geometry; namespace { // anonymous @@ -38,7 +45,7 @@ void test_geometry_wrong_wkb(std::string const& wkbhex, std::string const& wkt) } template -void test_geometry_equals(std::string const& wkbhex, std::string const& wkt) +void test_geometry_equals_old(std::string const& wkbhex, std::string const& wkt) { byte_vector wkb; BOOST_CHECK( bg::hex2wkb(wkbhex, std::back_inserter(wkb)) ); @@ -47,9 +54,28 @@ void test_geometry_equals(std::string const& wkbhex, std::string const& wkt) Geometry g_expected; bg::read_wkt(wkt, g_expected); + BOOST_CHECK( bg::equals(g_wkb, g_expected) == IsEqual ); } +template +void test_geometry_equals(Geometry const& g_expected, std::string const& wkbhex) +{ + byte_vector wkb; + BOOST_CHECK( bg::hex2wkb(wkbhex, std::back_inserter(wkb))); + + Geometry g_wkb; + bg::read_wkb(wkb.begin(), wkb.end(), g_wkb); + + BOOST_CHECK( bg::equals(g_wkb, g_expected) == IsEqual ); + + if(bg::equals(g_wkb, g_expected) != IsEqual) + { + std::cout << "EXPECTED: " << bg::wkt(g_expected) << std::endl; + std::cout << "ACTUAL : " << bg::wkt(g_wkb) << std::endl; + } +} + //template //void test_polygon_wkt(std::string const& wkt) //{ @@ -64,45 +90,190 @@ void test_geometry_equals(std::string const& wkbhex, std::string const& wkt) int test_main(int, char* []) { - typedef bg::model::point point_type; - typedef bg::model::linestring linestring_type; + { + typedef bg::model::point point_type; + typedef bg::model::point point3d_type; - // - // POINT - // + // + // POINT + // - test_geometry_equals( - "01010000005839B4C876BEF33F83C0CAA145B61640", "POINT (1.234 5.678)"); + test_geometry_equals_old( + "01010000005839B4C876BEF33F83C0CAA145B61640", "POINT (1.234 5.678)"); - // XYZ - POINT(1.234 5.678 99) - Z coordinate ignored - test_geometry_equals( - "01010000805839B4C876BEF33F83C0CAA145B616400000000000C05840", "POINT(1.234 5.678)"); + test_geometry_equals_old( + "01E90300005839B4C876BEF33F83C0CAA145B616404F401361C3332240", "POINT(1.234 5.678 9.1011)"); - // SRID=32632;POINT(1.234 5.678) - PostGIS EWKT - test_geometry_equals( - "0101000020787F00005839B4C876BEF33F83C0CAA145B61640", "POINT (1.234 5.678)"); + // // XYZ - POINT(1.234 5.678 99) - Z coordinate ignored + // test_geometry_equals( + // "01010000805839B4C876BEF33F83C0CAA145B616400000000000C05840", "POINT(1.234 5.678)"); + // + // // SRID=32632;POINT(1.234 5.678) - PostGIS EWKT + // test_geometry_equals( + // "0101000020787F00005839B4C876BEF33F83C0CAA145B61640", "POINT (1.234 5.678)"); + // + // // SRID=4326;POINT(1.234 5.678 99) - PostGIS EWKT + // test_geometry_equals( + // "01010000A0E61000005839B4C876BEF33F83C0CAA145B616400000000000C05840", "POINT(1.234 5.678)"); + // + // // POINTM(1.234 5.678 99) - XYM with M compound ignored + // test_geometry_equals( + // "01010000405839B4C876BEF33F83C0CAA145B616400000000000C05840", "POINT (1.234 5.678)"); + // + // // SRID=32632;POINTM(1.234 5.678 99) + // test_geometry_equals( + // "0101000060787F00005839B4C876BEF33F83C0CAA145B616400000000000C05840", "POINT (1.234 5.678)"); + // + // // POINT(1.234 5.678 15 79) - XYZM - Z and M compounds ignored + // test_geometry_equals( + // "01010000C05839B4C876BEF33F83C0CAA145B616400000000000002E400000000000C05340", + // "POINT (1.234 5.678)"); + // + // // SRID=4326;POINT(1.234 5.678 15 79) - XYZM + SRID + // test_geometry_equals( + // "01010000E0E61000005839B4C876BEF33F83C0CAA145B616400000000000002E400000000000C05340", + // "POINT (1.234 5.678)"); - // SRID=4326;POINT(1.234 5.678 99) - PostGIS EWKT - test_geometry_equals( - "01010000A0E61000005839B4C876BEF33F83C0CAA145B616400000000000C05840", "POINT(1.234 5.678)"); + } - // POINTM(1.234 5.678 99) - XYM with M compound ignored - test_geometry_equals( - "01010000405839B4C876BEF33F83C0CAA145B616400000000000C05840", "POINT (1.234 5.678)"); + { + typedef bg::model::point point_type; + typedef bg::model::point point3d_type; - // SRID=32632;POINTM(1.234 5.678 99) - test_geometry_equals( - "0101000060787F00005839B4C876BEF33F83C0CAA145B616400000000000C05840", "POINT (1.234 5.678)"); + typedef bg::model::linestring linestring_type; + typedef bg::model::linestring linestring3d_type; - // POINT(1.234 5.678 15 79) - XYZM - Z and M compounds ignored - test_geometry_equals( - "01010000C05839B4C876BEF33F83C0CAA145B616400000000000002E400000000000C05340", - "POINT (1.234 5.678)"); + typedef bg::model::polygon polygon_type; + typedef bg::model::polygon polygon3d_type; - // SRID=4326;POINT(1.234 5.678 15 79) - XYZM + SRID - test_geometry_equals( - "01010000E0E61000005839B4C876BEF33F83C0CAA145B616400000000000002E400000000000C05340", - "POINT (1.234 5.678)"); + // + // POINT + // + + { + point_type point(1.0, 2.0); + + test_geometry_equals + ( + point, + "0101000000000000000000F03F0000000000000040" + ); + } + + { + point3d_type point(1.0, 2.0, 3.0); + + test_geometry_equals + ( + point, + "01E9030000000000000000F03F00000000000000400000000000000840" + ); + } + + // + // LINESTRING + // + + { + linestring_type linestring; + + bg::append(linestring, + boost::assign::list_of + (point_type(1.0, 2.0)) + (point_type(2.0, 3.0)) + (point_type(4.0, 5.0)) + ); + + test_geometry_equals + ( + linestring, + "010200000003000000000000000000F03F00000000000000400000000000000040000000000000084000000000000010400000000000001440" + ); + } + +// { +// linestring3d_type linestring; +// +// bg::append(linestring, +// boost::assign::list_of +// (point3d_type(1.0, 2.0, 3.0)) +// (point3d_type(2.0, 3.0, 4.0)) +// (point3d_type(4.0, 5.0, 6.0)) +// ); +// +// test_geometry_equals +// ( +// linestring, +// "01EA03000003000000000000000000F03F00000000000000400000000000000840000000000000004000000000000008400000000000001040000000000000104000000000000014400000000000001840" +// ); +// } + + // + // POLYGON + // + + { + polygon_type polygon; + + bg::append(polygon, + boost::assign::list_of + (point_type(50.0, 50.0)) + (point_type(50.0, 100.0)) + (point_type(100.0, 100.0)) + (point_type(100.0, 50.0)) + (point_type(50.0, 50.0)) + ); + + test_geometry_equals + ( + polygon, + "010300000001000000050000000000000000004940000000000000494000000000000049400000000000005940000000000000594000000000000059400000000000005940000000000000494000000000000049400000000000004940" + ); + } + +// { +// polygon3d_type polygon; +// +// bg::append(polygon, boost::assign::list_of(point3d_type(50.0, 50.0, 5.0))(point3d_type(50.0, 100.0, 10.0))(point3d_type(100.0, 100.0, 5.0))(point3d_type(100.0, 50.0, 10.0))(point3d_type(50.0, 50.0, 5.0))); +// +// test_geometry_equals +// ( +// polygon, +// "01EB0300000100000005000000000000000000494000000000000049400000000000001440000000000000494000000000000059400000000000002440000000000000594000000000000059400000000000001440000000000000594000000000000049400000000000002440000000000000494000000000000049400000000000001440" +// ); +// } + + { + polygon_type polygon; + + bg::append(polygon, + boost::assign::list_of + (point_type(35, 10)) + (point_type(45, 45)) + (point_type(15, 40)) + (point_type(10, 20)) + (point_type(35, 10)) + ); + + // Create an interior ring (append does not do this automatically) + boost::geometry::interior_rings(polygon).resize(1); + + bg::append(polygon, + boost::assign::list_of + (point_type(20, 30)) + (point_type(35, 35)) + (point_type(30, 20)) + (point_type(20, 30)) + , 0); + + test_geometry_equals + ( + polygon, + "0103000000020000000500000000000000008041400000000000002440000000000080464000000000008046400000000000002E40000000000000444000000000000024400000000000003440000000000080414000000000000024400400000000000000000034400000000000003E40000000000080414000000000008041400000000000003E40000000000000344000000000000034400000000000003E40" + ); + } + + } return 0; } From fb057e08328bda56c054a8c23807bf72bdfc4038 Mon Sep 17 00:00:00 2001 From: Mats Taraldsvik Date: Tue, 30 Sep 2014 14:51:22 +0200 Subject: [PATCH 31/89] [extensions][wkb] Support writing geometries to WKB format Adds support for writing geometries to WKB format. This adds support for writing point, linestring and polygon. --- .../extensions/gis/io/wkb/detail/writer.hpp | 205 ++++++++++++++++++ .../extensions/gis/io/wkb/write_wkb.hpp | 120 ++++++++++ 2 files changed, 325 insertions(+) create mode 100644 include/boost/geometry/extensions/gis/io/wkb/detail/writer.hpp create mode 100644 include/boost/geometry/extensions/gis/io/wkb/write_wkb.hpp diff --git a/include/boost/geometry/extensions/gis/io/wkb/detail/writer.hpp b/include/boost/geometry/extensions/gis/io/wkb/detail/writer.hpp new file mode 100644 index 000000000..da6f4e51e --- /dev/null +++ b/include/boost/geometry/extensions/gis/io/wkb/detail/writer.hpp @@ -0,0 +1,205 @@ +#ifndef BOOST_GEOMETRY_IO_WKB_DETAIL_WRITER_HPP +#define BOOST_GEOMETRY_IO_WKB_DETAIL_WRITER_HPP + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +namespace boost { namespace geometry +{ + +#ifndef DOXYGEN_NO_DETAIL +namespace detail { namespace wkb +{ + + template + struct value_writer + { + typedef T value_type; + + template + static bool write(const T& value, OutputIterator& iter, byte_order_type::enum_t byte_order) + { + endian::endian_value parsed_value(value); + +// if (byte_order_type::xdr == byte_order) +// { +// parsed_value.template store(iter); +// } +// else if (byte_order_type::ndr == byte_order) +// { +// parsed_value.template store(iter); +// } +// else +// { + parsed_value.template store(iter); +// } + + return true; + } + }; + + template + struct writer_assigner + { + template + static void run(const P& point, OutputIterator& iter, byte_order_type::enum_t byte_order) + { + typedef typename coordinate_type

::type coordinate_type; + + value_writer::write(boost::geometry::get(point), iter, byte_order); + + writer_assigner::run(point, iter, byte_order); + } + }; + + template + struct writer_assigner + { + template + static void run(const P& point, OutputIterator& iter, byte_order_type::enum_t byte_order) + { + // terminate + boost::ignore_unused_variable_warning(point); + boost::ignore_unused_variable_warning(iter); + boost::ignore_unused_variable_warning(byte_order); + } + }; + + template + struct point_writer + { + template + static bool write(const P& point, OutputIterator& iter, + byte_order_type::enum_t byte_order) + { + // write endian type + value_writer::write(byte_order, iter, byte_order); + + // write geometry type + uint32_t type = geometry_type

::get(); + value_writer::write(type, iter, byte_order); + + // write point's x, y, z + writer_assigner::value>::run(point, iter, byte_order); + + return true; + } + }; + + template + struct linestring_writer + { + template + static bool write(const L& linestring, OutputIterator& iter, + byte_order_type::enum_t byte_order) + { + // write endian type + value_writer::write(byte_order, iter, byte_order); + + // write geometry type + uint32_t type = geometry_type::get(); + value_writer::write(type, iter, byte_order); + + // write num points + uint32_t num_points = boost::size(linestring); + value_writer::write(num_points, iter, byte_order); + + typedef typename point_type::type point_type; + + for(boost::range_iterator::type point_iter = boost::begin(linestring); + point_iter != boost::end(linestring); + ++point_iter) + { + // write point's x, y, z + writer_assigner::value>::run(*point_iter, iter, byte_order); + } + + return true; + } + }; + + template + struct polygon_writer + { + template + static bool write(const P& polygon, OutputIterator& iter, + byte_order_type::enum_t byte_order) + { + // write endian type + value_writer::write(byte_order, iter, byte_order); + + // write geometry type + uint32_t type = geometry_type

::get(); + value_writer::write(type, iter, byte_order); + + // write num rings + uint32_t num_rings = 1 + boost::geometry::num_interior_rings(polygon); + value_writer::write(num_rings, iter, byte_order); + + typedef typename point_type

::type point_type; + + // write exterior ring + typedef typename boost::geometry::ring_type::type ring_type; + ring_type exterior_ring = boost::geometry::exterior_ring(polygon); + + uint32_t num_exterior_ring_points = boost::geometry::num_points(exterior_ring); + value_writer::write(num_exterior_ring_points, iter, byte_order); + + for(boost::range_iterator::type point_iter = boost::begin(exterior_ring); + point_iter != boost::end(exterior_ring); + ++point_iter) + { + // write point's x, y, z + writer_assigner::value>::run(*point_iter, iter, byte_order); + } + + // write interor rings + typedef typename boost::geometry::interior_type::type interior_rings_type; + + interior_rings_type interior_rings = boost::geometry::interior_rings(polygon); + + for(boost::range_iterator::type interior_ring_iter = boost::begin(interior_rings); + interior_ring_iter != boost::end(interior_rings); + ++interior_ring_iter) + { + uint32_t num_interior_ring_points = boost::geometry::num_points(*interior_ring_iter); + value_writer::write(num_interior_ring_points, iter, byte_order); + + for(boost::range_iterator::type point_iter = boost::begin(*interior_ring_iter); + point_iter != boost::end(*interior_ring_iter); + ++point_iter) + { + // write point's x, y, z + writer_assigner::value>::run(*point_iter, iter, byte_order); + } + } + + return true; + } + }; + +}} // namespace detail::wkb +#endif // DOXYGEN_NO_IMPL + +}} // namespace boost::geometry +#endif // BOOST_GEOMETRY_IO_WKB_DETAIL_WRITER_HPP diff --git a/include/boost/geometry/extensions/gis/io/wkb/write_wkb.hpp b/include/boost/geometry/extensions/gis/io/wkb/write_wkb.hpp new file mode 100644 index 000000000..189484f17 --- /dev/null +++ b/include/boost/geometry/extensions/gis/io/wkb/write_wkb.hpp @@ -0,0 +1,120 @@ +#ifndef BOOST_GEOMETRY_IO_WKB_WRITE_WKB_HPP +#define BOOST_GEOMETRY_IO_WKB_WRITE_WKB_HPP + +#include + +#include +#include + +#include +#include + +namespace boost { namespace geometry +{ + +#ifndef DOXYGEN_NO_DISPATCH +namespace dispatch +{ + +template +struct write_wkb +{ +}; + +template +struct write_wkb +{ + template + static inline bool write(const G& geometry, OutputIterator& iter, + detail::wkb::byte_order_type::enum_t byte_order) + { + return detail::wkb::point_writer::write(geometry, iter, byte_order); + } +}; + +template +struct write_wkb +{ + template + static inline bool write(const G& geometry, OutputIterator& iter, + detail::wkb::byte_order_type::enum_t byte_order) + { + return detail::wkb::linestring_writer::write(geometry, iter, byte_order); + } +}; + +template +struct write_wkb +{ + template + static inline bool write(const G& geometry, OutputIterator& iter, + detail::wkb::byte_order_type::enum_t byte_order) + { + return detail::wkb::polygon_writer::write(geometry, iter, byte_order); + } +}; + +} // namespace dispatch +#endif // DOXYGEN_NO_DISPATCH + +template +inline bool write_wkb(const G& geometry, OutputIterator& iter) +{ + // The WKB is written to an OutputIterator. + BOOST_STATIC_ASSERT(( + boost::is_convertible + < + typename std::iterator_traits::iterator_category, + const std::output_iterator_tag& + >::value)); + +// Will write in the native byte order +#ifdef BOOST_BIG_ENDIAN + detail::wkb::byte_order_type::enum_t byte_order = detail::wkb::byte_order_type::xdr; +#else + detail::wkb::byte_order_type::enum_t byte_order = detail::wkb::byte_order_type::ndr; +#endif + + if + (!dispatch::write_wkb + < + typename tag::type, + G + >::write(geometry, iter, byte_order)) + { + return false; + } + + return true; +} + +// template +// inline bool write_wkb(G& geometry, OutputIterator iter, +// detail::wkb::byte_order_type::enum_t source_byte_order, +// detail::wkb::byte_order_type::enum_t target_byte_order) +// { +// // The WKB is written to an OutputIterator. +// BOOST_STATIC_ASSERT(( +// boost::is_convertible +// < +// typename std::iterator_traits::iterator_category, +// const std::output_iterator_tag& +// >::value)); +// +// if +// ( +// !dispatch::write_wkb +// < +// typename tag::type, +// G +// >::write(geometry, iter, byte_order) +// ) +// { +// return false; +// } +// +// return true; +// } + +}} // namespace boost::geometry +#endif // BOOST_GEOMETRY_IO_WKB_WRITE_WKB_HPP From 56365cbec8c4d9385ddb4d2defd956487522e6c6 Mon Sep 17 00:00:00 2001 From: Mats Taraldsvik Date: Tue, 30 Sep 2014 14:53:03 +0200 Subject: [PATCH 32/89] [extensions][test] Tests for writing wkb Adds tests for writing point, linestring and polygon. --- extensions/test/gis/io/wkb/write_wkb.cpp | 195 +++++++++++++++++++++++ 1 file changed, 195 insertions(+) create mode 100644 extensions/test/gis/io/wkb/write_wkb.cpp diff --git a/extensions/test/gis/io/wkb/write_wkb.cpp b/extensions/test/gis/io/wkb/write_wkb.cpp new file mode 100644 index 000000000..3b71c0f17 --- /dev/null +++ b/extensions/test/gis/io/wkb/write_wkb.cpp @@ -0,0 +1,195 @@ +// Boost.Geometry (aka GGL, Generic Geometry Library) +// Unit Test + +// Copyright (c) 2009-2012 Mateusz Loskot, London, UK. + +// Use, modification and distribution is subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include +#include +#include + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include + +#include +#include + +namespace bg = boost::geometry; + +namespace { // anonymous + +template +void test_geometry_equals(Geometry const& geometry, std::string const& wkbhex) +{ + std::string wkb_out; + bg::write_wkb(geometry, std::back_inserter(wkb_out)); + + std::string hex_out; + BOOST_CHECK( bg::wkb2hex(wkb_out.begin(), wkb_out.end(), hex_out) ); + + BOOST_CHECK_EQUAL( wkbhex, hex_out); +} + +} // namespace anonymous + +int test_main(int, char* []) +{ + typedef bg::model::point point_type; + typedef bg::model::point point3d_type; + typedef bg::model::linestring linestring_type; + typedef bg::model::linestring linestring3d_type; + typedef bg::model::polygon polygon_type; + typedef bg::model::polygon polygon3d_type; + + // + // POINT + // + + { + point_type point(1.0, 2.0); + + test_geometry_equals + ( + point, + "0101000000000000000000F03F0000000000000040" + ); + } + + { + point3d_type point(1.0, 2.0, 3.0); + + test_geometry_equals + ( + point, + "01E9030000000000000000F03F00000000000000400000000000000840" + ); + } + + // + // LINESTRING + // + + { + linestring_type linestring; + + bg::append(linestring, + boost::assign::list_of + (point_type(1.0, 2.0)) + (point_type(2.0, 3.0)) + (point_type(4.0, 5.0)) + ); + + test_geometry_equals + ( + linestring, + "010200000003000000000000000000F03F00000000000000400000000000000040000000000000084000000000000010400000000000001440" + ); + } + + { + linestring3d_type linestring; + + bg::append(linestring, + boost::assign::list_of + (point3d_type(1.0, 2.0, 3.0)) + (point3d_type(2.0, 3.0, 4.0)) + (point3d_type(4.0, 5.0, 6.0)) + ); + + test_geometry_equals + ( + linestring, + "01EA03000003000000000000000000F03F00000000000000400000000000000840000000000000004000000000000008400000000000001040000000000000104000000000000014400000000000001840" + ); + } + + // + // POLYGON + // + + { + polygon_type polygon; + + bg::append(polygon, + boost::assign::list_of + (point_type(50.0, 50.0)) + (point_type(50.0, 100.0)) + (point_type(100.0, 100.0)) + (point_type(100.0, 50.0)) + (point_type(50.0, 50.0)) + ); + + test_geometry_equals + ( + polygon, + "010300000001000000050000000000000000004940000000000000494000000000000049400000000000005940000000000000594000000000000059400000000000005940000000000000494000000000000049400000000000004940" + ); + } + + { + polygon3d_type polygon; + + bg::append(polygon, + boost::assign::list_of + (point3d_type(50.0, 50.0, 5.0)) + (point3d_type(50.0, 100.0, 10.0)) + (point3d_type(100.0, 100.0, 5.0)) + (point3d_type(100.0, 50.0, 10.0)) + (point3d_type(50.0, 50.0, 5.0)) + ); + + test_geometry_equals + ( + polygon, + "01EB0300000100000005000000000000000000494000000000000049400000000000001440000000000000494000000000000059400000000000002440000000000000594000000000000059400000000000001440000000000000594000000000000049400000000000002440000000000000494000000000000049400000000000001440" + ); + } + + { + polygon_type polygon; + + bg::append(polygon, + boost::assign::list_of + (point_type(35, 10)) + (point_type(45, 45)) + (point_type(15, 40)) + (point_type(10, 20)) + (point_type(35, 10)) + ); + + // Create an interior ring (append does not do this automatically) + boost::geometry::interior_rings(polygon).resize(1); + + bg::append(polygon, + boost::assign::list_of + (point_type(20, 30)) + (point_type(35, 35)) + (point_type(30, 20)) + (point_type(20, 30)) + , 0); + + test_geometry_equals + ( + polygon, + "0103000000020000000500000000000000008041400000000000002440000000000080464000000000008046400000000000002E40000000000000444000000000000024400000000000003440000000000080414000000000000024400400000000000000000034400000000000003E40000000000080414000000000008041400000000000003E40000000000000344000000000000034400000000000003E40" + ); + } + + return 0; +} From 7bd759dd0bbee4eb8e9b33ce265fc7c3208b7ef9 Mon Sep 17 00:00:00 2001 From: Menelaos Karavelas Date: Thu, 23 Apr 2015 10:04:50 +0300 Subject: [PATCH 33/89] [algorithms][disjoint] replace detail::disjoint::disjoint_point_segment by detail::disjoint::reverse_covered_by --- .../detail/disjoint/point_geometry.hpp | 22 ++----------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/include/boost/geometry/algorithms/detail/disjoint/point_geometry.hpp b/include/boost/geometry/algorithms/detail/disjoint/point_geometry.hpp index 9064905f2..9ae43f73d 100644 --- a/include/boost/geometry/algorithms/detail/disjoint/point_geometry.hpp +++ b/include/boost/geometry/algorithms/detail/disjoint/point_geometry.hpp @@ -21,8 +21,6 @@ #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_DISJOINT_POINT_GEOMETRY_HPP #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_DISJOINT_POINT_GEOMETRY_HPP -#include - #include #include @@ -39,29 +37,13 @@ namespace detail { namespace disjoint { -struct disjoint_point_segment -{ - template - static inline bool apply(Point const& point, Segment const& segment) - { - typedef geometry::model::referring_segment other_segment; - - other_segment other(point, point); - return disjoint_segment - < - Segment, other_segment - >::apply(segment, other); - } -}; - - struct reverse_covered_by { template static inline bool apply(Geometry1 const& geometry1, Geometry2 const& geometry2) { - return !geometry::covered_by(geometry1, geometry2); + return ! geometry::covered_by(geometry1, geometry2); } }; @@ -91,7 +73,7 @@ struct disjoint template struct disjoint - : detail::disjoint::disjoint_point_segment + : detail::disjoint::reverse_covered_by {}; From caf2dc7951dc65e026025b14b3f113e0f3c60153 Mon Sep 17 00:00:00 2001 From: Menelaos Karavelas Date: Thu, 23 Apr 2015 10:06:00 +0300 Subject: [PATCH 34/89] [test][algorithms][disjoint] add a few more test cases for disjoint(point, segment) --- .../disjoint/disjoint_coverage.cpp | 35 +++++++++++++++++-- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/test/algorithms/relational_operations/disjoint/disjoint_coverage.cpp b/test/algorithms/relational_operations/disjoint/disjoint_coverage.cpp index b65f67d9b..d0d6bdc40 100644 --- a/test/algorithms/relational_operations/disjoint/disjoint_coverage.cpp +++ b/test/algorithms/relational_operations/disjoint/disjoint_coverage.cpp @@ -158,24 +158,53 @@ inline void test_point_segment() false); tester::apply("p-s-02", - from_wkt

("POINT(1 0)"), + from_wkt

("POINT(2 0)"), from_wkt("SEGMENT(0 0,2 0)"), false); tester::apply("p-s-03", + from_wkt

("POINT(1 0)"), + from_wkt("SEGMENT(0 0,2 0)"), + false); + + tester::apply("p-s-04", from_wkt

("POINT(1 1)"), from_wkt("SEGMENT(0 0,2 0)"), true); - tester::apply("p-s-04", + tester::apply("p-s-05", from_wkt

("POINT(3 0)"), from_wkt("SEGMENT(0 0,2 0)"), true); - tester::apply("p-s-05", + tester::apply("p-s-06", from_wkt

("POINT(-1 0)"), from_wkt("SEGMENT(0 0,2 0)"), true); + + // degenerate segment + tester::apply("p-s-07", + from_wkt

("POINT(-1 0)"), + from_wkt("SEGMENT(2 0,2 0)"), + true); + + // degenerate segment + tester::apply("p-s-08", + from_wkt

("POINT(2 0)"), + from_wkt("SEGMENT(2 0,2 0)"), + false); + + // degenerate segment + tester::apply("p-s-09", + from_wkt

("POINT(3 0)"), + from_wkt("SEGMENT(2 0,2 0)"), + true); + + // degenerate segment + tester::apply("p-s-10", + from_wkt

("POINT(1 1)"), + from_wkt("SEGMENT(2 0,2 0)"), + true); } template From 07b96a8f9e6a605e9cfe9d6e89a620e87dcf6e4b Mon Sep 17 00:00:00 2001 From: Menelaos Karavelas Date: Thu, 23 Apr 2015 10:15:24 +0300 Subject: [PATCH 35/89] [algorithms][overlay P/L] replace detail::disjoint::disjoint_point_segment by detail::disjoint::reverse_covered_by --- .../geometry/algorithms/detail/overlay/pointlike_linear.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/boost/geometry/algorithms/detail/overlay/pointlike_linear.hpp b/include/boost/geometry/algorithms/detail/overlay/pointlike_linear.hpp index ad8756473..bb42b4232 100644 --- a/include/boost/geometry/algorithms/detail/overlay/pointlike_linear.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/pointlike_linear.hpp @@ -293,7 +293,7 @@ struct pointlike_linear_point > : detail::overlay::point_linear_point < Point, Segment, PointOut, OverlayType, - detail::not_ + detail::not_ > {}; @@ -311,7 +311,7 @@ struct pointlike_linear_point > : detail::overlay::multipoint_linear_point < MultiPoint, Linear, PointOut, OverlayType, - detail::not_ + detail::not_ > {}; @@ -329,7 +329,7 @@ struct pointlike_linear_point > : detail::overlay::multipoint_segment_point < MultiPoint, Segment, PointOut, OverlayType, - detail::not_ + detail::not_ > {}; From 9bc8baaa3b3fffc96fbb0abd10a8cb025e68f076 Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Thu, 23 Apr 2015 17:42:53 +0200 Subject: [PATCH 36/89] [extensions][test] Enable io/wkb testing, replace uses of cout with Test macros. --- extensions/test/gis/io/Jamfile.v2 | 13 +++++++++++++ extensions/test/gis/io/wkb/Jamfile.v2 | 17 +++++++++++++++++ extensions/test/gis/io/wkb/read_wkb.cpp | 15 +++++---------- 3 files changed, 35 insertions(+), 10 deletions(-) create mode 100644 extensions/test/gis/io/Jamfile.v2 create mode 100644 extensions/test/gis/io/wkb/Jamfile.v2 diff --git a/extensions/test/gis/io/Jamfile.v2 b/extensions/test/gis/io/Jamfile.v2 new file mode 100644 index 000000000..7ca605b7b --- /dev/null +++ b/extensions/test/gis/io/Jamfile.v2 @@ -0,0 +1,13 @@ +# Boost.Geometry (aka GGL, Generic Geometry Library) +# +# Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. +# Copyright (c) 2008-2012 Bruno Lalande, Paris, France. +# Copyright (c) 2009-2012 Mateusz Loskot, London, UK. +# Copyright (c) 2015 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 +# http://www.boost.org/LICENSE_1_0.txt) + +build-project wkb ; + diff --git a/extensions/test/gis/io/wkb/Jamfile.v2 b/extensions/test/gis/io/wkb/Jamfile.v2 new file mode 100644 index 000000000..1d9c6870e --- /dev/null +++ b/extensions/test/gis/io/wkb/Jamfile.v2 @@ -0,0 +1,17 @@ +# Boost.Geometry (aka GGL, Generic Geometry Library) +# +# Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. +# Copyright (c) 2008-2012 Bruno Lalande, Paris, France. +# Copyright (c) 2009-2012 Mateusz Loskot, London, UK. +# Copyright (c) 2015 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 +# http://www.boost.org/LICENSE_1_0.txt) + +test-suite boost-geometry-extensions-gis-io-wkb + : + [ run read_wkb.cpp ] + [ run write_wkb.cpp ] + ; + diff --git a/extensions/test/gis/io/wkb/read_wkb.cpp b/extensions/test/gis/io/wkb/read_wkb.cpp index c5b13bfb8..4f58be77c 100644 --- a/extensions/test/gis/io/wkb/read_wkb.cpp +++ b/extensions/test/gis/io/wkb/read_wkb.cpp @@ -11,8 +11,6 @@ #include #include -#include - #include #include #include @@ -41,7 +39,7 @@ void test_geometry_wrong_wkb(std::string const& wkbhex, std::string const& wkt) byte_vector wkb; BOOST_CHECK( bg::hex2wkb(wkbhex, std::back_inserter(wkb)) ); Geometry g_wkb; - std::cout << bg::read_wkb(wkb.begin(), wkb.end(), g_wkb) << std::endl; + BOOST_MESSAGE("read_wkb: " << bg::read_wkb(wkb.begin(), wkb.end(), g_wkb)); } template @@ -67,13 +65,10 @@ void test_geometry_equals(Geometry const& g_expected, std::string const& wkbhex) Geometry g_wkb; bg::read_wkb(wkb.begin(), wkb.end(), g_wkb); - BOOST_CHECK( bg::equals(g_wkb, g_expected) == IsEqual ); - - if(bg::equals(g_wkb, g_expected) != IsEqual) - { - std::cout << "EXPECTED: " << bg::wkt(g_expected) << std::endl; - std::cout << "ACTUAL : " << bg::wkt(g_wkb) << std::endl; - } + BOOST_CHECK_MESSAGE( bg::equals(g_wkb, g_expected) == IsEqual, + "{bg::equals(g_wkb, g_expected) == IsEqual} failed for" << + " EXPECTED: " << bg::wkt(g_expected) << + ", ACTUAL : " << bg::wkt(g_wkb) ); } //template From 0882d5adfc8fa5d9da954fd773c1b6bb892e8715 Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Thu, 23 Apr 2015 19:27:02 +0200 Subject: [PATCH 37/89] [projections] ONLY: fixed withspace --- .../extensions/gis/projections/proj/aea.hpp | 12 +- .../extensions/gis/projections/proj/aeqd.hpp | 24 ++-- .../extensions/gis/projections/proj/airy.hpp | 10 +- .../gis/projections/proj/aitoff.hpp | 10 +- .../gis/projections/proj/august.hpp | 2 +- .../extensions/gis/projections/proj/bacon.hpp | 2 +- .../extensions/gis/projections/proj/bipc.hpp | 12 +- .../extensions/gis/projections/proj/boggs.hpp | 2 +- .../extensions/gis/projections/proj/bonne.hpp | 8 +- .../extensions/gis/projections/proj/cass.hpp | 2 +- .../extensions/gis/projections/proj/cea.hpp | 2 +- .../extensions/gis/projections/proj/chamb.hpp | 4 +- .../extensions/gis/projections/proj/eck4.hpp | 4 +- .../extensions/gis/projections/proj/eqdc.hpp | 4 +- .../gis/projections/proj/fouc_s.hpp | 4 +- .../gis/projections/proj/geocent.hpp | 9 +- .../extensions/gis/projections/proj/geos.hpp | 12 +- .../extensions/gis/projections/proj/gins8.hpp | 2 +- .../gis/projections/proj/gn_sinu.hpp | 8 +- .../extensions/gis/projections/proj/gnom.hpp | 4 +- .../gis/projections/proj/gstmerc.hpp | 2 +- .../gis/projections/proj/hammer.hpp | 2 +- .../gis/projections/proj/hatano.hpp | 4 +- .../extensions/gis/projections/proj/imw_p.hpp | 14 +-- .../gis/projections/proj/krovak.hpp | 119 +++++++++--------- .../extensions/gis/projections/proj/labrd.hpp | 4 +- .../extensions/gis/projections/proj/laea.hpp | 10 +- .../gis/projections/proj/lagrng.hpp | 2 +- .../extensions/gis/projections/proj/lask.hpp | 2 +- .../gis/projections/proj/latlong.hpp | 8 +- .../extensions/gis/projections/proj/lcca.hpp | 8 +- .../extensions/gis/projections/proj/lsat.hpp | 16 +-- .../gis/projections/proj/mbt_fps.hpp | 4 +- .../gis/projections/proj/mbtfpq.hpp | 4 +- .../gis/projections/proj/mod_ster.hpp | 8 +- .../extensions/gis/projections/proj/moll.hpp | 2 +- .../extensions/gis/projections/proj/nell.hpp | 2 +- .../gis/projections/proj/nell_h.hpp | 2 +- .../extensions/gis/projections/proj/nocol.hpp | 2 +- .../extensions/gis/projections/proj/nsper.hpp | 8 +- .../extensions/gis/projections/proj/nzmg.hpp | 12 +- .../gis/projections/proj/ob_tran.hpp | 22 ++-- .../extensions/gis/projections/proj/ocea.hpp | 4 +- .../extensions/gis/projections/proj/oea.hpp | 4 +- .../extensions/gis/projections/proj/omerc.hpp | 12 +- .../extensions/gis/projections/proj/ortho.hpp | 8 +- .../extensions/gis/projections/proj/poly.hpp | 8 +- .../extensions/gis/projections/proj/putp2.hpp | 4 +- .../extensions/gis/projections/proj/putp6.hpp | 4 +- .../extensions/gis/projections/proj/robin.hpp | 10 +- .../extensions/gis/projections/proj/rouss.hpp | 6 +- .../extensions/gis/projections/proj/rpoly.hpp | 2 +- .../gis/projections/proj/sconics.hpp | 7 +- .../gis/projections/proj/somerc.hpp | 4 +- .../extensions/gis/projections/proj/stere.hpp | 10 +- .../gis/projections/proj/sterea.hpp | 11 +- .../extensions/gis/projections/proj/sts.hpp | 4 +- .../extensions/gis/projections/proj/tcc.hpp | 2 +- .../extensions/gis/projections/proj/tcea.hpp | 2 +- .../extensions/gis/projections/proj/tmerc.hpp | 24 ++-- .../extensions/gis/projections/proj/tpeqd.hpp | 4 +- .../extensions/gis/projections/proj/urm5.hpp | 2 +- .../extensions/gis/projections/proj/vandg.hpp | 4 +- .../gis/projections/proj/vandg2.hpp | 2 +- .../gis/projections/proj/vandg4.hpp | 2 +- .../extensions/gis/projections/proj/wag7.hpp | 2 +- .../extensions/gis/projections/proj/wink2.hpp | 2 +- 67 files changed, 266 insertions(+), 272 deletions(-) diff --git a/include/boost/geometry/extensions/gis/projections/proj/aea.hpp b/include/boost/geometry/extensions/gis/projections/proj/aea.hpp index c5fd8298b..5a75e1b69 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/aea.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/aea.hpp @@ -72,17 +72,17 @@ namespace boost { namespace geometry { namespace projections double en[EN_SIZE]; int ellips; }; - - - - - + + + + + /* determine latitude angle phi-1 */ inline double phi1_(double qs, double Te, double Tone_es) { int i; double Phi, sinpi, cospi, con, com, dphi; - + Phi = asin (.5 * qs); if (Te < EPSILON) return( Phi ); diff --git a/include/boost/geometry/extensions/gis/projections/proj/aeqd.hpp b/include/boost/geometry/extensions/gis/projections/proj/aeqd.hpp index 5e240ee1a..ca4f10062 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/aeqd.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/aeqd.hpp @@ -68,11 +68,11 @@ namespace boost { namespace geometry { namespace projections double G; int mode; }; - - - - - + + + + + // template class, using CRTP to implement forward/inverse template @@ -92,7 +92,7 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double coslam, cosphi, sinphi, rho, s, H, H2, c, Az, t, ct, st, cA, sA; - + coslam = cos(lp_lon); cosphi = cos(lp_lat); sinphi = sin(lp_lat); @@ -133,7 +133,7 @@ namespace boost { namespace geometry { namespace projections inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const { double c, Az, cosAz, A, B, D, E, F, psi, t; - + if ((c = boost::math::hypot(xy_x, xy_y)) < EPS10) { lp_lat = this->m_par.phi0; lp_lon = 0.; @@ -183,7 +183,7 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double cosphi, sinphi, t; - + cosphi = cos(lp_lat); sinphi = sin(lp_lat); t = 1. / sqrt(1. - this->m_par.es * sinphi * sinphi); @@ -196,7 +196,7 @@ namespace boost { namespace geometry { namespace projections { double x2, t; int i; - + x2 = 0.5 * xy_x * xy_x; lp_lat = this->m_par.phi0; for (i = 0; i < 3; ++i) { @@ -226,7 +226,7 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double coslam, cosphi, sinphi; - + sinphi = sin(lp_lat); cosphi = cos(lp_lat); coslam = cos(lp_lon); @@ -239,7 +239,7 @@ namespace boost { namespace geometry { namespace projections oblcon: if (fabs(fabs(xy_y) - 1.) < TOL) if (xy_y < 0.) - throw proj_exception(); + throw proj_exception(); else xy_x = xy_y = 0.; else { @@ -264,7 +264,7 @@ namespace boost { namespace geometry { namespace projections inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const { double cosc, c_rh, sinc; - + if ((c_rh = boost::math::hypot(xy_x, xy_y)) > PI) { if (c_rh - EPS10 > PI) throw proj_exception();; c_rh = PI; diff --git a/include/boost/geometry/extensions/gis/projections/proj/airy.hpp b/include/boost/geometry/extensions/gis/projections/proj/airy.hpp index 03292e8d9..ae8ef817f 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/airy.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/airy.hpp @@ -61,10 +61,10 @@ namespace boost { namespace geometry { namespace projections int mode; int no_cut; /* do not cut at hemisphere limit */ }; - - - - + + + + // template class, using CRTP to implement forward/inverse template @@ -84,7 +84,7 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double sinlam, coslam, cosphi, sinphi, t, s, Krho, cosz; - + sinlam = sin(lp_lon); coslam = cos(lp_lon); switch (this->m_proj_parm.mode) { diff --git a/include/boost/geometry/extensions/gis/projections/proj/aitoff.hpp b/include/boost/geometry/extensions/gis/projections/proj/aitoff.hpp index b20ca3fcb..43002fc01 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/aitoff.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/aitoff.hpp @@ -53,10 +53,10 @@ namespace boost { namespace geometry { namespace projections double cosphi1; int mode; }; - - - - + + + + // template class, using CRTP to implement forward/inverse template @@ -76,7 +76,7 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double c, d; - + if((d = acos(cos(lp_lat) * cos(c = 0.5 * lp_lon)))) {/* basic Aitoff */ xy_x = 2. * d * cos(lp_lat) * sin(c) * (xy_y = 1. / sin(d)); xy_y *= d * sin(lp_lat); diff --git a/include/boost/geometry/extensions/gis/projections/proj/august.hpp b/include/boost/geometry/extensions/gis/projections/proj/august.hpp index fc3f40c97..0dcabbd57 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/august.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/august.hpp @@ -66,7 +66,7 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double t, c1, c, x1, x12, y1, y12; - + t = tan(.5 * lp_lat); c1 = sqrt(1. - t * t); c = 1. + c1 * cos(lp_lon *= .5); diff --git a/include/boost/geometry/extensions/gis/projections/proj/bacon.hpp b/include/boost/geometry/extensions/gis/projections/proj/bacon.hpp index 92625e3ba..329e0a078 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/bacon.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/bacon.hpp @@ -73,7 +73,7 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double ax, f; - + xy_y = this->m_proj_parm.bacn ? HALFPI * sin(lp_lat) : lp_lat; if ((ax = fabs(lp_lon)) >= EPS) { if (this->m_proj_parm.ortl && ax >= HALFPI) diff --git a/include/boost/geometry/extensions/gis/projections/proj/bipc.hpp b/include/boost/geometry/extensions/gis/projections/proj/bipc.hpp index 5ed8bb7a8..86b61fe19 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/bipc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/bipc.hpp @@ -90,7 +90,7 @@ namespace boost { namespace geometry { namespace projections { double cphi, sphi, tphi, t, al, Az, z, Av, cdlam, sdlam, r; int tag; - + cphi = cos(lp_lat); sphi = sin(lp_lat); cdlam = cos(sdlam = lamB - lp_lon); @@ -140,8 +140,8 @@ namespace boost { namespace geometry { namespace projections xy_y += (tag ? -r : r) * cos(t); if (this->m_proj_parm.noskew) { t = xy_x; - xy_x = -xy_x * cAzc - xy_y * sAzc; - xy_y = -xy_y * cAzc + t * sAzc; + xy_x = -xy_x * cAzc - xy_y * sAzc; + xy_y = -xy_y * cAzc + t * sAzc; } } @@ -149,11 +149,11 @@ namespace boost { namespace geometry { namespace projections { double t, r, rp, rl, al, z, fAz, Az, s, c, Av; int neg, i; - + if (this->m_proj_parm.noskew) { t = xy_x; - xy_x = -xy_x * cAzc + xy_y * sAzc; - xy_y = -xy_y * cAzc - t * sAzc; + xy_x = -xy_x * cAzc + xy_y * sAzc; + xy_y = -xy_y * cAzc - t * sAzc; } if( (neg = (xy_x < 0.)) ) { xy_y = rhoc - xy_y; diff --git a/include/boost/geometry/extensions/gis/projections/proj/boggs.hpp b/include/boost/geometry/extensions/gis/projections/proj/boggs.hpp index 629c7ad09..4ac7b53f7 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/boggs.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/boggs.hpp @@ -73,7 +73,7 @@ namespace boost { namespace geometry { namespace projections { double theta, th1, c; int i; - + theta = lp_lat; if (fabs(fabs(lp_lat) - HALFPI) < EPS) xy_x = 0.; diff --git a/include/boost/geometry/extensions/gis/projections/proj/bonne.hpp b/include/boost/geometry/extensions/gis/projections/proj/bonne.hpp index 0a05602e3..d95f9a935 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/bonne.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/bonne.hpp @@ -76,7 +76,7 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double rh, E, c; - + rh = this->m_proj_parm.am1 + this->m_proj_parm.m1 - pj_mlfn(lp_lat, E = sin(lp_lat), c = cos(lp_lat), this->m_proj_parm.en); E = c * lp_lon / (rh * sqrt(1. - this->m_par.es * E * E)); xy_x = rh * sin(E); @@ -86,7 +86,7 @@ namespace boost { namespace geometry { namespace projections inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const { double s, rh; - + rh = boost::math::hypot(xy_x, xy_y = this->m_proj_parm.am1 - xy_y); lp_lat = pj_inv_mlfn(this->m_proj_parm.am1 + this->m_proj_parm.m1 - rh, this->m_par.es, this->m_proj_parm.en); if ((s = fabs(lp_lat)) < HALFPI) { @@ -117,7 +117,7 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double E, rh; - + rh = this->m_proj_parm.cphi1 + this->m_proj_parm.phi1 - lp_lat; if (fabs(rh) > EPS10) { xy_x = rh * sin(E = lp_lon * cos(lp_lat) / rh); @@ -129,7 +129,7 @@ namespace boost { namespace geometry { namespace projections inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const { double rh; - + rh = boost::math::hypot(xy_x, xy_y = this->m_proj_parm.cphi1 - xy_y); lp_lat = this->m_proj_parm.cphi1 + this->m_proj_parm.phi1 - rh; if (fabs(lp_lat) > HALFPI) throw proj_exception();; diff --git a/include/boost/geometry/extensions/gis/projections/proj/cass.hpp b/include/boost/geometry/extensions/gis/projections/proj/cass.hpp index 697dd6b99..6bc53efdc 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/cass.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/cass.hpp @@ -103,7 +103,7 @@ namespace boost { namespace geometry { namespace projections inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const { double ph1; - + ph1 = pj_inv_mlfn(this->m_proj_parm.m0 + xy_y, this->m_par.es, this->m_proj_parm.en); this->m_proj_parm.tn = tan(ph1); this->m_proj_parm.t = this->m_proj_parm.tn * this->m_proj_parm.tn; this->m_proj_parm.n = sin(ph1); diff --git a/include/boost/geometry/extensions/gis/projections/proj/cea.hpp b/include/boost/geometry/extensions/gis/projections/proj/cea.hpp index 4f7594bdc..e6fdd43e9 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/cea.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/cea.hpp @@ -108,7 +108,7 @@ namespace boost { namespace geometry { namespace projections inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const { double t; - + if ((t = fabs(xy_y *= this->m_par.k0)) - EPS <= 1.) { if (t >= 1.) lp_lat = xy_y < 0. ? -HALFPI : HALFPI; diff --git a/include/boost/geometry/extensions/gis/projections/proj/chamb.hpp b/include/boost/geometry/extensions/gis/projections/proj/chamb.hpp index c62bb92f7..e00e552db 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/chamb.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/chamb.hpp @@ -71,7 +71,7 @@ namespace boost { namespace geometry { namespace projections vect(double dphi, double c1, double s1, double c2, double s2, double dlam) { VECT v; double cdl, dp, dl; - + cdl = cos(dlam); if (fabs(dphi) > 1. || fabs(dlam) > 1.) v.r = aacos(s1 * s2 + c1 * c2 * cdl); @@ -111,7 +111,7 @@ namespace boost { namespace geometry { namespace projections double sinphi, cosphi, a; VECT v[3]; int i, j; - + sinphi = sin(lp_lat); cosphi = cos(lp_lat); for (i = 0; i < 3; ++i) { /* dist/azimiths from control */ diff --git a/include/boost/geometry/extensions/gis/projections/proj/eck4.hpp b/include/boost/geometry/extensions/gis/projections/proj/eck4.hpp index 9c00ffbbb..ef2b1d6c2 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/eck4.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/eck4.hpp @@ -73,7 +73,7 @@ namespace boost { namespace geometry { namespace projections { double p, V, s, c; int i; - + p = C_p * sin(lp_lat); V = lp_lat * lp_lat; lp_lat *= 0.895168 + V * ( 0.0218849 + V * 0.00826809 ); @@ -97,7 +97,7 @@ namespace boost { namespace geometry { namespace projections inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const { double c; - + lp_lat = aasin(xy_y / C_y); lp_lon = xy_x / (C_x * (1. + (c = cos(lp_lat)))); lp_lat = aasin((lp_lat + sin(lp_lat) * (c + 2.)) / C_p); diff --git a/include/boost/geometry/extensions/gis/projections/proj/eqdc.hpp b/include/boost/geometry/extensions/gis/projections/proj/eqdc.hpp index 6649ab3b7..54a791a6a 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/eqdc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/eqdc.hpp @@ -107,7 +107,7 @@ namespace boost { namespace geometry { namespace projections inline void fac(Geographic lp, Factors &fac) const { double sinphi, cosphi; - + sinphi = sin(lp_lat); cosphi = cos(lp_lat); this->m_fac.code |= IS_ANAL_HK; @@ -128,7 +128,7 @@ namespace boost { namespace geometry { namespace projections proj_parm.phi2 = pj_param(par.params, "rlat_2").f; if (fabs(proj_parm.phi1 + proj_parm.phi2) < EPS10) throw proj_exception(-21); pj_enfn(par.es, proj_parm.en); - + proj_parm.n = sinphi = sin(proj_parm.phi1); cosphi = cos(proj_parm.phi1); secant = fabs(proj_parm.phi1 - proj_parm.phi2) >= EPS10; diff --git a/include/boost/geometry/extensions/gis/projections/proj/fouc_s.hpp b/include/boost/geometry/extensions/gis/projections/proj/fouc_s.hpp index 32288980d..d756116d3 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/fouc_s.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/fouc_s.hpp @@ -72,7 +72,7 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double t; - + t = cos(lp_lat); xy_x = lp_lon * t / (this->m_proj_parm.n + this->m_proj_parm.n1 * t); xy_y = this->m_proj_parm.n * lp_lat + this->m_proj_parm.n1 * sin(lp_lat); @@ -82,7 +82,7 @@ namespace boost { namespace geometry { namespace projections { double V; int i; - + if (this->m_proj_parm.n) { lp_lat = xy_y; for (i = MAX_ITER; i ; --i) { diff --git a/include/boost/geometry/extensions/gis/projections/proj/geocent.hpp b/include/boost/geometry/extensions/gis/projections/proj/geocent.hpp index 989b70507..4ed2e2bf5 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/geocent.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/geocent.hpp @@ -47,10 +47,10 @@ namespace boost { namespace geometry { namespace projections #ifndef DOXYGEN_NO_DETAIL namespace detail { namespace geocent{ - - - - + + + + // template class, using CRTP to implement forward/inverse template @@ -84,7 +84,6 @@ namespace boost { namespace geometry { namespace projections void setup_geocent(Parameters& par) { par.is_geocent = 1; - par.x0 = 0.0; par.y0 = 0.0; // par.inv = inverse; diff --git a/include/boost/geometry/extensions/gis/projections/proj/geos.hpp b/include/boost/geometry/extensions/gis/projections/proj/geos.hpp index 8795faad0..f4d5948bb 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/geos.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/geos.hpp @@ -59,8 +59,8 @@ namespace boost { namespace geometry { namespace projections std::string sweep_axis; int flip_axis; }; - - + + // template class, using CRTP to implement forward/inverse template @@ -80,7 +80,7 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double r, Vx, Vy, Vz, tmp; - + /* Calculation of geocentric latitude. */ lp_lat = atan (this->m_proj_parm.radius_p2 * tan (lp_lat)); /* Calculation of the three components of the vector from satellite to @@ -109,7 +109,7 @@ namespace boost { namespace geometry { namespace projections inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const { double Vx, Vy, Vz, a, b, det, k; - + /* Setting three components of vector from satellite to position.*/ Vx = -1.0; if(this->m_proj_parm.flip_axis) @@ -157,7 +157,7 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double Vx, Vy, Vz, tmp; - + /* Calculation of the three components of the vector from satellite to ** position on earth surface (lon,lat).*/ tmp = cos(lp_lat); @@ -183,7 +183,7 @@ namespace boost { namespace geometry { namespace projections inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const { double Vx, Vy, Vz, a, b, det, k; - + /* Setting three components of vector from satellite to position.*/ Vx = -1.0; if(this->m_proj_parm.flip_axis) diff --git a/include/boost/geometry/extensions/gis/projections/proj/gins8.hpp b/include/boost/geometry/extensions/gis/projections/proj/gins8.hpp index 52866eb97..4b266b99a 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/gins8.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/gins8.hpp @@ -68,7 +68,7 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double t = lp_lat * lp_lat; - + xy_y = lp_lat * (1. + t * C12); xy_x = lp_lon * (1. - Cp * t); t = lp_lon * lp_lon; diff --git a/include/boost/geometry/extensions/gis/projections/proj/gn_sinu.hpp b/include/boost/geometry/extensions/gis/projections/proj/gn_sinu.hpp index e7b7786c5..62a9eeb7c 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/gn_sinu.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/gn_sinu.hpp @@ -77,7 +77,7 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double s, c; - + xy_y = pj_mlfn(lp_lat, s = sin(lp_lat), c = cos(lp_lat), this->m_proj_parm.en); xy_x = lp_lon * c / sqrt(1. - this->m_par.es * s * s); } @@ -85,7 +85,7 @@ namespace boost { namespace geometry { namespace projections inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const { double s; - + if ((s = fabs(lp_lat = pj_inv_mlfn(xy_y, this->m_par.es, this->m_proj_parm.en))) < HALFPI) { s = sin(lp_lat); lp_lon = xy_x * sqrt(1. - this->m_par.es * s * s) / cos(lp_lat); @@ -119,7 +119,7 @@ namespace boost { namespace geometry { namespace projections else { double k, V; int i; - + k = this->m_proj_parm.n * sin(lp_lat); for (i = MAX_ITER; i ; --i) { lp_lat -= V = (this->m_proj_parm.m * lp_lat + sin(lp_lat) - k) / @@ -172,7 +172,7 @@ namespace boost { namespace geometry { namespace projections void setup_sinu(Parameters& par, par_gn_sinu& proj_parm) { pj_enfn(par.es, proj_parm.en); - + if (par.es) { // par.inv = e_inverse; // par.fwd = e_forward; diff --git a/include/boost/geometry/extensions/gis/projections/proj/gnom.hpp b/include/boost/geometry/extensions/gis/projections/proj/gnom.hpp index 04f017714..65ff0f8f7 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/gnom.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/gnom.hpp @@ -77,7 +77,7 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double coslam, cosphi, sinphi; - + sinphi = sin(lp_lat); cosphi = cos(lp_lat); coslam = cos(lp_lon); @@ -115,7 +115,7 @@ namespace boost { namespace geometry { namespace projections inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const { double rh, cosz, sinz; - + rh = boost::math::hypot(xy_x, xy_y); sinz = sin(lp_lat = atan(rh)); cosz = sqrt(1. - sinz * sinz); diff --git a/include/boost/geometry/extensions/gis/projections/proj/gstmerc.hpp b/include/boost/geometry/extensions/gis/projections/proj/gstmerc.hpp index 8a4908c60..93085bc61 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/gstmerc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/gstmerc.hpp @@ -59,7 +59,7 @@ namespace boost { namespace geometry { namespace projections double XS; double YS; }; - + // template class, using CRTP to implement forward/inverse template diff --git a/include/boost/geometry/extensions/gis/projections/proj/hammer.hpp b/include/boost/geometry/extensions/gis/projections/proj/hammer.hpp index ab15275a1..8c8e21054 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/hammer.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/hammer.hpp @@ -71,7 +71,7 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double cosphi, d; - + d = sqrt(2./(1. + (cosphi = cos(lp_lat)) * cos(lp_lon *= this->m_proj_parm.w))); xy_x = this->m_proj_parm.m * d * cosphi * sin(lp_lon); xy_y = this->m_proj_parm.rm * d * sin(lp_lat); diff --git a/include/boost/geometry/extensions/gis/projections/proj/hatano.hpp b/include/boost/geometry/extensions/gis/projections/proj/hatano.hpp index b415503c8..78661b256 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/hatano.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/hatano.hpp @@ -79,7 +79,7 @@ namespace boost { namespace geometry { namespace projections { double th1, c; int i; - + c = sin(lp_lat) * (lp_lat < 0. ? CS_ : CN_); for (i = NITER; i; --i) { lp_lat -= th1 = (lp_lat + sin(lp_lat) - c) / (1. + cos(lp_lat)); @@ -92,7 +92,7 @@ namespace boost { namespace geometry { namespace projections inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const { double th; - + th = xy_y * ( xy_y < 0. ? RYCS : RYCN); if (fabs(th) > 1.) if (fabs(th) > ONETOL) throw proj_exception(); diff --git a/include/boost/geometry/extensions/gis/projections/proj/imw_p.hpp b/include/boost/geometry/extensions/gis/projections/proj/imw_p.hpp index 086969309..32e090988 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/imw_p.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/imw_p.hpp @@ -63,7 +63,7 @@ namespace boost { namespace geometry { namespace projections inline int phi12(Parameters& par, par_imw_p& proj_parm, double *del, double *sig) { int err = 0; - + if (!pj_param(par.params, "tlat_1").i || !pj_param(par.params, "tlat_2").i) { err = -41; @@ -80,13 +80,13 @@ namespace boost { namespace geometry { namespace projections inline PXY loc_for(double const& lp_lam, double const& lp_phi, const Parameters& par, par_imw_p const& proj_parm, double *yc) { PXY xy; - + if (! lp_phi) { xy.x = lp_lam; xy.y = 0.; } else { double xa, ya, xb, yb, xc, D, B, m, sp, t, R, C; - + sp = sin(lp_phi); m = pj_mlfn(lp_phi, sp, cos(lp_phi), proj_parm.en); xa = proj_parm.Pp + proj_parm.Qp * m; @@ -124,19 +124,19 @@ namespace boost { namespace geometry { namespace projections } return (xy); } - + template inline void xy(Parameters& par, par_imw_p& proj_parm, double phi, double *x, double *y, double *sp, double *R) { double F; - + *sp = sin(phi); *R = 1./(tan(phi) * sqrt(1. - par.es * *sp * *sp )); F = proj_parm.lam_1 * *sp; *y = *R * (1 - cos(F)); *x = *R * sin(F); } - + // template class, using CRTP to implement forward/inverse template @@ -164,7 +164,7 @@ namespace boost { namespace geometry { namespace projections { PXY t; double yc = 0; - + lp_lat = this->m_proj_parm.phi_2; lp_lon = xy_x / cos(lp_lat); do { diff --git a/include/boost/geometry/extensions/gis/projections/proj/krovak.hpp b/include/boost/geometry/extensions/gis/projections/proj/krovak.hpp index e681c9495..da6d6198e 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/krovak.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/krovak.hpp @@ -51,36 +51,36 @@ namespace boost { namespace geometry { namespace projections { double C_x; }; - - - - - + + + + + /** NOTES: According to EPSG the full Krovak projection method should have the following parameters. Within PROJ.4 the azimuth, and pseudo - standard parallel are hardcoded in the algorithm and can't be + standard parallel are hardcoded in the algorithm and can't be altered from outside. The others all have defaults to match the common usage with Krovak projection. - + lat_0 = latitude of centre of the projection - + lon_0 = longitude of centre of the projection - + ** = azimuth (true) of the centre line passing through the centre of the projection - + ** = latitude of pseudo standard parallel - + k = scale factor on the pseudo standard parallel - + x_0 = False Easting of the centre of the projection at the apex of the cone - + y_0 = False Northing of the centre of the projection at the apex of the cone - + **/ - - - + + + // template class, using CRTP to implement forward/inverse template @@ -100,17 +100,17 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { /* calculate xy from lat/lon */ - + /* Constants, identical to inverse transform function */ double s45, s90, e2, e, alfa, uq, u0, g, k, k1, n0, ro0, ad, a, s0, n; double gfi, u, fi0, deltav, s, d, eps, ro; - - + + s45 = 0.785398163397448; /* 45 DEG */ s90 = 2 * s45; fi0 = this->m_par.phi0; /* Latitude of projection centre 49 DEG 30' */ - - /* Ellipsoid is used as Parameter in for.c and inv.c, therefore a must + + /* Ellipsoid is used as Parameter in for.c and inv.c, therefore a must be set to 1 here. Ellipsoid Bessel 1841 a = 6377397.155m 1/f = 299.1528128, e2=0.006674372230614; @@ -119,67 +119,67 @@ namespace boost { namespace geometry { namespace projections /* e2 = this->m_par.es;*/ /* 0.006674372230614; */ e2 = 0.006674372230614; e = sqrt(e2); - + alfa = sqrt(1. + (e2 * pow(cos(fi0), 4)) / (1. - e2)); - + uq = 1.04216856380474; /* DU(2, 59, 42, 42.69689) */ u0 = asin(sin(fi0) / alfa); g = pow( (1. + e * sin(fi0)) / (1. - e * sin(fi0)) , alfa * e / 2. ); - + k = tan( u0 / 2. + s45) / pow (tan(fi0 / 2. + s45) , alfa) * g; - + k1 = this->m_par.k0; n0 = a * sqrt(1. - e2) / (1. - e2 * pow(sin(fi0), 2)); s0 = 1.37008346281555; /* Latitude of pseudo standard parallel 78 DEG 30'00" N */ n = sin(s0); ro0 = k1 * n0 / tan(s0); ad = s90 - uq; - + /* Transformation */ - + gfi =pow ( ((1. + e * sin(lp_lat)) / (1. - e * sin(lp_lat))) , (alfa * e / 2.)); - + u= 2. * (atan(k * pow( tan(lp_lat / 2. + s45), alfa) / gfi)-s45); - + deltav = - lp_lon * alfa; - + s = asin(cos(ad) * sin(u) + sin(ad) * cos(u) * cos(deltav)); d = asin(cos(u) * sin(deltav) / cos(s)); eps = n * d; ro = ro0 * pow(tan(s0 / 2. + s45) , n) / pow(tan(s / 2. + s45) , n) ; - + /* x and y are reverted! */ xy_y = ro * cos(eps) / a; xy_x = ro * sin(eps) / a; - + if( !pj_param(this->m_par.params, "tczech").i ) { xy_y *= -1.0; xy_x *= -1.0; } - + return; } - - - + + + inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const { /* calculate lat/lon from xy */ - + /* Constants, identisch wie in der Umkehrfunktion */ double s45, s90, fi0, e2, e, alfa, uq, u0, g, k, k1, n0, ro0, ad, a, s0, n; double u, deltav, s, d, eps, ro, fi1, xy0; int ok; - + s45 = 0.785398163397448; /* 45 DEG */ s90 = 2 * s45; fi0 = this->m_par.phi0; /* Latitude of projection centre 49 DEG 30' */ - - - /* Ellipsoid is used as Parameter in for.c and inv.c, therefore a must + + + /* Ellipsoid is used as Parameter in for.c and inv.c, therefore a must be set to 1 here. Ellipsoid Bessel 1841 a = 6377397.155m 1/f = 299.1528128, e2=0.006674372230614; @@ -188,47 +188,47 @@ namespace boost { namespace geometry { namespace projections /* e2 = this->m_par.es; */ /* 0.006674372230614; */ e2 = 0.006674372230614; e = sqrt(e2); - + alfa = sqrt(1. + (e2 * pow(cos(fi0), 4)) / (1. - e2)); uq = 1.04216856380474; /* DU(2, 59, 42, 42.69689) */ u0 = asin(sin(fi0) / alfa); g = pow( (1. + e * sin(fi0)) / (1. - e * sin(fi0)) , alfa * e / 2. ); - + k = tan( u0 / 2. + s45) / pow (tan(fi0 / 2. + s45) , alfa) * g; - + k1 = this->m_par.k0; n0 = a * sqrt(1. - e2) / (1. - e2 * pow(sin(fi0), 2)); s0 = 1.37008346281555; /* Latitude of pseudo standard parallel 78 DEG 30'00" N */ n = sin(s0); ro0 = k1 * n0 / tan(s0); ad = s90 - uq; - - + + /* Transformation */ /* revert y, x*/ xy0=xy_x; xy_x=xy_y; xy_y=xy0; - + if( !pj_param(this->m_par.params, "tczech").i ) { xy_x *= -1.0; xy_y *= -1.0; } - + ro = sqrt(xy_x * xy_x + xy_y * xy_y); eps = atan2(xy_y, xy_x); d = eps / sin(s0); s = 2. * (atan( pow(ro0 / ro, 1. / n) * tan(s0 / 2. + s45)) - s45); - + u = asin(cos(ad) * sin(s) - sin(ad) * cos(s) * cos(d)); deltav = asin(cos(s) * sin(d) / cos(u)); - + lp_lon = this->m_par.lam0 - deltav / alfa; - + /* ITERATION FOR lp_lat */ fi1 = u; - + ok = 0; do { @@ -236,18 +236,18 @@ namespace boost { namespace geometry { namespace projections pow( tan(u / 2. + s45) , 1. / alfa) * pow( (1. + e * sin(fi1)) / (1. - e * sin(fi1)) , e / 2.) ) - s45); - + if (fabs(fi1 - lp_lat) < 0.000000000000001) ok=1; fi1 = lp_lat; - + } while (ok==0); - + lp_lon -= this->m_par.lam0; - + return; } - + }; // Krovak @@ -259,14 +259,12 @@ namespace boost { namespace geometry { namespace projections * here Latitude Truescale */ ts = pj_param(par.params, "rlat_ts").f; proj_parm.C_x = ts; - /* we want Bessel as fixed ellipsoid */ par.a = 6377397.155; par.e = sqrt(par.es = 0.006674372230614); /* if latitude of projection center is not set, use 49d30'N */ if (!pj_param(par.params, "tlat_0").i) par.phi0 = 0.863937979737193; - /* if center long is not set use 42d30'E of Ferro - 17d40' for Ferro */ /* that will correspond to using longitudes relative to greenwich */ /* as input and output, instead of lat/long relative to Ferro */ @@ -277,7 +275,6 @@ namespace boost { namespace geometry { namespace projections par.k0 = 0.9999; /* always the same */ // par.inv = e_inverse; - // par.fwd = e_forward; } diff --git a/include/boost/geometry/extensions/gis/projections/proj/labrd.hpp b/include/boost/geometry/extensions/gis/projections/proj/labrd.hpp index 316f37708..533f9866e 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/labrd.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/labrd.hpp @@ -73,7 +73,7 @@ namespace boost { namespace geometry { namespace projections { double V1, V2, ps, sinps, cosps, sinps2, cosps2, I1, I2, I3, I4, I5, I6, x2, y2, t; - + V1 = this->m_proj_parm.A * log( tan(FORTPI + .5 * lp_lat) ); t = this->m_par.e * sin(lp_lat); V2 = .5 * this->m_par.e * this->m_proj_parm.A * log ((1. + t)/(1. - t)); @@ -104,7 +104,7 @@ namespace boost { namespace geometry { namespace projections double x2, y2, V1, V2, V3, V4, t, t2, ps, pe, tpe, s, I7, I8, I9, I10, I11, d, Re; int i; - + x2 = xy_x * xy_x; y2 = xy_y * xy_y; V1 = 3. * xy_x * y2 - xy_x * x2; diff --git a/include/boost/geometry/extensions/gis/projections/proj/laea.hpp b/include/boost/geometry/extensions/gis/projections/proj/laea.hpp index 36c3cc679..7e3a2f1ba 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/laea.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/laea.hpp @@ -88,7 +88,7 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double coslam, sinlam, sinphi, q, sinb=0.0, cosb=0.0, b=0.0; - + coslam = cos(lp_lon); sinlam = sin(lp_lon); sinphi = sin(lp_lat); @@ -121,7 +121,7 @@ namespace boost { namespace geometry { namespace projections goto eqcon; break; case EQUIT: - xy_y = (b = sqrt(2. / (1. + cosb * coslam))) * sinb * this->m_proj_parm.ymf; + xy_y = (b = sqrt(2. / (1. + cosb * coslam))) * sinb * this->m_proj_parm.ymf; eqcon: xy_x = this->m_proj_parm.xmf * b * cosb * sinlam; break; @@ -139,7 +139,7 @@ namespace boost { namespace geometry { namespace projections inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const { double cCe, sCe, q, rho, ab=0.0; - + switch (this->m_proj_parm.mode) { case EQUIT: case OBLIQ: @@ -197,7 +197,7 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double coslam, cosphi, sinphi; - + sinphi = sin(lp_lat); cosphi = cos(lp_lat); coslam = cos(lp_lon); @@ -228,7 +228,7 @@ namespace boost { namespace geometry { namespace projections inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const { double cosz=0.0, rh, sinz=0.0; - + rh = boost::math::hypot(xy_x, xy_y); if ((lp_lat = rh * .5 ) > 1.) throw proj_exception();; lp_lat = 2. * asin(lp_lat); diff --git a/include/boost/geometry/extensions/gis/projections/proj/lagrng.hpp b/include/boost/geometry/extensions/gis/projections/proj/lagrng.hpp index 7bd828ca6..3bb65fdd3 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/lagrng.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/lagrng.hpp @@ -73,7 +73,7 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double v, c; - + if (fabs(fabs(lp_lat) - HALFPI) < TOL) { xy_x = 0; xy_y = lp_lat < 0 ? -2. : 2.; diff --git a/include/boost/geometry/extensions/gis/projections/proj/lask.hpp b/include/boost/geometry/extensions/gis/projections/proj/lask.hpp index 3b739954f..9da4e28be 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/lask.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/lask.hpp @@ -75,7 +75,7 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double l2, p2; - + l2 = lp_lon * lp_lon; p2 = lp_lat * lp_lat; xy_x = lp_lon * (a10 + p2 * (a12 + l2 * a32 + p2 * a14)); diff --git a/include/boost/geometry/extensions/gis/projections/proj/latlong.hpp b/include/boost/geometry/extensions/gis/projections/proj/latlong.hpp index 7102385e3..7c1e487a4 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/latlong.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/latlong.hpp @@ -49,9 +49,9 @@ namespace boost { namespace geometry { namespace projections #ifndef DOXYGEN_NO_DETAIL namespace detail { namespace latlong{ - + /* very loosely based upon DMA code by Bradford W. Drew */ - + // template class, using CRTP to implement forward/inverse template @@ -69,14 +69,14 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { - + xy_x = lp_lon / this->m_par.a; xy_y = lp_lat / this->m_par.a; } inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const { - + lp_lat = xy_y * this->m_par.a; lp_lon = xy_x * this->m_par.a; } diff --git a/include/boost/geometry/extensions/gis/projections/proj/lcca.hpp b/include/boost/geometry/extensions/gis/projections/proj/lcca.hpp index 3c7cdffe5..23cf838e5 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/lcca.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/lcca.hpp @@ -56,8 +56,8 @@ namespace boost { namespace geometry { namespace projections double r0, l, M0; double C; }; - - + + inline double /* func to compute dr */ fS(double S, double C) { return(S * ( 1. + S * S * C)); @@ -85,7 +85,7 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double S, r, dr; - + S = pj_mlfn(lp_lat, sin(lp_lat), cos(lp_lat), this->m_proj_parm.en) - this->m_proj_parm.M0; dr = fS(S, this->m_proj_parm.C); r = this->m_proj_parm.r0 - dr; @@ -97,7 +97,7 @@ namespace boost { namespace geometry { namespace projections { double theta, dr, S, dif; int i; - + xy_x /= this->m_par.k0; xy_y /= this->m_par.k0; theta = atan2(xy_x , this->m_proj_parm.r0 - xy_y); diff --git a/include/boost/geometry/extensions/gis/projections/proj/lsat.hpp b/include/boost/geometry/extensions/gis/projections/proj/lsat.hpp index 816c63fbb..bd77d5c15 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/lsat.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/lsat.hpp @@ -60,14 +60,14 @@ namespace boost { namespace geometry { namespace projections inline void seraz0(double lam, double mult, Parameters& par, par_lsat& proj_parm) { double sdsq, h, s, fc, sd, sq, d__1; - + lam *= DEG_TO_RAD; sd = sin(lam); sdsq = sd * sd; s = proj_parm.p22 * proj_parm.sa * cos(lam) * sqrt((1. + proj_parm.t * sdsq) / (( 1. + proj_parm.w * sdsq) * (1. + proj_parm.q * sdsq))); d__1 = 1. + proj_parm.q * sdsq; - h = sqrt((1. + proj_parm.q * sdsq) / (1. + proj_parm.w * sdsq)) * ((1. + + h = sqrt((1. + proj_parm.q * sdsq) / (1. + proj_parm.w * sdsq)) * ((1. + proj_parm.w * sdsq) / (d__1 * d__1) - proj_parm.p22 * proj_parm.ca); sq = sqrt(proj_parm.xj * proj_parm.xj + s * s); proj_parm.b += fc = mult * (h * proj_parm.xj - s * s) / sq; @@ -98,7 +98,7 @@ namespace boost { namespace geometry { namespace projections int l, nn; double lamt, xlam, sdsq, c, d, s, lamdp, phidp, lampp, tanph, lamtp, cl, sd, sp, fac, sav, tanphi; - + if (lp_lat > HALFPI) lp_lat = HALFPI; else if (lp_lat < -HALFPI) @@ -131,7 +131,7 @@ namespace boost { namespace geometry { namespace projections } if (l) { sp = sin(lp_lat); - phidp = aasin((this->m_par.one_es * this->m_proj_parm.ca * sp - this->m_proj_parm.sa * cos(lp_lat) * + phidp = aasin((this->m_par.one_es * this->m_proj_parm.ca * sp - this->m_proj_parm.sa * cos(lp_lat) * sin(lamt)) / sqrt(1. - this->m_par.es * sp * sp)); tanph = log(tan(FORTPI + .5 * phidp)); sd = sin(lamdp); @@ -150,7 +150,7 @@ namespace boost { namespace geometry { namespace projections { int nn; double lamt, sdsq, s, lamdp, phidp, sppsq, dd, sd, sl, fac, scl, sav, spp; - + lamdp = xy_x / this->m_proj_parm.b; nn = 50; do { @@ -165,7 +165,7 @@ namespace boost { namespace geometry { namespace projections lamdp /= this->m_proj_parm.b; } while (fabs(lamdp - sav) >= TOL && --nn); sl = sin(lamdp); - fac = exp(sqrt(1. + s * s / this->m_proj_parm.xj / this->m_proj_parm.xj) * (xy_y - + fac = exp(sqrt(1. + s * s / this->m_proj_parm.xj / this->m_proj_parm.xj) * (xy_y - this->m_proj_parm.c1 * sl - this->m_proj_parm.c3 * sin(lamdp * 3.))); phidp = 2. * (atan(fac) - FORTPI); dd = sl * sl; @@ -173,9 +173,9 @@ namespace boost { namespace geometry { namespace projections lamdp -= TOL; spp = sin(phidp); sppsq = spp * spp; - lamt = atan(((1. - sppsq * this->m_par.rone_es) * tan(lamdp) * + lamt = atan(((1. - sppsq * this->m_par.rone_es) * tan(lamdp) * this->m_proj_parm.ca - spp * this->m_proj_parm.sa * sqrt((1. + this->m_proj_parm.q * dd) * ( - 1. - sppsq) - sppsq * this->m_proj_parm.u) / cos(lamdp)) / (1. - sppsq + 1. - sppsq) - sppsq * this->m_proj_parm.u) / cos(lamdp)) / (1. - sppsq * (1. + this->m_proj_parm.u))); sl = lamt >= 0. ? 1. : -1.; scl = cos(lamdp) >= 0. ? 1. : -1; diff --git a/include/boost/geometry/extensions/gis/projections/proj/mbt_fps.hpp b/include/boost/geometry/extensions/gis/projections/proj/mbt_fps.hpp index 7cbeda921..7b0a09234 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/mbt_fps.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/mbt_fps.hpp @@ -74,7 +74,7 @@ namespace boost { namespace geometry { namespace projections { double k, V, t; int i; - + k = C3 * sin(lp_lat); for (i = MAX_ITER; i ; --i) { t = lp_lat / C2; @@ -91,7 +91,7 @@ namespace boost { namespace geometry { namespace projections inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const { double t; - + lp_lat = C2 * (t = aasin(xy_y / C_y)); lp_lon = xy_x / (C_x * (1. + 3. * cos(lp_lat)/cos(t))); lp_lat = aasin((C1 * sin(t) + sin(lp_lat)) / C3); diff --git a/include/boost/geometry/extensions/gis/projections/proj/mbtfpq.hpp b/include/boost/geometry/extensions/gis/projections/proj/mbtfpq.hpp index 9e1d21bd1..2c0323c71 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/mbtfpq.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/mbtfpq.hpp @@ -75,7 +75,7 @@ namespace boost { namespace geometry { namespace projections { double th1, c; int i; - + c = C * sin(lp_lat); for (i = NITER; i; --i) { lp_lat -= th1 = (sin(.5*lp_lat) + sin(lp_lat) - c) / @@ -89,7 +89,7 @@ namespace boost { namespace geometry { namespace projections inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const { double t; - + lp_lat = RYC * xy_y; if (fabs(lp_lat) > 1.) { if (fabs(lp_lat) > ONETOL) throw proj_exception(); diff --git a/include/boost/geometry/extensions/gis/projections/proj/mod_ster.hpp b/include/boost/geometry/extensions/gis/projections/proj/mod_ster.hpp index b71bb00e5..2e997ba2c 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/mod_ster.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/mod_ster.hpp @@ -57,7 +57,7 @@ namespace boost { namespace geometry { namespace projections int n; }; /* based upon Snyder and Linck, USGS-NMD */ - + // template class, using CRTP to implement forward/inverse template @@ -78,7 +78,7 @@ namespace boost { namespace geometry { namespace projections { double sinlon, coslon, esphi, chi, schi, cchi, s; COMPLEX p; - + sinlon = sin(lp_lon); coslon = cos(lp_lon); esphi = this->m_par.e * sin(lp_lat); @@ -99,7 +99,7 @@ namespace boost { namespace geometry { namespace projections int nn; COMPLEX p, fxy, fpxy, dp; double den, rh = 0, z, sinz = 0, cosz = 0, chi, phi = 0, dphi, esphi; - + p.r = xy_x; p.i = xy_y; for (nn = 20; nn ;--nn) { @@ -137,7 +137,7 @@ namespace boost { namespace geometry { namespace projections } if (nn) { lp_lat = phi; - lp_lon = atan2(p.r * sinz, rh * this->m_proj_parm.cchio * cosz - p.i * + lp_lon = atan2(p.r * sinz, rh * this->m_proj_parm.cchio * cosz - p.i * this->m_proj_parm.schio * sinz); } else lp_lon = lp_lat = HUGE_VAL; diff --git a/include/boost/geometry/extensions/gis/projections/proj/moll.hpp b/include/boost/geometry/extensions/gis/projections/proj/moll.hpp index 622acda9c..429ba1854 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/moll.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/moll.hpp @@ -75,7 +75,7 @@ namespace boost { namespace geometry { namespace projections { double k, V; int i; - + k = this->m_proj_parm.C_p * sin(lp_lat); for (i = MAX_ITER; i ; --i) { lp_lat -= V = (lp_lat + sin(lp_lat) - k) / diff --git a/include/boost/geometry/extensions/gis/projections/proj/nell.hpp b/include/boost/geometry/extensions/gis/projections/proj/nell.hpp index 72a1b43c2..a93fa45db 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/nell.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/nell.hpp @@ -68,7 +68,7 @@ namespace boost { namespace geometry { namespace projections { double k, V; int i; - + k = 2. * sin(lp_lat); V = lp_lat * lp_lat; lp_lat *= 1.00371 + V * (-0.0935382 + V * -0.011412); diff --git a/include/boost/geometry/extensions/gis/projections/proj/nell_h.hpp b/include/boost/geometry/extensions/gis/projections/proj/nell_h.hpp index 5f219b480..aa6c72013 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/nell_h.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/nell_h.hpp @@ -74,7 +74,7 @@ namespace boost { namespace geometry { namespace projections { double V, c, p; int i; - + p = 0.5 * xy_y; for (i = NITER; i ; --i) { c = cos(0.5 * lp_lat); diff --git a/include/boost/geometry/extensions/gis/projections/proj/nocol.hpp b/include/boost/geometry/extensions/gis/projections/proj/nocol.hpp index da1e212af..bb9052abb 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/nocol.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/nocol.hpp @@ -79,7 +79,7 @@ namespace boost { namespace geometry { namespace projections xy_y = lp_lat; } else { double tb, c, d, m, n, r2, sp; - + tb = HALFPI / lp_lon - lp_lon / HALFPI; c = lp_lat / HALFPI; d = (1 - c * c)/((sp = sin(lp_lat)) - c); diff --git a/include/boost/geometry/extensions/gis/projections/proj/nsper.hpp b/include/boost/geometry/extensions/gis/projections/proj/nsper.hpp index bee3c20d8..db8e8db47 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/nsper.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/nsper.hpp @@ -89,7 +89,7 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double coslam, cosphi, sinphi; - + sinphi = sin(lp_lat); cosphi = cos(lp_lat); coslam = cos(lp_lon); @@ -126,7 +126,7 @@ namespace boost { namespace geometry { namespace projections } if (this->m_proj_parm.tilt) { double yt, ba; - + yt = xy_y * this->m_proj_parm.cg + xy_x * this->m_proj_parm.sg; ba = 1. / (yt * this->m_proj_parm.sw * this->m_proj_parm.h + this->m_proj_parm.cw); xy_x = (xy_x * this->m_proj_parm.cg - xy_y * this->m_proj_parm.sg) * this->m_proj_parm.cw * ba; @@ -137,10 +137,10 @@ namespace boost { namespace geometry { namespace projections inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const { double rh, cosz, sinz; - + if (this->m_proj_parm.tilt) { double bm, bq, yt; - + yt = 1./(this->m_proj_parm.pn1 - xy_y * this->m_proj_parm.sw); bm = this->m_proj_parm.pn1 * xy_x * yt; bq = this->m_proj_parm.pn1 * xy_y * this->m_proj_parm.cw * yt; diff --git a/include/boost/geometry/extensions/gis/projections/proj/nzmg.hpp b/include/boost/geometry/extensions/gis/projections/proj/nzmg.hpp index c18a655fd..67b50a9eb 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/nzmg.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/nzmg.hpp @@ -53,10 +53,10 @@ namespace boost { namespace geometry { namespace projections static const int Ntpsi = 9; static const int Ntphi = 8; - - - - + + + + static COMPLEX bf[] = { {.7557853228, 0.0}, @@ -90,7 +90,7 @@ namespace boost { namespace geometry { namespace projections COMPLEX p; double *C; int i; - + lp_lat = (lp_lat - this->m_par.phi0) * RAD_TO_SEC5; for (p.r = *(C = tpsi + (i = Ntpsi)); i ; --i) p.r = *--C + lp_lat * p.r; @@ -106,7 +106,7 @@ namespace boost { namespace geometry { namespace projections int nn, i; COMPLEX p, f, fp, dp; double den, *C; - + p.r = xy_y; p.i = xy_x; for (nn = 20; nn ;--nn) { diff --git a/include/boost/geometry/extensions/gis/projections/proj/ob_tran.hpp b/include/boost/geometry/extensions/gis/projections/proj/ob_tran.hpp index 899437138..5bae0ae93 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/ob_tran.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/ob_tran.hpp @@ -78,9 +78,9 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double coslam, sinphi, cosphi; - - - + + + coslam = cos(lp_lon); sinphi = sin(lp_lat); cosphi = cos(lp_lat); @@ -93,7 +93,7 @@ namespace boost { namespace geometry { namespace projections inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const { double coslam, sinphi, cosphi; - + m_proj_parm.link->inv(xy_x, xy_y, lp_lon, lp_lat); if (lp_lon != HUGE_VAL) { coslam = cos(lp_lon -= this->m_proj_parm.lamp); @@ -124,9 +124,9 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double cosphi, coslam; - - - + + + cosphi = cos(lp_lat); coslam = cos(lp_lon); lp_lon = adjlon(aatan2(cosphi * sin(lp_lon), sin(lp_lat)) + this->m_proj_parm.lamp); @@ -137,7 +137,7 @@ namespace boost { namespace geometry { namespace projections inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const { double cosphi, t; - + m_proj_parm.link->inv(xy_x, xy_y, lp_lon, lp_lat); if (lp_lon != HUGE_VAL) { cosphi = cos(lp_lat); @@ -154,8 +154,8 @@ namespace boost { namespace geometry { namespace projections { int i; double phip; - - + + Parameters pj; /* copy existing header into new */ par.es = 0.; @@ -175,7 +175,7 @@ namespace boost { namespace geometry { namespace projections pj.one_es = pj.rone_es = 1.; pj.es = pj.e = 0.; pj.name = pj_param(par.params, "so_proj").s; - + factory fac; if (create) { diff --git a/include/boost/geometry/extensions/gis/projections/proj/ocea.hpp b/include/boost/geometry/extensions/gis/projections/proj/ocea.hpp index 63d97efcf..1c1e1cf1e 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/ocea.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/ocea.hpp @@ -75,7 +75,7 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double t; - + xy_y = sin(lp_lon); /* xy_x = atan2((tan(lp_lat) * this->m_proj_parm.cosphi + this->m_proj_parm.sinphi * xy_y) , cos(lp_lon)); @@ -91,7 +91,7 @@ namespace boost { namespace geometry { namespace projections inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const { double t, s; - + xy_y /= this->m_proj_parm.rok; xy_x /= this->m_proj_parm.rtk; t = sqrt(1. - xy_y * xy_y); diff --git a/include/boost/geometry/extensions/gis/projections/proj/oea.hpp b/include/boost/geometry/extensions/gis/projections/proj/oea.hpp index 0a34a841f..d6fb0c55c 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/oea.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/oea.hpp @@ -73,7 +73,7 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double Az, M, N, cp, sp, cl, shz; - + cp = cos(lp_lat); sp = sin(lp_lat); cl = cos(lp_lon); @@ -88,7 +88,7 @@ namespace boost { namespace geometry { namespace projections inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const { double N, M, xp, yp, z, Az, cz, sz, cAz; - + N = this->m_proj_parm.hn * aasin(xy_y * this->m_proj_parm.rn); M = this->m_proj_parm.hm * aasin(xy_x * this->m_proj_parm.rm * cos(N * this->m_proj_parm.two_r_n) / cos(N)); xp = 2. * sin(M); diff --git a/include/boost/geometry/extensions/gis/projections/proj/omerc.hpp b/include/boost/geometry/extensions/gis/projections/proj/omerc.hpp index 2b46fb1ea..010cf978d 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/omerc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/omerc.hpp @@ -61,8 +61,8 @@ namespace boost { namespace geometry { namespace projections double v_pole_n, v_pole_s, u_0; int no_rot; }; - - + + // template class, using CRTP to implement forward/inverse template @@ -82,7 +82,7 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double Q, S, T, U, V, temp, u, v; - + if (fabs(fabs(lp_lat) - HALFPI) > EPS) { Q = this->m_proj_parm.E / pow(pj_tsfn(lp_lat, sin(lp_lat), this->m_par.e), this->m_proj_parm.B); temp = 1. / Q; @@ -95,7 +95,7 @@ namespace boost { namespace geometry { namespace projections v = 0.5 * this->m_proj_parm.ArB * log((1. - U)/(1. + U)); temp = cos(this->m_proj_parm.B * lp_lon); u = (fabs(temp) < TOL) ? this->m_proj_parm.AB * lp_lon : - this->m_proj_parm.ArB * atan2((S * this->m_proj_parm.cosgam + V * this->m_proj_parm.singam) , temp); + this->m_proj_parm.ArB * atan2((S * this->m_proj_parm.cosgam + V * this->m_proj_parm.singam) , temp); } else { v = lp_lat > 0 ? this->m_proj_parm.v_pole_n : this->m_proj_parm.v_pole_s; u = this->m_proj_parm.ArB * lp_lat; @@ -113,7 +113,7 @@ namespace boost { namespace geometry { namespace projections inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const { double u, v, Qp, Sp, Tp, Vp, Up; - + if (this->m_proj_parm.no_rot) { v = xy_y; u = xy_x; @@ -153,7 +153,7 @@ namespace boost { namespace geometry { namespace projections gamma = pj_param(par.params, "rgamma").f; if (alp || gam) { lamc = pj_param(par.params, "rlonc").f; - no_off = + no_off = /* For libproj4 compatability */ pj_param(par.params, "tno_off").i /* for backward compatibility */ diff --git a/include/boost/geometry/extensions/gis/projections/proj/ortho.hpp b/include/boost/geometry/extensions/gis/projections/proj/ortho.hpp index 28115cf16..d3908a3df 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/ortho.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/ortho.hpp @@ -77,7 +77,7 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double coslam, cosphi, sinphi; - + cosphi = cos(lp_lat); coslam = cos(lp_lon); switch (this->m_proj_parm.mode) { @@ -100,12 +100,12 @@ namespace boost { namespace geometry { namespace projections xy_x = cosphi * sin(lp_lon); return; } - + inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const { double rh, cosc, sinc; - + if ((sinc = (rh = boost::math::hypot(xy_x, xy_y))) > 1.) { if ((sinc - 1.) > EPS10) throw proj_exception();; sinc = 1.; @@ -145,7 +145,7 @@ namespace boost { namespace geometry { namespace projections } return; } - + }; // Orthographic diff --git a/include/boost/geometry/extensions/gis/projections/proj/poly.hpp b/include/boost/geometry/extensions/gis/projections/proj/poly.hpp index 743d32dc3..98245d288 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/poly.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/poly.hpp @@ -78,7 +78,7 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double ms, sp, cp; - + if (fabs(lp_lat) <= TOL) { xy_x = lp_lon; xy_y = -this->m_proj_parm.ml0; } else { sp = sin(lp_lat); @@ -95,7 +95,7 @@ namespace boost { namespace geometry { namespace projections else { double r, c, sp, cp, s2ph, ml, mlb, mlp, dPhi; int i; - + r = xy_y * xy_y + xy_x * xy_x; for (lp_lat = xy_y, i = I_ITER; i ; --i) { sp = sin(lp_lat); @@ -139,7 +139,7 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double cot, E; - + if (fabs(lp_lat) <= TOL) { xy_x = lp_lon; xy_y = this->m_proj_parm.ml0; } else { cot = 1. / tan(lp_lat); @@ -152,7 +152,7 @@ namespace boost { namespace geometry { namespace projections { double B, dphi, tp; int i; - + if (fabs(xy_y = this->m_par.phi0 + xy_y) <= TOL) { lp_lon = xy_x; lp_lat = 0.; } else { lp_lat = xy_y; diff --git a/include/boost/geometry/extensions/gis/projections/proj/putp2.hpp b/include/boost/geometry/extensions/gis/projections/proj/putp2.hpp index aa14fc18f..225b4de25 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/putp2.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/putp2.hpp @@ -72,7 +72,7 @@ namespace boost { namespace geometry { namespace projections { double p, c, s, V; int i; - + p = C_p * sin(lp_lat); s = lp_lat * lp_lat; lp_lat *= 0.615709 + s * ( 0.00909953 + s * 0.0046292 ); @@ -93,7 +93,7 @@ namespace boost { namespace geometry { namespace projections inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const { double c; - + lp_lat = aasin(xy_y / C_y); lp_lon = xy_x / (C_x * ((c = cos(lp_lat)) - 0.5)); lp_lat = aasin((lp_lat + sin(lp_lat) * (c - 1.)) / C_p); diff --git a/include/boost/geometry/extensions/gis/projections/proj/putp6.hpp b/include/boost/geometry/extensions/gis/projections/proj/putp6.hpp index c91d847f8..cf8c69451 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/putp6.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/putp6.hpp @@ -75,7 +75,7 @@ namespace boost { namespace geometry { namespace projections { double p, r, V; int i; - + p = this->m_proj_parm.B * sin(lp_lat); lp_lat *= 1.10265779; for (i = NITER; i ; --i) { @@ -94,7 +94,7 @@ namespace boost { namespace geometry { namespace projections inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const { double r; - + lp_lat = xy_y / this->m_proj_parm.C_y; r = sqrt(1. + lp_lat * lp_lat); lp_lon = xy_x / (this->m_proj_parm.C_x * (this->m_proj_parm.D - r)); diff --git a/include/boost/geometry/extensions/gis/projections/proj/robin.hpp b/include/boost/geometry/extensions/gis/projections/proj/robin.hpp index 8397c71a6..a151a0d9c 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/robin.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/robin.hpp @@ -55,12 +55,12 @@ namespace boost { namespace geometry { namespace projections static const double ONEEPS = 1.000001; static const double EPS = 1e-8; - - + + struct COEFS { double c0, c1, c2, c3; }; - + static const struct COEFS X[] = { {1, 2.2199e-17, -7.15515e-05, 3.1103e-06}, {0.9986, -0.000482243, -2.4897e-05, -1.3309e-06}, @@ -127,7 +127,7 @@ namespace boost { namespace geometry { namespace projections { int i; double dphi; - + i = int_floor((dphi = fabs(lp_lat)) * C1); if (i >= NODES) i = NODES - 1; dphi = RAD_TO_DEG * (dphi - RC1 * i); @@ -141,7 +141,7 @@ namespace boost { namespace geometry { namespace projections int i; double t, t1; struct COEFS T; - + lp_lon = xy_x / FXC; lp_lat = fabs(xy_y / FYC); if (lp_lat >= 1.) { /* simple pathologic cases */ diff --git a/include/boost/geometry/extensions/gis/projections/proj/rouss.hpp b/include/boost/geometry/extensions/gis/projections/proj/rouss.hpp index 77a613847..4d8498af6 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/rouss.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/rouss.hpp @@ -76,7 +76,7 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double s, al, cp, sp, al2, s2; - + cp = cos(lp_lat); sp = sin(lp_lat); s = proj_mdist(lp_lat, sp, cp, this->m_proj_parm.en) - this->m_proj_parm.s0; @@ -93,7 +93,7 @@ namespace boost { namespace geometry { namespace projections inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const { double s, al, x = xy_x / this->m_par.k0, y = xy_y / this->m_par.k0, x2, y2;; - + x2 = x * x; y2 = y * y; al = x*(1.-this->m_proj_parm.C1*y2+x2*(this->m_proj_parm.C2+this->m_proj_parm.C3*y-this->m_proj_parm.C4*x2+this->m_proj_parm.C5*y2-this->m_proj_parm.C7*x2*y) @@ -113,7 +113,7 @@ namespace boost { namespace geometry { namespace projections { double N0, es2, t, t2, R_R0_2, R_R0_4; proj_mdist_ini(par.es, proj_parm.en); - + es2 = sin(par.phi0); proj_parm.s0 = proj_mdist(par.phi0, es2, cos(par.phi0), proj_parm.en); t = 1. - (es2 = par.es * es2 * es2); diff --git a/include/boost/geometry/extensions/gis/projections/proj/rpoly.hpp b/include/boost/geometry/extensions/gis/projections/proj/rpoly.hpp index 2d355fda8..26876ef4c 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/rpoly.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/rpoly.hpp @@ -74,7 +74,7 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double fa; - + if (this->m_proj_parm.mode) fa = tan(lp_lon * this->m_proj_parm.fxb) * this->m_proj_parm.fxa; else diff --git a/include/boost/geometry/extensions/gis/projections/proj/sconics.hpp b/include/boost/geometry/extensions/gis/projections/proj/sconics.hpp index 191d3e018..3882b1391 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/sconics.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/sconics.hpp @@ -72,7 +72,7 @@ namespace boost { namespace geometry { namespace projections phi12(Parameters& par, par_sconics& proj_parm, double *del) { double p1, p2; int err = 0; - + if (!pj_param(par.params, "tlat_1").i || !pj_param(par.params, "tlat_2").i) { err = -41; @@ -105,7 +105,7 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double rho; - + switch (this->m_proj_parm.type) { case MURD2: rho = this->m_proj_parm.rho_c + tan(this->m_proj_parm.sig - lp_lat); @@ -124,7 +124,7 @@ namespace boost { namespace geometry { namespace projections inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const { double rho; - + rho = boost::math::hypot(xy_x, xy_y = this->m_proj_parm.rho_0 - xy_y); if (this->m_proj_parm.n < 0.) { rho = - rho; @@ -180,7 +180,6 @@ namespace boost { namespace geometry { namespace projections proj_parm.n = sin(proj_parm.sig) * sin(del) / del; del *= 0.5; proj_parm.rho_c = del / (tan(del) * tan(proj_parm.sig)) + proj_parm.sig; - proj_parm.rho_0 = proj_parm.rho_c - par.phi0; break; case PCONIC: diff --git a/include/boost/geometry/extensions/gis/projections/proj/somerc.hpp b/include/boost/geometry/extensions/gis/projections/proj/somerc.hpp index 368ed609b..844702193 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/somerc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/somerc.hpp @@ -72,7 +72,7 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double phip, lamp, phipp, lampp, sp, cp; - + sp = this->m_par.e * sin(lp_lat); phip = 2.* atan( exp( this->m_proj_parm.c * ( log(tan(FORTPI + 0.5 * lp_lat)) - this->m_proj_parm.hlf_e * log((1. + sp)/(1. - sp))) @@ -89,7 +89,7 @@ namespace boost { namespace geometry { namespace projections { double phip, lamp, phipp, lampp, cp, esp, con, delp; int i; - + phipp = 2. * (atan(exp(xy_y / this->m_proj_parm.kR)) - FORTPI); lampp = xy_x / this->m_proj_parm.kR; cp = cos(phipp); diff --git a/include/boost/geometry/extensions/gis/projections/proj/stere.hpp b/include/boost/geometry/extensions/gis/projections/proj/stere.hpp index 386065270..1ae0594bf 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/stere.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/stere.hpp @@ -90,7 +90,7 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double coslam, sinlam, sinX=0.0, cosX=0.0, X, A, sinphi; - + coslam = cos(lp_lon); sinlam = sin(lp_lon); sinphi = sin(lp_lat); @@ -126,7 +126,7 @@ namespace boost { namespace geometry { namespace projections { double cosphi, sinphi, tp=0.0, phi_l=0.0, rho, halfe=0.0, halfpi=0.0; int i; - + rho = boost::math::hypot(xy_x, xy_y); switch (this->m_proj_parm.mode) { case OBLIQ: @@ -137,7 +137,7 @@ namespace boost { namespace geometry { namespace projections phi_l = asin(cosphi * this->m_proj_parm.sinX1); else phi_l = asin(cosphi * this->m_proj_parm.sinX1 + (xy_y * sinphi * this->m_proj_parm.cosX1 / rho)); - + tp = tan(.5 * (HALFPI + phi_l)); xy_x *= sinphi; xy_y = rho * this->m_proj_parm.cosX1 * cosphi - xy_y * this->m_proj_parm.sinX1* sinphi; @@ -185,7 +185,7 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double sinphi, cosphi, coslam, sinlam; - + sinphi = sin(lp_lat); cosphi = cos(lp_lat); coslam = cos(lp_lon); @@ -216,7 +216,7 @@ namespace boost { namespace geometry { namespace projections inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const { double c, rh, sinc, cosc; - + sinc = sin(c = 2. * atan((rh = boost::math::hypot(xy_x, xy_y)) / this->m_proj_parm.akm1)); cosc = cos(c); lp_lon = 0.; diff --git a/include/boost/geometry/extensions/gis/projections/proj/sterea.hpp b/include/boost/geometry/extensions/gis/projections/proj/sterea.hpp index 05bc9f5cd..115ed1b5a 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/sterea.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/sterea.hpp @@ -59,9 +59,9 @@ namespace boost { namespace geometry { namespace projections double R2; gauss::GAUSS en; }; - - - + + + // template class, using CRTP to implement forward/inverse template @@ -81,7 +81,7 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double cosc, sinc, cosl_, k; - + detail::gauss::gauss(m_proj_parm.en, lp_lon, lp_lat); sinc = sin(lp_lat); cosc = cos(lp_lat); @@ -94,7 +94,7 @@ namespace boost { namespace geometry { namespace projections inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const { double rho, c, sinc, cosc; - + xy_x /= this->m_par.k0; xy_y /= this->m_par.k0; if((rho = boost::math::hypot(xy_x, xy_y))) { @@ -116,7 +116,6 @@ namespace boost { namespace geometry { namespace projections template void setup_sterea(Parameters& par, par_sterea& proj_parm) { - double R; proj_parm.en = detail::gauss::gauss_ini(par.e, par.phi0, proj_parm.phic0, R); proj_parm.sinc0 = sin(proj_parm.phic0); diff --git a/include/boost/geometry/extensions/gis/projections/proj/sts.hpp b/include/boost/geometry/extensions/gis/projections/proj/sts.hpp index 0de45d27d..41b83c292 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/sts.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/sts.hpp @@ -72,7 +72,7 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double c; - + xy_x = this->m_proj_parm.C_x * lp_lon * cos(lp_lat); xy_y = this->m_proj_parm.C_y; lp_lat *= this->m_proj_parm.C_p; @@ -89,7 +89,7 @@ namespace boost { namespace geometry { namespace projections inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const { double c; - + xy_y /= this->m_proj_parm.C_y; c = cos(lp_lat = this->m_proj_parm.tan_mode ? atan(xy_y) : aasin(xy_y)); lp_lat /= this->m_proj_parm.C_p; diff --git a/include/boost/geometry/extensions/gis/projections/proj/tcc.hpp b/include/boost/geometry/extensions/gis/projections/proj/tcc.hpp index b0c7034dc..832b6e0f1 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/tcc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/tcc.hpp @@ -71,7 +71,7 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double b, bt; - + b = cos(lp_lat) * sin(lp_lon); if ((bt = 1. - b * b) < EPS10) throw proj_exception();; xy_x = b / sqrt(bt); diff --git a/include/boost/geometry/extensions/gis/projections/proj/tcea.hpp b/include/boost/geometry/extensions/gis/projections/proj/tcea.hpp index c67e1133f..840c9e406 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/tcea.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/tcea.hpp @@ -76,7 +76,7 @@ namespace boost { namespace geometry { namespace projections inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const { double t; - + xy_y = xy_y * this->m_proj_parm.rk0 + this->m_par.phi0; xy_x *= this->m_par.k0; t = sqrt(1. - xy_x * xy_x); diff --git a/include/boost/geometry/extensions/gis/projections/proj/tmerc.hpp b/include/boost/geometry/extensions/gis/projections/proj/tmerc.hpp index fcacc828f..62d742d87 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/tmerc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/tmerc.hpp @@ -86,12 +86,12 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double al, als, n, cosphi, sinphi, t; - + /* - * Fail if our longitude is more than 90 degrees from the - * central meridian since the results are essentially garbage. + * Fail if our longitude is more than 90 degrees from the + * central meridian since the results are essentially garbage. * Is error -20 really an appropriate return value? - * + * * http://trac.osgeo.org/proj/ticket/5 */ if( lp_lon < -HALFPI || lp_lon > HALFPI ) @@ -101,7 +101,7 @@ namespace boost { namespace geometry { namespace projections throw proj_exception(-14 ); return; } - + sinphi = sin(lp_lat); cosphi = cos(lp_lat); t = fabs(cosphi) > 1e-10 ? sinphi/cosphi : 0.; t *= t; @@ -125,7 +125,7 @@ namespace boost { namespace geometry { namespace projections inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const { double n, con, cosphi, d, ds, sinphi, t; - + lp_lat = pj_inv_mlfn(this->m_proj_parm.ml0 + xy_y / this->m_par.k0, this->m_par.es, this->m_proj_parm.en); if (fabs(lp_lat) >= HALFPI) { lp_lat = xy_y < 0. ? -HALFPI : HALFPI; @@ -172,12 +172,12 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double b, cosphi; - + /* - * Fail if our longitude is more than 90 degrees from the - * central meridian since the results are essentially garbage. + * Fail if our longitude is more than 90 degrees from the + * central meridian since the results are essentially garbage. * Is error -20 really an appropriate return value? - * + * * http://trac.osgeo.org/proj/ticket/5 */ if( lp_lon < -HALFPI || lp_lon > HALFPI ) @@ -187,7 +187,7 @@ namespace boost { namespace geometry { namespace projections throw proj_exception(-14 ); return; } - + b = (cosphi = cos(lp_lat)) * sin(lp_lon); if (fabs(fabs(b) - 1.) <= EPS10) throw proj_exception();; xy_x = this->m_proj_parm.ml0 * log((1. + b) / (1. - b)); @@ -203,7 +203,7 @@ namespace boost { namespace geometry { namespace projections inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const { double h, g; - + h = exp(xy_x / this->m_proj_parm.esp); g = .5 * (h - 1. / h); h = cos(this->m_par.phi0 + xy_y / this->m_proj_parm.esp); diff --git a/include/boost/geometry/extensions/gis/projections/proj/tpeqd.hpp b/include/boost/geometry/extensions/gis/projections/proj/tpeqd.hpp index 46209a6f4..6f5ccc5f9 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/tpeqd.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/tpeqd.hpp @@ -71,7 +71,7 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double t, z1, z2, dl1, dl2, sp, cp; - + sp = sin(lp_lat); cp = cos(lp_lat); z1 = aacos(this->m_proj_parm.sp1 * sp + this->m_proj_parm.cp1 * cp * cos(dl1 = lp_lon + this->m_proj_parm.dlam2)); @@ -88,7 +88,7 @@ namespace boost { namespace geometry { namespace projections inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const { double cz1, cz2, s, d, cp, sp; - + cz1 = cos(boost::math::hypot(xy_y, xy_x + this->m_proj_parm.hz0)); cz2 = cos(boost::math::hypot(xy_y, xy_x - this->m_proj_parm.hz0)); s = cz1 + cz2; diff --git a/include/boost/geometry/extensions/gis/projections/proj/urm5.hpp b/include/boost/geometry/extensions/gis/projections/proj/urm5.hpp index 7d1fba571..8014f4f72 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/urm5.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/urm5.hpp @@ -70,7 +70,7 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double t; - + t = lp_lat = aasin(this->m_proj_parm.n * sin(lp_lat)); xy_x = this->m_proj_parm.m * lp_lon * cos(lp_lat); t *= t; diff --git a/include/boost/geometry/extensions/gis/projections/proj/vandg.hpp b/include/boost/geometry/extensions/gis/projections/proj/vandg.hpp index adac3265f..1e01a7cf3 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/vandg.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/vandg.hpp @@ -73,7 +73,7 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double al, al2, g, g2, p2; - + p2 = fabs(lp_lat / HALFPI); if ((p2 - TOL) > 1.) throw proj_exception();; if (p2 > 1.) @@ -107,7 +107,7 @@ namespace boost { namespace geometry { namespace projections inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const { double t, c0, c1, c2, c3, al, r2, r, m, d, ay, x2, y2; - + x2 = xy_x * xy_x; if ((ay = fabs(xy_y)) < TOL) { lp_lat = 0.; diff --git a/include/boost/geometry/extensions/gis/projections/proj/vandg2.hpp b/include/boost/geometry/extensions/gis/projections/proj/vandg2.hpp index fcb13ca7e..686cac9a7 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/vandg2.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/vandg2.hpp @@ -72,7 +72,7 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double x1, at, bt, ct; - + bt = fabs(TWORPI * lp_lat); if ((ct = 1. - bt * bt) < 0.) ct = 0.; diff --git a/include/boost/geometry/extensions/gis/projections/proj/vandg4.hpp b/include/boost/geometry/extensions/gis/projections/proj/vandg4.hpp index 7a851a975..a5c104480 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/vandg4.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/vandg4.hpp @@ -67,7 +67,7 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double x1, t, bt, ct, ft, bt2, ct2, dt, dt2; - + if (fabs(lp_lat) < TOL) { xy_x = lp_lon; xy_y = 0.; diff --git a/include/boost/geometry/extensions/gis/projections/proj/wag7.hpp b/include/boost/geometry/extensions/gis/projections/proj/wag7.hpp index 0233ddcf7..371777b5b 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/wag7.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/wag7.hpp @@ -65,7 +65,7 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double theta, ct, D; - + theta = asin(xy_y = 0.90630778703664996 * sin(lp_lat)); xy_x = 2.66723 * (ct = cos(theta)) * sin(lp_lon /= 3.); xy_y *= 1.24104 * (D = 1/(sqrt(0.5 * (1 + ct * cos(lp_lon))))); diff --git a/include/boost/geometry/extensions/gis/projections/proj/wink2.hpp b/include/boost/geometry/extensions/gis/projections/proj/wink2.hpp index 5ea5011b4..e11d259c1 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/wink2.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/wink2.hpp @@ -74,7 +74,7 @@ namespace boost { namespace geometry { namespace projections { double k, V; int i; - + xy_y = lp_lat * TWO_D_PI; k = PI * sin(lp_lat); lp_lat *= 1.8; From 6b3996da018ad4a34abf6bdd47568199873109a3 Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Thu, 23 Apr 2015 19:32:17 +0200 Subject: [PATCH 38/89] [projections] ONLY: updated copyright message --- .../boost/geometry/extensions/gis/projections/proj/aea.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/aeqd.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/airy.hpp | 5 ++++- .../geometry/extensions/gis/projections/proj/aitoff.hpp | 5 ++++- .../geometry/extensions/gis/projections/proj/august.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/bacon.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/bipc.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/boggs.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/bonne.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/cass.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/cc.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/cea.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/chamb.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/collg.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/crast.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/denoy.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/eck1.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/eck2.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/eck3.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/eck4.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/eck5.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/eqc.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/eqdc.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/fahey.hpp | 5 ++++- .../geometry/extensions/gis/projections/proj/fouc_s.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/gall.hpp | 5 ++++- .../geometry/extensions/gis/projections/proj/geocent.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/geos.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/gins8.hpp | 5 ++++- .../geometry/extensions/gis/projections/proj/gn_sinu.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/gnom.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/goode.hpp | 5 ++++- .../geometry/extensions/gis/projections/proj/gstmerc.hpp | 5 ++++- .../geometry/extensions/gis/projections/proj/hammer.hpp | 5 ++++- .../geometry/extensions/gis/projections/proj/hatano.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/imw_p.hpp | 5 ++++- .../geometry/extensions/gis/projections/proj/krovak.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/labrd.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/laea.hpp | 5 ++++- .../geometry/extensions/gis/projections/proj/lagrng.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/larr.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/lask.hpp | 5 ++++- .../geometry/extensions/gis/projections/proj/latlong.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/lcc.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/lcca.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/loxim.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/lsat.hpp | 5 ++++- .../geometry/extensions/gis/projections/proj/mbt_fps.hpp | 5 ++++- .../geometry/extensions/gis/projections/proj/mbtfpp.hpp | 5 ++++- .../geometry/extensions/gis/projections/proj/mbtfpq.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/merc.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/mill.hpp | 5 ++++- .../geometry/extensions/gis/projections/proj/mod_ster.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/moll.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/nell.hpp | 5 ++++- .../geometry/extensions/gis/projections/proj/nell_h.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/nocol.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/nsper.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/nzmg.hpp | 5 ++++- .../geometry/extensions/gis/projections/proj/ob_tran.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/ocea.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/oea.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/omerc.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/ortho.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/poly.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/putp2.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/putp3.hpp | 5 ++++- .../geometry/extensions/gis/projections/proj/putp4p.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/putp5.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/putp6.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/robin.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/rouss.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/rpoly.hpp | 5 ++++- .../geometry/extensions/gis/projections/proj/sconics.hpp | 5 ++++- .../geometry/extensions/gis/projections/proj/somerc.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/stere.hpp | 5 ++++- .../geometry/extensions/gis/projections/proj/sterea.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/sts.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/tcc.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/tcea.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/tmerc.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/tpeqd.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/urm5.hpp | 5 ++++- .../geometry/extensions/gis/projections/proj/urmfps.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/vandg.hpp | 5 ++++- .../geometry/extensions/gis/projections/proj/vandg2.hpp | 5 ++++- .../geometry/extensions/gis/projections/proj/vandg4.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/wag2.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/wag3.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/wag7.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/wink1.hpp | 5 ++++- .../boost/geometry/extensions/gis/projections/proj/wink2.hpp | 5 ++++- 92 files changed, 368 insertions(+), 92 deletions(-) diff --git a/include/boost/geometry/extensions/gis/projections/proj/aea.hpp b/include/boost/geometry/extensions/gis/projections/proj/aea.hpp index 5a75e1b69..aedd170ea 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/aea.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/aea.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/aeqd.hpp b/include/boost/geometry/extensions/gis/projections/proj/aeqd.hpp index ca4f10062..a670a93c0 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/aeqd.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/aeqd.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/airy.hpp b/include/boost/geometry/extensions/gis/projections/proj/airy.hpp index ae8ef817f..dfa0e648e 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/airy.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/airy.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/aitoff.hpp b/include/boost/geometry/extensions/gis/projections/proj/aitoff.hpp index 43002fc01..a52b14af7 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/aitoff.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/aitoff.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/august.hpp b/include/boost/geometry/extensions/gis/projections/proj/august.hpp index 0dcabbd57..fcad9ba53 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/august.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/august.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/bacon.hpp b/include/boost/geometry/extensions/gis/projections/proj/bacon.hpp index 329e0a078..f1a558b5a 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/bacon.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/bacon.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/bipc.hpp b/include/boost/geometry/extensions/gis/projections/proj/bipc.hpp index 86b61fe19..8daebcbdd 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/bipc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/bipc.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/boggs.hpp b/include/boost/geometry/extensions/gis/projections/proj/boggs.hpp index 4ac7b53f7..b756e44bb 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/boggs.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/boggs.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/bonne.hpp b/include/boost/geometry/extensions/gis/projections/proj/bonne.hpp index d95f9a935..f76e09f04 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/bonne.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/bonne.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/cass.hpp b/include/boost/geometry/extensions/gis/projections/proj/cass.hpp index 6bc53efdc..c8dfc0f7d 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/cass.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/cass.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/cc.hpp b/include/boost/geometry/extensions/gis/projections/proj/cc.hpp index 0a52094c6..bbc7c475e 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/cc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/cc.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/cea.hpp b/include/boost/geometry/extensions/gis/projections/proj/cea.hpp index e6fdd43e9..35a673858 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/cea.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/cea.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/chamb.hpp b/include/boost/geometry/extensions/gis/projections/proj/chamb.hpp index e00e552db..a334e50e6 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/chamb.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/chamb.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/collg.hpp b/include/boost/geometry/extensions/gis/projections/proj/collg.hpp index 67ed521fc..70335de4f 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/collg.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/collg.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/crast.hpp b/include/boost/geometry/extensions/gis/projections/proj/crast.hpp index 32ea0d8af..9dd998792 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/crast.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/crast.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/denoy.hpp b/include/boost/geometry/extensions/gis/projections/proj/denoy.hpp index 2126ea621..179643829 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/denoy.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/denoy.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/eck1.hpp b/include/boost/geometry/extensions/gis/projections/proj/eck1.hpp index 1d939ef92..35bd58bf5 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/eck1.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/eck1.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/eck2.hpp b/include/boost/geometry/extensions/gis/projections/proj/eck2.hpp index 9b258471c..2858610e2 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/eck2.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/eck2.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/eck3.hpp b/include/boost/geometry/extensions/gis/projections/proj/eck3.hpp index b21daf922..bab61d8c5 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/eck3.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/eck3.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/eck4.hpp b/include/boost/geometry/extensions/gis/projections/proj/eck4.hpp index ef2b1d6c2..53cbe31f9 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/eck4.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/eck4.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/eck5.hpp b/include/boost/geometry/extensions/gis/projections/proj/eck5.hpp index 52f9bae4e..63ed2038a 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/eck5.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/eck5.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/eqc.hpp b/include/boost/geometry/extensions/gis/projections/proj/eqc.hpp index 661eafdf9..a72017fc7 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/eqc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/eqc.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/eqdc.hpp b/include/boost/geometry/extensions/gis/projections/proj/eqdc.hpp index 54a791a6a..dd82cef0f 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/eqdc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/eqdc.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/fahey.hpp b/include/boost/geometry/extensions/gis/projections/proj/fahey.hpp index b4a31aa80..91b96fcb2 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/fahey.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/fahey.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/fouc_s.hpp b/include/boost/geometry/extensions/gis/projections/proj/fouc_s.hpp index d756116d3..fcaafded5 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/fouc_s.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/fouc_s.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/gall.hpp b/include/boost/geometry/extensions/gis/projections/proj/gall.hpp index 1e687ceb8..177d80d16 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/gall.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/gall.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/geocent.hpp b/include/boost/geometry/extensions/gis/projections/proj/geocent.hpp index 4ed2e2bf5..81026f735 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/geocent.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/geocent.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/geos.hpp b/include/boost/geometry/extensions/gis/projections/proj/geos.hpp index f4d5948bb..cf8a0cb5c 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/geos.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/geos.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/gins8.hpp b/include/boost/geometry/extensions/gis/projections/proj/gins8.hpp index 4b266b99a..85394ddab 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/gins8.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/gins8.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/gn_sinu.hpp b/include/boost/geometry/extensions/gis/projections/proj/gn_sinu.hpp index 62a9eeb7c..a1dc6ea39 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/gn_sinu.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/gn_sinu.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/gnom.hpp b/include/boost/geometry/extensions/gis/projections/proj/gnom.hpp index 65ff0f8f7..d48e98323 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/gnom.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/gnom.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/goode.hpp b/include/boost/geometry/extensions/gis/projections/proj/goode.hpp index 2058f2c47..d3a461491 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/goode.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/goode.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/gstmerc.hpp b/include/boost/geometry/extensions/gis/projections/proj/gstmerc.hpp index 93085bc61..7cb2a5419 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/gstmerc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/gstmerc.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/hammer.hpp b/include/boost/geometry/extensions/gis/projections/proj/hammer.hpp index 8c8e21054..88874dd90 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/hammer.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/hammer.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/hatano.hpp b/include/boost/geometry/extensions/gis/projections/proj/hatano.hpp index 78661b256..cfda1242e 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/hatano.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/hatano.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/imw_p.hpp b/include/boost/geometry/extensions/gis/projections/proj/imw_p.hpp index 32e090988..76bd90081 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/imw_p.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/imw_p.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/krovak.hpp b/include/boost/geometry/extensions/gis/projections/proj/krovak.hpp index da6d6198e..c0e1c51e7 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/krovak.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/krovak.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/labrd.hpp b/include/boost/geometry/extensions/gis/projections/proj/labrd.hpp index 533f9866e..5a9bb5251 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/labrd.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/labrd.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/laea.hpp b/include/boost/geometry/extensions/gis/projections/proj/laea.hpp index 7e3a2f1ba..81c4bf7a2 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/laea.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/laea.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/lagrng.hpp b/include/boost/geometry/extensions/gis/projections/proj/lagrng.hpp index 3bb65fdd3..2c952688c 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/lagrng.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/lagrng.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/larr.hpp b/include/boost/geometry/extensions/gis/projections/proj/larr.hpp index 8be99f89b..9f00af0be 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/larr.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/larr.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/lask.hpp b/include/boost/geometry/extensions/gis/projections/proj/lask.hpp index 9da4e28be..92a398853 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/lask.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/lask.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/latlong.hpp b/include/boost/geometry/extensions/gis/projections/proj/latlong.hpp index 7c1e487a4..dc59ac994 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/latlong.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/latlong.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/lcc.hpp b/include/boost/geometry/extensions/gis/projections/proj/lcc.hpp index 7d3e761d3..529b4ab03 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/lcc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/lcc.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/lcca.hpp b/include/boost/geometry/extensions/gis/projections/proj/lcca.hpp index 23cf838e5..7d8531420 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/lcca.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/lcca.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/loxim.hpp b/include/boost/geometry/extensions/gis/projections/proj/loxim.hpp index f99ba95e6..9ea3dee86 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/loxim.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/loxim.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/lsat.hpp b/include/boost/geometry/extensions/gis/projections/proj/lsat.hpp index bd77d5c15..a6f0ac59b 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/lsat.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/lsat.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/mbt_fps.hpp b/include/boost/geometry/extensions/gis/projections/proj/mbt_fps.hpp index 7b0a09234..8dd01505e 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/mbt_fps.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/mbt_fps.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/mbtfpp.hpp b/include/boost/geometry/extensions/gis/projections/proj/mbtfpp.hpp index c25c56376..a7d1cb4fb 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/mbtfpp.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/mbtfpp.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/mbtfpq.hpp b/include/boost/geometry/extensions/gis/projections/proj/mbtfpq.hpp index 2c0323c71..421eeffe2 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/mbtfpq.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/mbtfpq.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/merc.hpp b/include/boost/geometry/extensions/gis/projections/proj/merc.hpp index b3ed86c23..ac536f535 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/merc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/merc.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/mill.hpp b/include/boost/geometry/extensions/gis/projections/proj/mill.hpp index e5e4291f7..04dab0d28 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/mill.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/mill.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/mod_ster.hpp b/include/boost/geometry/extensions/gis/projections/proj/mod_ster.hpp index 2e997ba2c..5394bb86f 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/mod_ster.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/mod_ster.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/moll.hpp b/include/boost/geometry/extensions/gis/projections/proj/moll.hpp index 429ba1854..519a051b4 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/moll.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/moll.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/nell.hpp b/include/boost/geometry/extensions/gis/projections/proj/nell.hpp index a93fa45db..330c30aef 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/nell.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/nell.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/nell_h.hpp b/include/boost/geometry/extensions/gis/projections/proj/nell_h.hpp index aa6c72013..77017ea46 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/nell_h.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/nell_h.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/nocol.hpp b/include/boost/geometry/extensions/gis/projections/proj/nocol.hpp index bb9052abb..140932fc2 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/nocol.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/nocol.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/nsper.hpp b/include/boost/geometry/extensions/gis/projections/proj/nsper.hpp index db8e8db47..dfcb2ffee 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/nsper.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/nsper.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/nzmg.hpp b/include/boost/geometry/extensions/gis/projections/proj/nzmg.hpp index 67b50a9eb..d47a1361e 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/nzmg.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/nzmg.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/ob_tran.hpp b/include/boost/geometry/extensions/gis/projections/proj/ob_tran.hpp index 5bae0ae93..90c2ec83f 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/ob_tran.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/ob_tran.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/ocea.hpp b/include/boost/geometry/extensions/gis/projections/proj/ocea.hpp index 1c1e1cf1e..cc0351f4a 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/ocea.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/ocea.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/oea.hpp b/include/boost/geometry/extensions/gis/projections/proj/oea.hpp index d6fb0c55c..1eaa4722f 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/oea.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/oea.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/omerc.hpp b/include/boost/geometry/extensions/gis/projections/proj/omerc.hpp index 010cf978d..922f4b9cd 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/omerc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/omerc.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/ortho.hpp b/include/boost/geometry/extensions/gis/projections/proj/ortho.hpp index d3908a3df..db7b8a378 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/ortho.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/ortho.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/poly.hpp b/include/boost/geometry/extensions/gis/projections/proj/poly.hpp index 98245d288..c9cd40871 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/poly.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/poly.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/putp2.hpp b/include/boost/geometry/extensions/gis/projections/proj/putp2.hpp index 225b4de25..c0720c411 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/putp2.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/putp2.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/putp3.hpp b/include/boost/geometry/extensions/gis/projections/proj/putp3.hpp index 46ac57bd9..296c6ce9c 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/putp3.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/putp3.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/putp4p.hpp b/include/boost/geometry/extensions/gis/projections/proj/putp4p.hpp index 5d156ed07..08d31a9bc 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/putp4p.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/putp4p.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/putp5.hpp b/include/boost/geometry/extensions/gis/projections/proj/putp5.hpp index 870340326..b94f20984 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/putp5.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/putp5.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/putp6.hpp b/include/boost/geometry/extensions/gis/projections/proj/putp6.hpp index cf8c69451..1f1e1efd3 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/putp6.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/putp6.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/robin.hpp b/include/boost/geometry/extensions/gis/projections/proj/robin.hpp index a151a0d9c..d6b3a0cc6 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/robin.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/robin.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/rouss.hpp b/include/boost/geometry/extensions/gis/projections/proj/rouss.hpp index 4d8498af6..b247e7767 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/rouss.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/rouss.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/rpoly.hpp b/include/boost/geometry/extensions/gis/projections/proj/rpoly.hpp index 26876ef4c..df33dd1ba 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/rpoly.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/rpoly.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/sconics.hpp b/include/boost/geometry/extensions/gis/projections/proj/sconics.hpp index 3882b1391..9dbdeeed8 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/sconics.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/sconics.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/somerc.hpp b/include/boost/geometry/extensions/gis/projections/proj/somerc.hpp index 844702193..6c1f872ae 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/somerc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/somerc.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/stere.hpp b/include/boost/geometry/extensions/gis/projections/proj/stere.hpp index 1ae0594bf..d242eacc7 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/stere.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/stere.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/sterea.hpp b/include/boost/geometry/extensions/gis/projections/proj/sterea.hpp index 115ed1b5a..cdf35ab0b 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/sterea.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/sterea.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/sts.hpp b/include/boost/geometry/extensions/gis/projections/proj/sts.hpp index 41b83c292..5c9a06b14 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/sts.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/sts.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/tcc.hpp b/include/boost/geometry/extensions/gis/projections/proj/tcc.hpp index 832b6e0f1..588533369 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/tcc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/tcc.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/tcea.hpp b/include/boost/geometry/extensions/gis/projections/proj/tcea.hpp index 840c9e406..737f72ee4 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/tcea.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/tcea.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/tmerc.hpp b/include/boost/geometry/extensions/gis/projections/proj/tmerc.hpp index 62d742d87..a08df6182 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/tmerc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/tmerc.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/tpeqd.hpp b/include/boost/geometry/extensions/gis/projections/proj/tpeqd.hpp index 6f5ccc5f9..5bfbee9ae 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/tpeqd.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/tpeqd.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/urm5.hpp b/include/boost/geometry/extensions/gis/projections/proj/urm5.hpp index 8014f4f72..519aebf00 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/urm5.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/urm5.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/urmfps.hpp b/include/boost/geometry/extensions/gis/projections/proj/urmfps.hpp index 76f63520b..23589402d 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/urmfps.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/urmfps.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/vandg.hpp b/include/boost/geometry/extensions/gis/projections/proj/vandg.hpp index 1e01a7cf3..509a593c6 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/vandg.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/vandg.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/vandg2.hpp b/include/boost/geometry/extensions/gis/projections/proj/vandg2.hpp index 686cac9a7..8d4ffd5fa 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/vandg2.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/vandg2.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/vandg4.hpp b/include/boost/geometry/extensions/gis/projections/proj/vandg4.hpp index a5c104480..58048e013 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/vandg4.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/vandg4.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/wag2.hpp b/include/boost/geometry/extensions/gis/projections/proj/wag2.hpp index 0d14574cd..69c733f91 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/wag2.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/wag2.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/wag3.hpp b/include/boost/geometry/extensions/gis/projections/proj/wag3.hpp index 887b017ed..c7703f47a 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/wag3.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/wag3.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/wag7.hpp b/include/boost/geometry/extensions/gis/projections/proj/wag7.hpp index 371777b5b..4ac2ef644 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/wag7.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/wag7.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/wink1.hpp b/include/boost/geometry/extensions/gis/projections/proj/wink1.hpp index 97db1d398..ed6c07666 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/wink1.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/wink1.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/wink2.hpp b/include/boost/geometry/extensions/gis/projections/proj/wink2.hpp index e11d259c1..d4973b4c2 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/wink2.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/wink2.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.8.0 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,6 +37,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + #include #include From 623a488abd60ab5cdb4135bea347f5f73ade4015 Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Thu, 23 Apr 2015 19:42:01 +0200 Subject: [PATCH 39/89] [projections] ONLY: use boost::ignore_unused now --- .../boost/geometry/extensions/gis/projections/proj/aea.hpp | 6 +++--- .../geometry/extensions/gis/projections/proj/aitoff.hpp | 6 +++--- .../boost/geometry/extensions/gis/projections/proj/eck3.hpp | 6 +++--- .../geometry/extensions/gis/projections/proj/gn_sinu.hpp | 6 +++--- .../geometry/extensions/gis/projections/proj/mod_ster.hpp | 6 +++--- .../boost/geometry/extensions/gis/projections/proj/moll.hpp | 6 +++--- .../geometry/extensions/gis/projections/proj/nsper.hpp | 6 +++--- .../geometry/extensions/gis/projections/proj/ob_tran.hpp | 2 +- .../geometry/extensions/gis/projections/proj/putp3.hpp | 6 +++--- .../geometry/extensions/gis/projections/proj/putp4p.hpp | 6 +++--- .../geometry/extensions/gis/projections/proj/putp5.hpp | 6 +++--- .../geometry/extensions/gis/projections/proj/putp6.hpp | 6 +++--- .../geometry/extensions/gis/projections/proj/sconics.hpp | 6 +++--- .../geometry/extensions/gis/projections/proj/stere.hpp | 6 +++--- .../boost/geometry/extensions/gis/projections/proj/sts.hpp | 6 +++--- .../geometry/extensions/gis/projections/proj/tmerc.hpp | 6 +++--- .../geometry/extensions/gis/projections/proj/urmfps.hpp | 6 +++--- 17 files changed, 49 insertions(+), 49 deletions(-) diff --git a/include/boost/geometry/extensions/gis/projections/proj/aea.hpp b/include/boost/geometry/extensions/gis/projections/proj/aea.hpp index aedd170ea..3b7108722 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/aea.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/aea.hpp @@ -38,7 +38,7 @@ // DEALINGS IN THE SOFTWARE. -#include +#include #include #include @@ -158,8 +158,8 @@ namespace boost { namespace geometry { namespace projections template void setup(Parameters& par, par_aea& proj_parm) { - boost::ignore_unused_variable_warning(par); - boost::ignore_unused_variable_warning(proj_parm); + boost::ignore_unused(par); + boost::ignore_unused(proj_parm); double cosphi, sinphi; int secant; if (fabs(proj_parm.phi1 + proj_parm.phi2) < EPS10) throw proj_exception(-21); diff --git a/include/boost/geometry/extensions/gis/projections/proj/aitoff.hpp b/include/boost/geometry/extensions/gis/projections/proj/aitoff.hpp index a52b14af7..7ffc989f6 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/aitoff.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/aitoff.hpp @@ -38,7 +38,7 @@ // DEALINGS IN THE SOFTWARE. -#include +#include #include #include @@ -95,8 +95,8 @@ namespace boost { namespace geometry { namespace projections template void setup(Parameters& par, par_aitoff& proj_parm) { - boost::ignore_unused_variable_warning(par); - boost::ignore_unused_variable_warning(proj_parm); + boost::ignore_unused(par); + boost::ignore_unused(proj_parm); // par.inv = 0; // par.fwd = s_forward; par.es = 0.; diff --git a/include/boost/geometry/extensions/gis/projections/proj/eck3.hpp b/include/boost/geometry/extensions/gis/projections/proj/eck3.hpp index bab61d8c5..d98475dbd 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/eck3.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/eck3.hpp @@ -38,7 +38,7 @@ // DEALINGS IN THE SOFTWARE. -#include +#include #include #include @@ -87,8 +87,8 @@ namespace boost { namespace geometry { namespace projections template void setup(Parameters& par, par_eck3& proj_parm) { - boost::ignore_unused_variable_warning(par); - boost::ignore_unused_variable_warning(proj_parm); + boost::ignore_unused(par); + boost::ignore_unused(proj_parm); par.es = 0.; // par.inv = s_inverse; // par.fwd = s_forward; diff --git a/include/boost/geometry/extensions/gis/projections/proj/gn_sinu.hpp b/include/boost/geometry/extensions/gis/projections/proj/gn_sinu.hpp index a1dc6ea39..da80f8e6f 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/gn_sinu.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/gn_sinu.hpp @@ -38,7 +38,7 @@ // DEALINGS IN THE SOFTWARE. -#include +#include #include #include @@ -149,8 +149,8 @@ namespace boost { namespace geometry { namespace projections template void setup(Parameters& par, par_gn_sinu& proj_parm) { - boost::ignore_unused_variable_warning(par); - boost::ignore_unused_variable_warning(proj_parm); + boost::ignore_unused(par); + boost::ignore_unused(proj_parm); par.es = 0; proj_parm.C_x = (proj_parm.C_y = sqrt((proj_parm.m + 1.) / proj_parm.n))/(proj_parm.m + 1.); // par.inv = s_inverse; diff --git a/include/boost/geometry/extensions/gis/projections/proj/mod_ster.hpp b/include/boost/geometry/extensions/gis/projections/proj/mod_ster.hpp index 5394bb86f..2d5b36ade 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/mod_ster.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/mod_ster.hpp @@ -38,7 +38,7 @@ // DEALINGS IN THE SOFTWARE. -#include +#include #include #include @@ -150,8 +150,8 @@ namespace boost { namespace geometry { namespace projections template void setup(Parameters& par, par_mod_ster& proj_parm) /* general initialization */ { - boost::ignore_unused_variable_warning(par); - boost::ignore_unused_variable_warning(proj_parm); + boost::ignore_unused(par); + boost::ignore_unused(proj_parm); double esphi, chio; if (par.es) { esphi = par.e * sin(par.phi0); diff --git a/include/boost/geometry/extensions/gis/projections/proj/moll.hpp b/include/boost/geometry/extensions/gis/projections/proj/moll.hpp index 519a051b4..d47d90754 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/moll.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/moll.hpp @@ -38,7 +38,7 @@ // DEALINGS IN THE SOFTWARE. -#include +#include #include #include @@ -106,8 +106,8 @@ namespace boost { namespace geometry { namespace projections template void setup(Parameters& par, par_moll& proj_parm, double p) { - boost::ignore_unused_variable_warning(par); - boost::ignore_unused_variable_warning(proj_parm); + boost::ignore_unused(par); + boost::ignore_unused(proj_parm); double r, sp, p2 = p + p; par.es = 0; sp = sin(p); diff --git a/include/boost/geometry/extensions/gis/projections/proj/nsper.hpp b/include/boost/geometry/extensions/gis/projections/proj/nsper.hpp index dfcb2ffee..277e1f37a 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/nsper.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/nsper.hpp @@ -38,7 +38,7 @@ // DEALINGS IN THE SOFTWARE. -#include +#include #include #include @@ -185,8 +185,8 @@ namespace boost { namespace geometry { namespace projections template void setup(Parameters& par, par_nsper& proj_parm) { - boost::ignore_unused_variable_warning(par); - boost::ignore_unused_variable_warning(proj_parm); + boost::ignore_unused(par); + boost::ignore_unused(proj_parm); if ((proj_parm.height = pj_param(par.params, "dh").f) <= 0.) throw proj_exception(-30); if (fabs(fabs(par.phi0) - HALFPI) < EPS10) proj_parm.mode = par.phi0 < 0. ? S_POLE : N_POLE; diff --git a/include/boost/geometry/extensions/gis/projections/proj/ob_tran.hpp b/include/boost/geometry/extensions/gis/projections/proj/ob_tran.hpp index 90c2ec83f..0eb65b472 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/ob_tran.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/ob_tran.hpp @@ -227,7 +227,7 @@ namespace boost { namespace geometry { namespace projections // par.fwd = t_forward; // par.inv = pj.inv ? t_inverse : 0; } - boost::ignore_unused_variable_warning(i); + boost::ignore_unused(i); // return phip to choose model return phip; } diff --git a/include/boost/geometry/extensions/gis/projections/proj/putp3.hpp b/include/boost/geometry/extensions/gis/projections/proj/putp3.hpp index 296c6ce9c..3e0b70f8c 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/putp3.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/putp3.hpp @@ -38,7 +38,7 @@ // DEALINGS IN THE SOFTWARE. -#include +#include #include #include @@ -89,8 +89,8 @@ namespace boost { namespace geometry { namespace projections template void setup(Parameters& par, par_putp3& proj_parm) { - boost::ignore_unused_variable_warning(par); - boost::ignore_unused_variable_warning(proj_parm); + boost::ignore_unused(par); + boost::ignore_unused(proj_parm); par.es = 0.; // par.inv = s_inverse; // par.fwd = s_forward; diff --git a/include/boost/geometry/extensions/gis/projections/proj/putp4p.hpp b/include/boost/geometry/extensions/gis/projections/proj/putp4p.hpp index 08d31a9bc..5096b01a1 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/putp4p.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/putp4p.hpp @@ -38,7 +38,7 @@ // DEALINGS IN THE SOFTWARE. -#include +#include #include #include @@ -92,8 +92,8 @@ namespace boost { namespace geometry { namespace projections template void setup(Parameters& par, par_putp4p& proj_parm) { - boost::ignore_unused_variable_warning(par); - boost::ignore_unused_variable_warning(proj_parm); + boost::ignore_unused(par); + boost::ignore_unused(proj_parm); par.es = 0.; // par.inv = s_inverse; // par.fwd = s_forward; diff --git a/include/boost/geometry/extensions/gis/projections/proj/putp5.hpp b/include/boost/geometry/extensions/gis/projections/proj/putp5.hpp index b94f20984..4ca77a510 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/putp5.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/putp5.hpp @@ -38,7 +38,7 @@ // DEALINGS IN THE SOFTWARE. -#include +#include #include #include @@ -89,8 +89,8 @@ namespace boost { namespace geometry { namespace projections template void setup(Parameters& par, par_putp5& proj_parm) { - boost::ignore_unused_variable_warning(par); - boost::ignore_unused_variable_warning(proj_parm); + boost::ignore_unused(par); + boost::ignore_unused(proj_parm); par.es = 0.; // par.inv = s_inverse; // par.fwd = s_forward; diff --git a/include/boost/geometry/extensions/gis/projections/proj/putp6.hpp b/include/boost/geometry/extensions/gis/projections/proj/putp6.hpp index 1f1e1efd3..4bdf271e6 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/putp6.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/putp6.hpp @@ -38,7 +38,7 @@ // DEALINGS IN THE SOFTWARE. -#include +#include #include #include @@ -108,8 +108,8 @@ namespace boost { namespace geometry { namespace projections template void setup(Parameters& par, par_putp6& proj_parm) { - boost::ignore_unused_variable_warning(par); - boost::ignore_unused_variable_warning(proj_parm); + boost::ignore_unused(par); + boost::ignore_unused(proj_parm); par.es = 0.; // par.inv = s_inverse; // par.fwd = s_forward; diff --git a/include/boost/geometry/extensions/gis/projections/proj/sconics.hpp b/include/boost/geometry/extensions/gis/projections/proj/sconics.hpp index 9dbdeeed8..6259f9f74 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/sconics.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/sconics.hpp @@ -38,7 +38,7 @@ // DEALINGS IN THE SOFTWARE. -#include +#include #include #include @@ -151,8 +151,8 @@ namespace boost { namespace geometry { namespace projections template void setup(Parameters& par, par_sconics& proj_parm) { - boost::ignore_unused_variable_warning(par); - boost::ignore_unused_variable_warning(proj_parm); + boost::ignore_unused(par); + boost::ignore_unused(proj_parm); double del, cs; int i; if( (i = phi12(par, proj_parm, &del)) ) diff --git a/include/boost/geometry/extensions/gis/projections/proj/stere.hpp b/include/boost/geometry/extensions/gis/projections/proj/stere.hpp index d242eacc7..191935acb 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/stere.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/stere.hpp @@ -38,7 +38,7 @@ // DEALINGS IN THE SOFTWARE. -#include +#include #include #include @@ -256,8 +256,8 @@ namespace boost { namespace geometry { namespace projections template void setup(Parameters& par, par_stere& proj_parm) /* general initialization */ { - boost::ignore_unused_variable_warning(par); - boost::ignore_unused_variable_warning(proj_parm); + boost::ignore_unused(par); + boost::ignore_unused(proj_parm); double t; if (fabs((t = fabs(par.phi0)) - HALFPI) < EPS10) proj_parm.mode = par.phi0 < 0. ? S_POLE : N_POLE; diff --git a/include/boost/geometry/extensions/gis/projections/proj/sts.hpp b/include/boost/geometry/extensions/gis/projections/proj/sts.hpp index 5c9a06b14..2c562aa23 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/sts.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/sts.hpp @@ -38,7 +38,7 @@ // DEALINGS IN THE SOFTWARE. -#include +#include #include #include @@ -107,8 +107,8 @@ namespace boost { namespace geometry { namespace projections template void setup(Parameters& par, par_sts& proj_parm, double p, double q, int mode) { - boost::ignore_unused_variable_warning(par); - boost::ignore_unused_variable_warning(proj_parm); + boost::ignore_unused(par); + boost::ignore_unused(proj_parm); par.es = 0.; // par.inv = s_inverse; // par.fwd = s_forward; diff --git a/include/boost/geometry/extensions/gis/projections/proj/tmerc.hpp b/include/boost/geometry/extensions/gis/projections/proj/tmerc.hpp index a08df6182..579139156 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/tmerc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/tmerc.hpp @@ -38,7 +38,7 @@ // DEALINGS IN THE SOFTWARE. -#include +#include #include #include @@ -219,8 +219,8 @@ namespace boost { namespace geometry { namespace projections template void setup(Parameters& par, par_tmerc& proj_parm) /* general initialization */ { - boost::ignore_unused_variable_warning(par); - boost::ignore_unused_variable_warning(proj_parm); + boost::ignore_unused(par); + boost::ignore_unused(proj_parm); if (par.es) { pj_enfn(par.es, proj_parm.en); diff --git a/include/boost/geometry/extensions/gis/projections/proj/urmfps.hpp b/include/boost/geometry/extensions/gis/projections/proj/urmfps.hpp index 23589402d..b781c3217 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/urmfps.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/urmfps.hpp @@ -38,7 +38,7 @@ // DEALINGS IN THE SOFTWARE. -#include +#include #include #include @@ -91,8 +91,8 @@ namespace boost { namespace geometry { namespace projections template void setup(Parameters& par, par_urmfps& proj_parm) { - boost::ignore_unused_variable_warning(par); - boost::ignore_unused_variable_warning(proj_parm); + boost::ignore_unused(par); + boost::ignore_unused(proj_parm); proj_parm.C_y = Cy / proj_parm.n; par.es = 0.; // par.inv = s_inverse; From ed52199def8834049f5e502bc4d75d5299a9ddd8 Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Thu, 23 Apr 2015 23:28:37 +0200 Subject: [PATCH 40/89] [extensions][wkb] Fix GCC compilation errors and warnings. --- .../extensions/gis/io/wkb/detail/ogc.hpp | 112 ++++++------------ .../extensions/gis/io/wkb/detail/parser.hpp | 2 - .../extensions/gis/io/wkb/detail/writer.hpp | 12 +- .../extensions/gis/io/wkb/utility.hpp | 5 +- .../extensions/gis/io/wkb/write_wkb.hpp | 8 +- 5 files changed, 53 insertions(+), 86 deletions(-) diff --git a/include/boost/geometry/extensions/gis/io/wkb/detail/ogc.hpp b/include/boost/geometry/extensions/gis/io/wkb/detail/ogc.hpp index a8eaf2787..8751f70c9 100644 --- a/include/boost/geometry/extensions/gis/io/wkb/detail/ogc.hpp +++ b/include/boost/geometry/extensions/gis/io/wkb/detail/ogc.hpp @@ -107,6 +107,37 @@ struct ewkt_policy { }; +template ::value> +struct geometry_type_impl +{ + static bool check(boost::uint32_t value) + { + return value == get(); + } + + static boost::uint32_t get() + { + return OgcType; + } +}; + +template +struct geometry_type_impl +{ + static bool check(boost::uint32_t value) + { + return value == get(); + } + + static boost::uint32_t get() + { + return 1000 + OgcType; + } +}; + template < typename Geometry, @@ -119,87 +150,18 @@ struct geometry_type : not_implemented template struct geometry_type -{ - static bool check(boost::uint32_t value) - { - return value == get_impl::value>(); - } - - static boost::uint32_t get() - { - return get_impl::value>(); - } - -private: - - template - static boost::uint32_t get_impl() - { - return geometry_type_ogc::point; - } - - template <> - static boost::uint32_t get_impl<3>() - { - return 1000 + geometry_type_ogc::point; - } -}; + : geometry_type_impl +{}; template struct geometry_type -{ - static bool check(boost::uint32_t value) - { - return value == get_impl::value>(); - } - - static boost::uint32_t get() - { - return get_impl::value>(); - } - -private: - - template - static boost::uint32_t get_impl() - { - return geometry_type_ogc::linestring; - } - - template <> - static boost::uint32_t get_impl<3>() - { - return 1000 + geometry_type_ogc::linestring; - } -}; + : geometry_type_impl +{}; template struct geometry_type -{ - static bool check(boost::uint32_t value) - { - return value == get_impl::value>(); - } - - static boost::uint32_t get() - { - return get_impl::value>(); - } - -private: - - template - static boost::uint32_t get_impl() - { - return geometry_type_ogc::polygon; - } - - template <> - static boost::uint32_t get_impl<3>() - { - return 1000 + geometry_type_ogc::polygon; - } -}; + : geometry_type_impl +{}; }} // namespace detail::wkb #endif // DOXYGEN_NO_IMPL diff --git a/include/boost/geometry/extensions/gis/io/wkb/detail/parser.hpp b/include/boost/geometry/extensions/gis/io/wkb/detail/parser.hpp index eeb1f5c88..6017eb888 100644 --- a/include/boost/geometry/extensions/gis/io/wkb/detail/parser.hpp +++ b/include/boost/geometry/extensions/gis/io/wkb/detail/parser.hpp @@ -234,8 +234,6 @@ struct linestring_parser static bool parse(Iterator& it, Iterator end, L& linestring, byte_order_type::enum_t order) { - typedef typename point_type::type point_type; - if (!geometry_type_parser::parse(it, end, order)) { return false; diff --git a/include/boost/geometry/extensions/gis/io/wkb/detail/writer.hpp b/include/boost/geometry/extensions/gis/io/wkb/detail/writer.hpp index da6f4e51e..efb4505cf 100644 --- a/include/boost/geometry/extensions/gis/io/wkb/detail/writer.hpp +++ b/include/boost/geometry/extensions/gis/io/wkb/detail/writer.hpp @@ -126,7 +126,8 @@ namespace detail { namespace wkb typedef typename point_type::type point_type; - for(boost::range_iterator::type point_iter = boost::begin(linestring); + for(typename boost::range_iterator::type + point_iter = boost::begin(linestring); point_iter != boost::end(linestring); ++point_iter) { @@ -165,7 +166,8 @@ namespace detail { namespace wkb uint32_t num_exterior_ring_points = boost::geometry::num_points(exterior_ring); value_writer::write(num_exterior_ring_points, iter, byte_order); - for(boost::range_iterator::type point_iter = boost::begin(exterior_ring); + for(typename boost::range_iterator::type + point_iter = boost::begin(exterior_ring); point_iter != boost::end(exterior_ring); ++point_iter) { @@ -178,14 +180,16 @@ namespace detail { namespace wkb interior_rings_type interior_rings = boost::geometry::interior_rings(polygon); - for(boost::range_iterator::type interior_ring_iter = boost::begin(interior_rings); + for(typename boost::range_iterator::type + interior_ring_iter = boost::begin(interior_rings); interior_ring_iter != boost::end(interior_rings); ++interior_ring_iter) { uint32_t num_interior_ring_points = boost::geometry::num_points(*interior_ring_iter); value_writer::write(num_interior_ring_points, iter, byte_order); - for(boost::range_iterator::type point_iter = boost::begin(*interior_ring_iter); + for(typename boost::range_iterator::type + point_iter = boost::begin(*interior_ring_iter); point_iter != boost::end(*interior_ring_iter); ++point_iter) { diff --git a/include/boost/geometry/extensions/gis/io/wkb/utility.hpp b/include/boost/geometry/extensions/gis/io/wkb/utility.hpp index fd5e1dcae..86a559da7 100644 --- a/include/boost/geometry/extensions/gis/io/wkb/utility.hpp +++ b/include/boost/geometry/extensions/gis/io/wkb/utility.hpp @@ -83,7 +83,10 @@ bool wkb2hex(Iterator begin, Iterator end, std::string& hex) // Poor-man validation, no performance penalty expected // because begin/end always are random access iterators. - return hex.size() == (2 * std::distance(begin, end)); + typename std::iterator_traits::difference_type + diff = std::distance(begin, end); + BOOST_ASSERT(diff > 0); + return hex.size() == 2 * std::string::size_type(diff); } diff --git a/include/boost/geometry/extensions/gis/io/wkb/write_wkb.hpp b/include/boost/geometry/extensions/gis/io/wkb/write_wkb.hpp index 189484f17..62d5dc68a 100644 --- a/include/boost/geometry/extensions/gis/io/wkb/write_wkb.hpp +++ b/include/boost/geometry/extensions/gis/io/wkb/write_wkb.hpp @@ -25,7 +25,7 @@ template struct write_wkb { template - static inline bool write(const G& geometry, OutputIterator& iter, + static inline bool write(const G& geometry, OutputIterator iter, detail::wkb::byte_order_type::enum_t byte_order) { return detail::wkb::point_writer::write(geometry, iter, byte_order); @@ -36,7 +36,7 @@ template struct write_wkb { template - static inline bool write(const G& geometry, OutputIterator& iter, + static inline bool write(const G& geometry, OutputIterator iter, detail::wkb::byte_order_type::enum_t byte_order) { return detail::wkb::linestring_writer::write(geometry, iter, byte_order); @@ -47,7 +47,7 @@ template struct write_wkb { template - static inline bool write(const G& geometry, OutputIterator& iter, + static inline bool write(const G& geometry, OutputIterator iter, detail::wkb::byte_order_type::enum_t byte_order) { return detail::wkb::polygon_writer::write(geometry, iter, byte_order); @@ -58,7 +58,7 @@ struct write_wkb #endif // DOXYGEN_NO_DISPATCH template -inline bool write_wkb(const G& geometry, OutputIterator& iter) +inline bool write_wkb(const G& geometry, OutputIterator iter) { // The WKB is written to an OutputIterator. BOOST_STATIC_ASSERT(( From 0f62bdc57e0e061c2a653b8c6b0b5a004c0626e8 Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Fri, 24 Apr 2015 13:23:24 +0200 Subject: [PATCH 41/89] [extensions][wkb] Fix access to polygon rings + style changes. Use return type (a reference) instead of copying rings. Furthermore improve the code according to guidelines: - put const keyword after the type - take care about lines length - add copyright notes --- .../extensions/gis/io/wkb/detail/parser.hpp | 18 +-- .../extensions/gis/io/wkb/detail/writer.hpp | 118 +++++++++++------- .../extensions/gis/io/wkb/write_wkb.hpp | 8 ++ 3 files changed, 88 insertions(+), 56 deletions(-) diff --git a/include/boost/geometry/extensions/gis/io/wkb/detail/parser.hpp b/include/boost/geometry/extensions/gis/io/wkb/detail/parser.hpp index 6017eb888..cf569276d 100644 --- a/include/boost/geometry/extensions/gis/io/wkb/detail/parser.hpp +++ b/include/boost/geometry/extensions/gis/io/wkb/detail/parser.hpp @@ -9,14 +9,15 @@ #ifndef BOOST_GEOMETRY_IO_WKB_DETAIL_PARSER_HPP #define BOOST_GEOMETRY_IO_WKB_DETAIL_PARSER_HPP +#include #include #include -#include #include #include #include #include +#include #include #include #include @@ -117,7 +118,9 @@ struct geometry_type_parser } }; -template +template ::value> struct parsing_assigner { template @@ -145,7 +148,7 @@ struct parsing_assigner } }; -template +template struct parsing_assigner { template @@ -153,10 +156,7 @@ struct parsing_assigner byte_order_type::enum_t order) { // terminate - boost::ignore_unused_variable_warning(it); - boost::ignore_unused_variable_warning(end); - boost::ignore_unused_variable_warning(point); - boost::ignore_unused_variable_warning(order); + boost::ignore_unused(it, end, point, order); } }; @@ -171,7 +171,7 @@ struct point_parser { if (it != end) { - parsing_assigner::value>::run(it, end, point, order); + parsing_assigner

::run(it, end, point, order); } return true; } @@ -208,7 +208,7 @@ struct point_container_parser size_type points_parsed = 0; while (points_parsed < container_size && it != end) { - parsing_assigner::value>::run(it, end, point_buffer, order); + parsing_assigner::run(it, end, point_buffer, order); boost::geometry::append(container, point_buffer); ++points_parsed; } diff --git a/include/boost/geometry/extensions/gis/io/wkb/detail/writer.hpp b/include/boost/geometry/extensions/gis/io/wkb/detail/writer.hpp index efb4505cf..8dd0eda9d 100644 --- a/include/boost/geometry/extensions/gis/io/wkb/detail/writer.hpp +++ b/include/boost/geometry/extensions/gis/io/wkb/detail/writer.hpp @@ -1,17 +1,27 @@ +// Boost.Geometry +// +// Copyright (c) 2015 Mats Taraldsvik. +// +// Use, modification and distribution is subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + #ifndef BOOST_GEOMETRY_IO_WKB_DETAIL_WRITER_HPP #define BOOST_GEOMETRY_IO_WKB_DETAIL_WRITER_HPP +#include #include #include -#include #include #include #include +#include #include +#include +#include #include #include -#include #include #include @@ -21,9 +31,6 @@ #include #include -#include -#include - namespace boost { namespace geometry { @@ -37,7 +44,9 @@ namespace detail { namespace wkb typedef T value_type; template - static bool write(const T& value, OutputIterator& iter, byte_order_type::enum_t byte_order) + static bool write(T const& value, + OutputIterator& iter, + byte_order_type::enum_t byte_order) { endian::endian_value parsed_value(value); @@ -58,30 +67,36 @@ namespace detail { namespace wkb } }; - template + template ::value> struct writer_assigner { template - static void run(const P& point, OutputIterator& iter, byte_order_type::enum_t byte_order) + static void run(P const& point, + OutputIterator& iter, + byte_order_type::enum_t byte_order) { - typedef typename coordinate_type

::type coordinate_type; + // NOTE: coordinates of any type are converted to double - value_writer::write(boost::geometry::get(point), iter, byte_order); + value_writer::write(geometry::get(point), + iter, + byte_order); writer_assigner::run(point, iter, byte_order); } }; - template + template struct writer_assigner { template - static void run(const P& point, OutputIterator& iter, byte_order_type::enum_t byte_order) + static void run(P const& point, + OutputIterator& iter, + byte_order_type::enum_t byte_order) { // terminate - boost::ignore_unused_variable_warning(point); - boost::ignore_unused_variable_warning(iter); - boost::ignore_unused_variable_warning(byte_order); + boost::ignore_unused(point, iter, byte_order); } }; @@ -89,8 +104,9 @@ namespace detail { namespace wkb struct point_writer { template - static bool write(const P& point, OutputIterator& iter, - byte_order_type::enum_t byte_order) + static bool write(P const& point, + OutputIterator& iter, + byte_order_type::enum_t byte_order) { // write endian type value_writer::write(byte_order, iter, byte_order); @@ -100,7 +116,7 @@ namespace detail { namespace wkb value_writer::write(type, iter, byte_order); // write point's x, y, z - writer_assigner::value>::run(point, iter, byte_order); + writer_assigner

::run(point, iter, byte_order); return true; } @@ -110,8 +126,9 @@ namespace detail { namespace wkb struct linestring_writer { template - static bool write(const L& linestring, OutputIterator& iter, - byte_order_type::enum_t byte_order) + static bool write(L const& linestring, + OutputIterator& iter, + byte_order_type::enum_t byte_order) { // write endian type value_writer::write(byte_order, iter, byte_order); @@ -124,15 +141,14 @@ namespace detail { namespace wkb uint32_t num_points = boost::size(linestring); value_writer::write(num_points, iter, byte_order); - typedef typename point_type::type point_type; - - for(typename boost::range_iterator::type + for(typename boost::range_iterator::type point_iter = boost::begin(linestring); point_iter != boost::end(linestring); ++point_iter) { // write point's x, y, z - writer_assigner::value>::run(*point_iter, iter, byte_order); + writer_assigner::type> + ::run(*point_iter, iter, byte_order); } return true; @@ -143,8 +159,9 @@ namespace detail { namespace wkb struct polygon_writer { template - static bool write(const P& polygon, OutputIterator& iter, - byte_order_type::enum_t byte_order) + static bool write(P const& polygon, + OutputIterator& iter, + byte_order_type::enum_t byte_order) { // write endian type value_writer::write(byte_order, iter, byte_order); @@ -154,47 +171,54 @@ namespace detail { namespace wkb value_writer::write(type, iter, byte_order); // write num rings - uint32_t num_rings = 1 + boost::geometry::num_interior_rings(polygon); + uint32_t num_rings = 1 + geometry::num_interior_rings(polygon); value_writer::write(num_rings, iter, byte_order); - typedef typename point_type

::type point_type; - // write exterior ring - typedef typename boost::geometry::ring_type::type ring_type; - ring_type exterior_ring = boost::geometry::exterior_ring(polygon); + typedef typename geometry::ring_type

::type + ring_type; - uint32_t num_exterior_ring_points = boost::geometry::num_points(exterior_ring); - value_writer::write(num_exterior_ring_points, iter, byte_order); + typename geometry::ring_return_type

::type + exterior_ring = geometry::exterior_ring(polygon); - for(typename boost::range_iterator::type + value_writer::write(geometry::num_points(exterior_ring), + iter, + byte_order); + + for(typename boost::range_iterator::type point_iter = boost::begin(exterior_ring); point_iter != boost::end(exterior_ring); ++point_iter) { // write point's x, y, z - writer_assigner::value>::run(*point_iter, iter, byte_order); + writer_assigner::type> + ::run(*point_iter, iter, byte_order); } // write interor rings - typedef typename boost::geometry::interior_type::type interior_rings_type; + typedef typename geometry::interior_type

::type + interior_rings_type; - interior_rings_type interior_rings = boost::geometry::interior_rings(polygon); + typename geometry::interior_return_type

::type + interior_rings = geometry::interior_rings(polygon); - for(typename boost::range_iterator::type - interior_ring_iter = boost::begin(interior_rings); - interior_ring_iter != boost::end(interior_rings); - ++interior_ring_iter) + for(typename boost::range_iterator::type + ring_iter = boost::begin(interior_rings); + ring_iter != boost::end(interior_rings); + ++ring_iter) { - uint32_t num_interior_ring_points = boost::geometry::num_points(*interior_ring_iter); - value_writer::write(num_interior_ring_points, iter, byte_order); + value_writer::write(geometry::num_points(*ring_iter), + iter, + byte_order); - for(typename boost::range_iterator::type - point_iter = boost::begin(*interior_ring_iter); - point_iter != boost::end(*interior_ring_iter); + for(typename boost::range_iterator::type + point_iter = boost::begin(*ring_iter); + point_iter != boost::end(*ring_iter); ++point_iter) { // write point's x, y, z - writer_assigner::value>::run(*point_iter, iter, byte_order); + writer_assigner::type> + ::run(*point_iter, iter, byte_order); } } diff --git a/include/boost/geometry/extensions/gis/io/wkb/write_wkb.hpp b/include/boost/geometry/extensions/gis/io/wkb/write_wkb.hpp index 62d5dc68a..b67299b20 100644 --- a/include/boost/geometry/extensions/gis/io/wkb/write_wkb.hpp +++ b/include/boost/geometry/extensions/gis/io/wkb/write_wkb.hpp @@ -1,3 +1,11 @@ +// Boost.Geometry +// +// Copyright (c) 2015 Mats Taraldsvik. +// +// Use, modification and distribution is subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + #ifndef BOOST_GEOMETRY_IO_WKB_WRITE_WKB_HPP #define BOOST_GEOMETRY_IO_WKB_WRITE_WKB_HPP From 904ac9fc6c16fcbf67bc36ae295a70d998017574 Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Fri, 24 Apr 2015 13:28:38 +0200 Subject: [PATCH 42/89] [extensions][test] Comment out unused local types. --- extensions/test/gis/io/wkb/read_wkb.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/test/gis/io/wkb/read_wkb.cpp b/extensions/test/gis/io/wkb/read_wkb.cpp index 4f58be77c..eae9301e8 100644 --- a/extensions/test/gis/io/wkb/read_wkb.cpp +++ b/extensions/test/gis/io/wkb/read_wkb.cpp @@ -136,10 +136,10 @@ int test_main(int, char* []) typedef bg::model::point point3d_type; typedef bg::model::linestring linestring_type; - typedef bg::model::linestring linestring3d_type; + //typedef bg::model::linestring linestring3d_type; typedef bg::model::polygon polygon_type; - typedef bg::model::polygon polygon3d_type; + //typedef bg::model::polygon polygon3d_type; // // POINT From 42d56f6116659336551e0b85a6a68dd908379923 Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Fri, 24 Apr 2015 17:20:15 +0200 Subject: [PATCH 43/89] [util][arithmetic] Fix a bug in point arithmetic operations. Use more precise type for the calculation of the result. Previously the type of the second operand was always used. --- .../boost/geometry/arithmetic/arithmetic.hpp | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/include/boost/geometry/arithmetic/arithmetic.hpp b/include/boost/geometry/arithmetic/arithmetic.hpp index 6eb31f488..fa4fb3203 100644 --- a/include/boost/geometry/arithmetic/arithmetic.hpp +++ b/include/boost/geometry/arithmetic/arithmetic.hpp @@ -22,6 +22,7 @@ #include #include #include +#include namespace boost { namespace geometry @@ -51,17 +52,24 @@ struct value_operation : m_value(value) {} - template - inline void apply(P& point) const + template + inline void apply(PointDst& dest_point) const { - set(point, Function()(get(point), m_value)); + set(dest_point, + Function + < + typename geometry::select_most_precise + < + C, + typename geometry::coordinate_type::type + >::type + >()(get(dest_point), m_value)); } }; template class Function> struct point_operation { - typedef typename coordinate_type::type coordinate_type; PointSrc const& m_source_point; inline point_operation(PointSrc const& point) @@ -72,7 +80,14 @@ struct point_operation inline void apply(PointDst& dest_point) const { set(dest_point, - Function()(get(dest_point), get(m_source_point))); + Function + < + typename geometry::select_most_precise + < + typename geometry::coordinate_type::type, + typename geometry::coordinate_type::type + >::type + >()(get(dest_point), get(m_source_point))); } }; From 51037d12461caaccc0b676af07f065b2d7164aa5 Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Fri, 24 Apr 2015 17:22:54 +0200 Subject: [PATCH 44/89] [test][centroid] Add tests for Geom using INT coords and centroid using FP. --- test/algorithms/centroid.cpp | 26 ++++++++++++++++++++++++++ test/algorithms/test_centroid.hpp | 17 ++++++++++++----- 2 files changed, 38 insertions(+), 5 deletions(-) diff --git a/test/algorithms/centroid.cpp b/test/algorithms/centroid.cpp index b5fb87a81..59b483f90 100644 --- a/test/algorithms/centroid.cpp +++ b/test/algorithms/centroid.cpp @@ -56,6 +56,15 @@ void test_polygon() // should (1.5 1) be returned? // if yes, then all other Polygons degenerated to Linestrings should be handled test_centroid("POLYGON((1 1,2 1,1 1,1 1))", 1.0, 1.0); + + // reported 2015.04.24 + // input INT, result FP + test_centroid + < + bg::model::polygon >, + typename bg::point_type::type, + typename bg::coordinate_type::type + >("POLYGON((1 1, 1 2, 2 2, 2 1, 1 1))", 1.5, 1.5); } @@ -97,6 +106,23 @@ void test_2d() test_centroid >("POLYGON((1 2,3 4))", 2, 3); test_centroid

("POINT(3 3)", 3, 3); + + // INT -> FP + test_centroid + < + bg::model::ring >, + P, typename bg::coordinate_type

::type + >("POLYGON((1 1, 1 2, 2 2, 2 1, 1 1))", 1.5, 1.5); + test_centroid + < + bg::model::linestring >, + P, typename bg::coordinate_type

::type + >("LINESTRING(1 1, 2 2)", 1.5, 1.5); + test_centroid + < + bg::model::box >, + P, typename bg::coordinate_type

::type + >("BOX(1 1, 2 2)", 1.5, 1.5); } diff --git a/test/algorithms/test_centroid.hpp b/test/algorithms/test_centroid.hpp index 14e0ceff1..1784f66f4 100644 --- a/test/algorithms/test_centroid.hpp +++ b/test/algorithms/test_centroid.hpp @@ -30,6 +30,7 @@ struct check_result static void apply(Point1 const& actual, Point2 const& expected) { check_result::apply(actual, expected); + BOOST_CHECK_CLOSE(bg::get(actual), bg::get(expected), 0.001); } }; @@ -48,9 +49,9 @@ void test_with_other_calculation_type(Geometry const& geometry, Point& c1) { typedef typename bg::point_type::type point_type; // Calculate it with user defined strategy - point_type c2; + Point c2; bg::centroid(geometry, c2, - bg::strategy::centroid::bashein_detmer()); + bg::strategy::centroid::bashein_detmer()); std::cout << typeid(CalculationType).name() << ": " << std::setprecision(20) << bg::get<0>(c2) << " " << bg::get<1>(c2) @@ -58,13 +59,13 @@ void test_with_other_calculation_type(Geometry const& geometry, Point& c1) << std::endl; } -template +template void test_centroid(std::string const& wkt, T const& d1, T const& d2, T const& d3 = T(), T const& d4 = T(), T const& d5 = T()) { Geometry geometry; bg::read_wkt(wkt, geometry); - typedef typename bg::point_type::type point_type; - point_type c1; + + Point c1; bg::centroid(geometry, c1); check_result::type::value>::apply(c1, boost::make_tuple(d1, d2, d3, d4, d5)); @@ -85,6 +86,12 @@ void test_centroid(std::string const& wkt, T const& d1, T const& d2, T const& d3 #endif } +template +void test_centroid(std::string const& wkt, T const& d1, T const& d2, T const& d3 = T(), T const& d4 = T(), T const& d5 = T()) +{ + test_centroid::type>(wkt, d1, d2, d3, d4, d5); +} + template void test_centroid_exception() { From 5c5ac136a76a778082ef49e363b617fe5eae0834 Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Sat, 25 Apr 2015 13:19:48 +0200 Subject: [PATCH 45/89] [projections][aitoff] go to proj 4.9.1 which adds an invert projection for aitoff includes unit test --- .../test/gis/projections/projections.cpp | 1 + .../gis/projections/proj/aitoff.hpp | 99 +++++++++++++++++-- 2 files changed, 92 insertions(+), 8 deletions(-) diff --git a/extensions/test/gis/projections/projections.cpp b/extensions/test/gis/projections/projections.cpp index a825b3ff9..ae566109e 100644 --- a/extensions/test/gis/projections/projections.cpp +++ b/extensions/test/gis/projections/projections.cpp @@ -238,6 +238,7 @@ void test_all() test_inverse

("aea", 334609.583974, 5218502.503686, 4.897000, 52.371000, "+proj=aea +ellps=WGS84 +units=m +lat_1=55 +lat_2=65"); test_inverse

("aeqd", 384923.723428, 5809986.497118, 4.898398, 52.378890, "+proj=aeqd +ellps=WGS84 +units=m"); // F/I: 883.080918 + test_inverse

("aitoff", 384096.182830, 5831239.274680, 4.897000, 52.371000, "+proj=aitoff +ellps=WGS84 +units=m"); test_inverse

("alsk", 7002185.416415, -3700467.546545, -84.389819, 33.754911, "+proj=alsk +ellps=WGS84 +units=m +lon_0=-150W"); // F/I: 19.398478 test_inverse

("bipc", 3693973.674143, -8459972.647559, 4.897000, 52.371000, "+proj=bipc +ellps=WGS84 +units=m"); test_inverse

("bonne", 333291.091896, 274683.016972, 4.897000, 52.371000, "+proj=bonne +ellps=WGS84 +units=m +lat_1=50"); diff --git a/include/boost/geometry/extensions/gis/projections/proj/aitoff.hpp b/include/boost/geometry/extensions/gis/projections/proj/aitoff.hpp index 7ffc989f6..2c7f6aa68 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/aitoff.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/aitoff.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -61,9 +61,10 @@ namespace boost { namespace geometry { namespace projections + // template class, using CRTP to implement forward/inverse template - struct base_aitoff_spheroid : public base_t_f, + struct base_aitoff_spheroid : public base_t_fi, Geographic, Cartesian, Parameters> { @@ -73,7 +74,7 @@ namespace boost { namespace geometry { namespace projections par_aitoff m_proj_parm; inline base_aitoff_spheroid(const Parameters& par) - : base_t_f, + : base_t_fi, Geographic, Cartesian, Parameters>(*this, par) {} inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const @@ -89,7 +90,91 @@ namespace boost { namespace geometry { namespace projections xy_x = (xy_x + lp_lon * this->m_proj_parm.cosphi1) * 0.5; xy_y = (xy_y + lp_lat) * 0.5; } + return; } + + /*********************************************************************************** + * + * Inverse functions added by Drazen Tutic and Lovro Gradiser based on paper: + * + * I.Özbug Biklirici and Cengizhan Ipbüker. A General Algorithm for the Inverse + * Transformation of Map Projections Using Jacobian Matrices. In Proceedings of the + * Third International Symposium Mathematical & Computational Applications, + * pages 175{182, Turkey, September 2002. + * + * Expected accuracy is defined by EPSILON = 1e-12. Should be appropriate for + * most applications of Aitoff and Winkel Tripel projections. + * + * Longitudes of 180W and 180E can be mixed in solution obtained. + * + * Inverse for Aitoff projection in poles is undefined, longitude value of 0 is assumed. + * + * Contact : dtutic@geof.hr + * Date: 2015-02-16 + * + ************************************************************************************/ + + + inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const + { + int iter, MAXITER = 10, round = 0, MAXROUND = 20; + double EPSILON = 1e-12, D, C, f1, f2, f1p, f1l, f2p, f2l, dp, dl, sl, sp, cp, cl, x, y; + + if ((fabs(xy_x) < EPSILON) && (fabs(xy_y) < EPSILON )) { lp_lat = 0.; lp_lon = 0.; return; } + + /* intial values for Newton-Raphson method */ + lp_lat = xy_y; lp_lon = xy_x; + do { + iter = 0; + do { + sl = sin(lp_lon * 0.5); cl = cos(lp_lon * 0.5); + sp = sin(lp_lat); cp = cos(lp_lat); + D = cp * cl; + C = 1. - D * D; + D = acos(D) / pow(C, 1.5); + f1 = 2. * D * C * cp * sl; + f2 = D * C * sp; + f1p = 2.* (sl * cl * sp * cp / C - D * sp * sl); + f1l = cp * cp * sl * sl / C + D * cp * cl * sp * sp; + f2p = sp * sp * cl / C + D * sl * sl * cp; + f2l = 0.5 * (sp * cp * sl / C - D * sp * cp * cp * sl * cl); + if (this->m_proj_parm.mode) { /* Winkel Tripel */ + f1 = 0.5 * (f1 + lp_lon * this->m_proj_parm.cosphi1); + f2 = 0.5 * (f2 + lp_lat); + f1p *= 0.5; + f1l = 0.5 * (f1l + this->m_proj_parm.cosphi1); + f2p = 0.5 * (f2p + 1.); + f2l *= 0.5; + } + f1 -= xy_x; f2 -= xy_y; + dl = (f2 * f1p - f1 * f2p) / (dp = f1p * f2l - f2p * f1l); + dp = (f1 * f2l - f2 * f1l) / dp; + while (dl > boost::math::constants::pi()) dl -= boost::math::constants::pi(); /* set to interval [-boost::math::constants::pi(), boost::math::constants::pi()] */ + while (dl < -boost::math::constants::pi()) dl += boost::math::constants::pi(); /* set to interval [-boost::math::constants::pi(), boost::math::constants::pi()] */ + lp_lat -= dp; lp_lon -= dl; + } while ((fabs(dp) > EPSILON || fabs(dl) > EPSILON) && (iter++ < MAXITER)); + if (lp_lat > (2.0 * boost::math::constants::pi())) lp_lat -= 2.*(lp_lat-(2.0 * boost::math::constants::pi())); /* correct if symmetrical solution for Aitoff */ + if (lp_lat < -(2.0 * boost::math::constants::pi())) lp_lat -= 2.*(lp_lat+(2.0 * boost::math::constants::pi())); /* correct if symmetrical solution for Aitoff */ + if ((fabs(fabs(lp_lat) - (2.0 * boost::math::constants::pi())) < EPSILON) && (!this->m_proj_parm.mode)) lp_lon = 0.; /* if pole in Aitoff, return longitude of 0 */ + + /* calculate x,y coordinates with solution obtained */ + if((D = acos(cos(lp_lat) * cos(C = 0.5 * lp_lon)))) {/* Aitoff */ + x = 2. * D * cos(lp_lat) * sin(C) * (y = 1. / sin(D)); + y *= D * sin(lp_lat); + } else + x = y = 0.; + if (this->m_proj_parm.mode) { /* Winkel Tripel */ + x = (x + lp_lon * this->m_proj_parm.cosphi1) * 0.5; + y = (y + lp_lat) * 0.5; + } + /* if too far from given values of x,y, repeat with better approximation of phi,lam */ + } while (((fabs(xy_x-x) > EPSILON) || (fabs(xy_y-y) > EPSILON)) && (round++ < MAXROUND)); + + if (iter == MAXITER && round == MAXROUND) fprintf(stderr, "Warning: Accuracy of 1e-12 not reached. Last increments: dlat=%e and dlon=%e\n", dp, dl); + + return; + } + }; template @@ -97,7 +182,7 @@ namespace boost { namespace geometry { namespace projections { boost::ignore_unused(par); boost::ignore_unused(proj_parm); - // par.inv = 0; + // par.inv = s_inverse; // par.fwd = s_forward; par.es = 0.; } @@ -138,7 +223,6 @@ namespace boost { namespace geometry { namespace projections \par Projection characteristics - Miscellaneous - Spheroid - - no inverse \par Example \image html ex_aitoff.gif */ @@ -160,7 +244,6 @@ namespace boost { namespace geometry { namespace projections \par Projection characteristics - Miscellaneous - Spheroid - - no inverse - lat_1 \par Example \image html ex_wintri.gif @@ -185,7 +268,7 @@ namespace boost { namespace geometry { namespace projections public : virtual projection* create_new(const Parameters& par) const { - return new base_v_f, Geographic, Cartesian, Parameters>(par); + return new base_v_fi, Geographic, Cartesian, Parameters>(par); } }; @@ -195,7 +278,7 @@ namespace boost { namespace geometry { namespace projections public : virtual projection* create_new(const Parameters& par) const { - return new base_v_f, Geographic, Cartesian, Parameters>(par); + return new base_v_fi, Geographic, Cartesian, Parameters>(par); } }; From 8c6b79b97e71cd3f15a958c3b0055e222df06754 Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Sat, 25 Apr 2015 13:26:57 +0200 Subject: [PATCH 46/89] [projections] Upgrade to proj 4.9.1 for aeqd, geos, omerc This does not need changes in unit tests. --- .../extensions/gis/projections/proj/aeqd.hpp | 4 ++-- .../extensions/gis/projections/proj/geos.hpp | 4 ++-- .../extensions/gis/projections/proj/omerc.hpp | 19 ++++++++++++++----- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/include/boost/geometry/extensions/gis/projections/proj/aeqd.hpp b/include/boost/geometry/extensions/gis/projections/proj/aeqd.hpp index a670a93c0..27713c176 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/aeqd.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/aeqd.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -289,7 +289,7 @@ namespace boost { namespace geometry { namespace projections xy_y = (cosc - this->m_proj_parm.sinph0 * sin(lp_lat)) * c_rh; xy_x *= sinc * this->m_proj_parm.cosph0; } - lp_lon = xy_y == 0. ? 0. : atan2(xy_x, xy_y); + lp_lon = atan2(xy_x, xy_y); } else if (this->m_proj_parm.mode == N_POLE) { lp_lat = HALFPI - c_rh; lp_lon = atan2(xy_x, -xy_y); diff --git a/include/boost/geometry/extensions/gis/projections/proj/geos.hpp b/include/boost/geometry/extensions/gis/projections/proj/geos.hpp index cf8a0cb5c..71527acc5 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/geos.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/geos.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -229,7 +229,7 @@ namespace boost { namespace geometry { namespace projections (proj_parm.sweep_axis[0] != 'x' && proj_parm.sweep_axis[0] != 'y')) throw proj_exception(-49); - if (proj_parm.sweep_axis[0] == 'y') + if (proj_parm.sweep_axis[0] == 'x') proj_parm.flip_axis = 1; else proj_parm.flip_axis = 0; diff --git a/include/boost/geometry/extensions/gis/projections/proj/omerc.hpp b/include/boost/geometry/extensions/gis/projections/proj/omerc.hpp index 922f4b9cd..979e259a0 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/omerc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/omerc.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -97,8 +97,11 @@ namespace boost { namespace geometry { namespace projections throw proj_exception();; v = 0.5 * this->m_proj_parm.ArB * log((1. - U)/(1. + U)); temp = cos(this->m_proj_parm.B * lp_lon); - u = (fabs(temp) < TOL) ? this->m_proj_parm.AB * lp_lon : - this->m_proj_parm.ArB * atan2((S * this->m_proj_parm.cosgam + V * this->m_proj_parm.singam) , temp); + if(fabs(temp) < TOL) { + u = this->m_proj_parm.A * lp_lon; + } else { + u = this->m_proj_parm.ArB * atan2((S * this->m_proj_parm.cosgam + V * this->m_proj_parm.singam), temp); + } } else { v = lp_lat > 0 ? this->m_proj_parm.v_pole_n : this->m_proj_parm.v_pole_s; u = this->m_proj_parm.ArB * lp_lat; @@ -146,8 +149,8 @@ namespace boost { namespace geometry { namespace projections template void setup_omerc(Parameters& par, par_omerc& proj_parm) { - double con, com, cosph0, D, F, H, L, sinph0, p, J, gamma, - gamma0, lamc, lam1, lam2, phi1, phi2, alpha_c; + double con, com, cosph0, D, F, H, L, sinph0, p, J, gamma=0, + gamma0, lamc=0, lam1=0, lam2=0, phi1=0, phi2=0, alpha_c; int alp, gam, no_off = 0; proj_parm.no_rot = pj_param(par.params, "tno_rot").i; if ((alp = pj_param(par.params, "talpha").i) != 0) @@ -161,6 +164,12 @@ namespace boost { namespace geometry { namespace projections pj_param(par.params, "tno_off").i /* for backward compatibility */ || pj_param(par.params, "tno_uoff").i; + if( no_off ) + { + /* Mark the parameter as used, so that the pj_get_def() return them */ + pj_param(par.params, "sno_uoff"); + pj_param(par.params, "sno_off"); + } } else { lam1 = pj_param(par.params, "rlon_1").f; phi1 = pj_param(par.params, "rlat_1").f; From 0e3ea68f546c02f49927169866c7f005e3d6ade8 Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Sat, 25 Apr 2015 15:40:45 +0200 Subject: [PATCH 47/89] [projections] add qsc from proj 4.9.1 --- .../test/gis/projections/projections.cpp | 2 + .../extensions/gis/projections/factory.hpp | 2 + .../extensions/gis/projections/proj/qsc.hpp | 464 ++++++++++++++++++ 3 files changed, 468 insertions(+) create mode 100644 include/boost/geometry/extensions/gis/projections/proj/qsc.hpp diff --git a/extensions/test/gis/projections/projections.cpp b/extensions/test/gis/projections/projections.cpp index ae566109e..180acc3eb 100644 --- a/extensions/test/gis/projections/projections.cpp +++ b/extensions/test/gis/projections/projections.cpp @@ -191,6 +191,7 @@ void test_all() test_forward

("ortel", 4.897000, 52.371000, 360906.947408, 5829913.052335, "+proj=ortel +ellps=WGS84 +units=m"); test_forward

("ortho", 4.897000, 52.371000, 332422.874291, 5051361.531375, "+proj=ortho +ellps=WGS84 +units=m"); test_forward

("pconic", -70.400000, -23.650000, -2240096.398139, -6940342.146955, "+proj=pconic +ellps=WGS84 +units=m +lat_1=20n +lat_2=60n +lon_0=60W"); + test_forward

("qsc", 4.897000, 52.371000, 543871.545186, 7341888.620371, "+proj=qsc +ellps=WGS84 +units=m"); test_forward

("poly", 4.897000, 52.371000, 333274.269648, 5815908.957562, "+proj=poly +ellps=WGS84 +units=m"); test_forward

("putp1", 4.897000, 52.371000, 375730.931178, 5523551.121434, "+proj=putp1 +ellps=WGS84 +units=m"); test_forward

("putp2", 4.897000, 52.371000, 351480.997939, 5942668.547355, "+proj=putp2 +ellps=WGS84 +units=m"); @@ -307,6 +308,7 @@ void test_all() test_inverse

("omerc", 1009705.329154, 5829437.254923, 4.897000, 52.371000, "+proj=omerc +ellps=WGS84 +units=m +lat_1=20n +lat_2=60n +lon_1=1e +lon_2=30e"); test_inverse

("ortho", 332422.874291, 5051361.531375, 4.897000, 52.371000, "+proj=ortho +ellps=WGS84 +units=m"); test_inverse

("pconic", -2240096.398139, -6940342.146955, -70.400000, -23.650000, "+proj=pconic +ellps=WGS84 +units=m +lat_1=20n +lat_2=60n +lon_0=60W"); // F/I: 4424863.377843 + test_inverse

("qsc", 543871.545186, 7341888.620371, 4.897000, 52.371000, "+proj=qsc +ellps=WGS84 +units=m"); test_inverse

("poly", 333274.269648, 5815908.957562, 4.897000, 52.371000, "+proj=poly +ellps=WGS84 +units=m"); test_inverse

("putp1", 375730.931178, 5523551.121434, 4.897000, 52.371000, "+proj=putp1 +ellps=WGS84 +units=m"); test_inverse

("putp2", 351480.997939, 5942668.547355, 4.897000, 52.371000, "+proj=putp2 +ellps=WGS84 +units=m"); diff --git a/include/boost/geometry/extensions/gis/projections/factory.hpp b/include/boost/geometry/extensions/gis/projections/factory.hpp index f107b8c78..b95aed82f 100644 --- a/include/boost/geometry/extensions/gis/projections/factory.hpp +++ b/include/boost/geometry/extensions/gis/projections/factory.hpp @@ -81,6 +81,7 @@ #include #include #include +#include #include #include #include @@ -202,6 +203,7 @@ public: detail::oea_init(*this); detail::omerc_init(*this); detail::ortho_init(*this); + detail::qsc_init(*this); detail::poly_init(*this); detail::putp2_init(*this); detail::putp3_init(*this); diff --git a/include/boost/geometry/extensions/gis/projections/proj/qsc.hpp b/include/boost/geometry/extensions/gis/projections/proj/qsc.hpp new file mode 100644 index 000000000..56e8cf5a8 --- /dev/null +++ b/include/boost/geometry/extensions/gis/projections/proj/qsc.hpp @@ -0,0 +1,464 @@ +#ifndef BOOST_GEOMETRY_PROJECTIONS_QSC_HPP +#define BOOST_GEOMETRY_PROJECTIONS_QSC_HPP + +// Boost.Geometry - extensions-gis-projections (based on PROJ4) +// This file is automatically generated. DO NOT EDIT. + +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. + +// Use, modification and distribution is subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// This file is converted from PROJ4, http://trac.osgeo.org/proj +// PROJ4 is originally written by Gerald Evenden (then of the USGS) +// PROJ4 is maintained by Frank Warmerdam +// PROJ4 is converted to Boost.Geometry by Barend Gehrels + +// Last updated version of proj: 4.9.1 + +// Original copyright notice: + +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: + +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. + +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + + +#include +#include + +#include +#include +#include +#include + +namespace boost { namespace geometry { namespace projections +{ + #ifndef DOXYGEN_NO_DETAIL + namespace detail { namespace qsc{ + static const double EPS10 = 1.e-10; + static const int FACE_FRONT = 0; + static const int FACE_RIGHT = 1; + static const int FACE_BACK = 2; + static const int FACE_LEFT = 3; + static const int FACE_TOP = 4; + static const int FACE_BOTTOM = 5; + static const int AREA_0 = 0; + static const int AREA_1 = 1; + static const int AREA_2 = 2; + static const int AREA_3 = 3; + + struct par_qsc + { + int face; + double a_squared; + double b; + double one_minus_f; + double one_minus_f_squared; + }; + + + /* The six cube faces. */ + + /* The four areas on a cube face. AREA_0 is the area of definition, + * the other three areas are counted counterclockwise. */ + + /* Helper function for forward projection: compute the theta angle + * and determine the area number. */ + inline double + qsc_fwd_equat_face_theta(double phi, double y, double x, int *area) { + double theta; + if (phi < EPS10) { + *area = AREA_0; + theta = 0.0; + } else { + theta = atan2(y, x); + if (fabs(theta) <= FORTPI) { + *area = AREA_0; + } else if (theta > FORTPI && theta <= HALFPI + FORTPI) { + *area = AREA_1; + theta -= HALFPI; + } else if (theta > HALFPI + FORTPI || theta <= -(HALFPI + FORTPI)) { + *area = AREA_2; + theta = (theta >= 0.0 ? theta - PI : theta + PI); + } else { + *area = AREA_3; + theta += HALFPI; + } + } + return (theta); + } + + /* Helper function: shift the longitude. */ + inline double + qsc_shift_lon_origin(double lon, double offset) { + double slon = lon + offset; + if (slon < -PI) { + slon += TWOPI; + } else if (slon > +PI) { + slon -= TWOPI; + } + return slon; + } + + /* Forward projection, ellipsoid */ + + // template class, using CRTP to implement forward/inverse + template + struct base_qsc_ellipsoid : public base_t_fi, + Geographic, Cartesian, Parameters> + { + + typedef double geographic_type; + typedef double cartesian_type; + + par_qsc m_proj_parm; + + inline base_qsc_ellipsoid(const Parameters& par) + : base_t_fi, + Geographic, Cartesian, Parameters>(*this, par) {} + + inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const + { + double lat, lon; + double sinlat, coslat; + double sinlon, coslon; + double q, r, s; + double theta, phi; + double t, mu, nu; + int area; + + /* Convert the geodetic latitude to a geocentric latitude. + * This corresponds to the shift from the ellipsoid to the sphere + * described in [LK12]. */ + if (this->m_par.es) { + lat = atan(this->m_proj_parm.one_minus_f_squared * tan(lp_lat)); + } else { + lat = lp_lat; + } + + /* Convert the input lat, lon into theta, phi as used by QSC. + * This depends on the cube face and the area on it. + * For the top and bottom face, we can compute theta and phi + * directly from phi, lam. For the other faces, we must use + * unit sphere cartesian coordinates as an intermediate step. */ + lon = lp_lon; + if (this->m_proj_parm.face != FACE_TOP && this->m_proj_parm.face != FACE_BOTTOM) { + if (this->m_proj_parm.face == FACE_RIGHT) { + lon = qsc_shift_lon_origin(lon, +HALFPI); + } else if (this->m_proj_parm.face == FACE_BACK) { + lon = qsc_shift_lon_origin(lon, +PI); + } else if (this->m_proj_parm.face == FACE_LEFT) { + lon = qsc_shift_lon_origin(lon, -HALFPI); + } + sinlat = sin(lat); + coslat = cos(lat); + sinlon = sin(lon); + coslon = cos(lon); + q = coslat * coslon; + r = coslat * sinlon; + s = sinlat; + } + if (this->m_proj_parm.face == FACE_FRONT) { + phi = acos(q); + theta = qsc_fwd_equat_face_theta(phi, s, r, &area); + } else if (this->m_proj_parm.face == FACE_RIGHT) { + phi = acos(r); + theta = qsc_fwd_equat_face_theta(phi, s, -q, &area); + } else if (this->m_proj_parm.face == FACE_BACK) { + phi = acos(-q); + theta = qsc_fwd_equat_face_theta(phi, s, -r, &area); + } else if (this->m_proj_parm.face == FACE_LEFT) { + phi = acos(-r); + theta = qsc_fwd_equat_face_theta(phi, s, q, &area); + } else if (this->m_proj_parm.face == FACE_TOP) { + phi = HALFPI - lat; + if (lon >= FORTPI && lon <= HALFPI + FORTPI) { + area = AREA_0; + theta = lon - HALFPI; + } else if (lon > HALFPI + FORTPI || lon <= -(HALFPI + FORTPI)) { + area = AREA_1; + theta = (lon > 0.0 ? lon - PI : lon + PI); + } else if (lon > -(HALFPI + FORTPI) && lon <= -FORTPI) { + area = AREA_2; + theta = lon + HALFPI; + } else { + area = AREA_3; + theta = lon; + } + } else /* this->m_proj_parm.face == FACE_BOTTOM */ { + phi = HALFPI + lat; + if (lon >= FORTPI && lon <= HALFPI + FORTPI) { + area = AREA_0; + theta = -lon + HALFPI; + } else if (lon < FORTPI && lon >= -FORTPI) { + area = AREA_1; + theta = -lon; + } else if (lon < -FORTPI && lon >= -(HALFPI + FORTPI)) { + area = AREA_2; + theta = -lon - HALFPI; + } else { + area = AREA_3; + theta = (lon > 0.0 ? -lon + PI : -lon - PI); + } + } + + /* Compute mu and nu for the area of definition. + * For mu, see Eq. (3-21) in [OL76], but note the typos: + * compare with Eq. (3-14). For nu, see Eq. (3-38). */ + mu = atan((12.0 / PI) * (theta + acos(sin(theta) * cos(FORTPI)) - HALFPI)); + t = sqrt((1.0 - cos(phi)) / (cos(mu) * cos(mu)) / (1.0 - cos(atan(1.0 / cos(theta))))); + /* nu = atan(t); We don't really need nu, just t, see below. */ + + /* Apply the result to the real area. */ + if (area == AREA_1) { + mu += HALFPI; + } else if (area == AREA_2) { + mu += PI; + } else if (area == AREA_3) { + mu += HALFPI + PI; + } + + /* Now compute x, y from mu and nu */ + /* t = tan(nu); */ + xy_x = t * cos(mu); + xy_y = t * sin(mu); + boost::ignore_unused(nu); + return; + } + + /* Inverse projection, ellipsoid */ + + inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const + { + double mu, nu, cosmu, tannu; + double tantheta, theta, cosphi, phi; + double t; + int area; + + /* Convert the input x, y to the mu and nu angles as used by QSC. + * This depends on the area of the cube face. */ + nu = atan(sqrt(xy_x * xy_x + xy_y * xy_y)); + mu = atan2(xy_y, xy_x); + if (xy_x >= 0.0 && xy_x >= fabs(xy_y)) { + area = AREA_0; + } else if (xy_y >= 0.0 && xy_y >= fabs(xy_x)) { + area = AREA_1; + mu -= HALFPI; + } else if (xy_x < 0.0 && -xy_x >= fabs(xy_y)) { + area = AREA_2; + mu = (mu < 0.0 ? mu + PI : mu - PI); + } else { + area = AREA_3; + mu += HALFPI; + } + + /* Compute phi and theta for the area of definition. + * The inverse projection is not described in the original paper, but some + * good hints can be found here (as of 2011-12-14): + * http://fits.gsfc.nasa.gov/fitsbits/saf.93/saf.9302 + * (search for "Message-Id: <9302181759.AA25477 at fits.cv.nrao.edu>") */ + t = (PI / 12.0) * tan(mu); + tantheta = sin(t) / (cos(t) - (1.0 / sqrt(2.0))); + theta = atan(tantheta); + cosmu = cos(mu); + tannu = tan(nu); + cosphi = 1.0 - cosmu * cosmu * tannu * tannu * (1.0 - cos(atan(1.0 / cos(theta)))); + if (cosphi < -1.0) { + cosphi = -1.0; + } else if (cosphi > +1.0) { + cosphi = +1.0; + } + + /* Apply the result to the real area on the cube face. + * For the top and bottom face, we can compute phi and lam directly. + * For the other faces, we must use unit sphere cartesian coordinates + * as an intermediate step. */ + if (this->m_proj_parm.face == FACE_TOP) { + phi = acos(cosphi); + lp_lat = HALFPI - phi; + if (area == AREA_0) { + lp_lon = theta + HALFPI; + } else if (area == AREA_1) { + lp_lon = (theta < 0.0 ? theta + PI : theta - PI); + } else if (area == AREA_2) { + lp_lon = theta - HALFPI; + } else /* area == AREA_3 */ { + lp_lon = theta; + } + } else if (this->m_proj_parm.face == FACE_BOTTOM) { + phi = acos(cosphi); + lp_lat = phi - HALFPI; + if (area == AREA_0) { + lp_lon = -theta + HALFPI; + } else if (area == AREA_1) { + lp_lon = -theta; + } else if (area == AREA_2) { + lp_lon = -theta - HALFPI; + } else /* area == AREA_3 */ { + lp_lon = (theta < 0.0 ? -theta - PI : -theta + PI); + } + } else { + /* Compute phi and lam via cartesian unit sphere coordinates. */ + double q, r, s, t; + q = cosphi; + t = q * q; + if (t >= 1.0) { + s = 0.0; + } else { + s = sqrt(1.0 - t) * sin(theta); + } + t += s * s; + if (t >= 1.0) { + r = 0.0; + } else { + r = sqrt(1.0 - t); + } + /* Rotate q,r,s into the correct area. */ + if (area == AREA_1) { + t = r; + r = -s; + s = t; + } else if (area == AREA_2) { + r = -r; + s = -s; + } else if (area == AREA_3) { + t = r; + r = s; + s = -t; + } + /* Rotate q,r,s into the correct cube face. */ + if (this->m_proj_parm.face == FACE_RIGHT) { + t = q; + q = -r; + r = t; + } else if (this->m_proj_parm.face == FACE_BACK) { + q = -q; + r = -r; + } else if (this->m_proj_parm.face == FACE_LEFT) { + t = q; + q = r; + r = -t; + } + /* Now compute phi and lam from the unit sphere coordinates. */ + lp_lat = acos(-s) - HALFPI; + lp_lon = atan2(r, q); + if (this->m_proj_parm.face == FACE_RIGHT) { + lp_lon = qsc_shift_lon_origin(lp_lon, -HALFPI); + } else if (this->m_proj_parm.face == FACE_BACK) { + lp_lon = qsc_shift_lon_origin(lp_lon, -PI); + } else if (this->m_proj_parm.face == FACE_LEFT) { + lp_lon = qsc_shift_lon_origin(lp_lon, +HALFPI); + } + } + + /* Apply the shift from the sphere to the ellipsoid as described + * in [LK12]. */ + if (this->m_par.es) { + int invert_sign; + double tanphi, xa; + invert_sign = (lp_lat < 0.0 ? 1 : 0); + tanphi = tan(lp_lat); + xa = this->m_proj_parm.b / sqrt(tanphi * tanphi + this->m_proj_parm.one_minus_f_squared); + lp_lat = atan(sqrt(this->m_par.a * this->m_par.a - xa * xa) / (this->m_proj_parm.one_minus_f * xa)); + if (invert_sign) { + lp_lat = -lp_lat; + } + } + } + }; + + // Quadrilateralized Spherical Cube + template + void setup_qsc(Parameters& par, par_qsc& proj_parm) + { + // par.inv = e_inverse; + // par.fwd = e_forward; + /* Determine the cube face from the center of projection. */ + if (par.phi0 >= HALFPI - FORTPI / 2.0) { + proj_parm.face = FACE_TOP; + } else if (par.phi0 <= -(HALFPI - FORTPI / 2.0)) { + proj_parm.face = FACE_BOTTOM; + } else if (fabs(par.lam0) <= FORTPI) { + proj_parm.face = FACE_FRONT; + } else if (fabs(par.lam0) <= HALFPI + FORTPI) { + proj_parm.face = (par.lam0 > 0.0 ? FACE_RIGHT : FACE_LEFT); + } else { + proj_parm.face = FACE_BACK; + } + /* Fill in useful values for the ellipsoid <-> sphere shift + * described in [LK12]. */ + if (par.es) { + proj_parm.a_squared = par.a * par.a; + proj_parm.b = par.a * sqrt(1.0 - par.es); + proj_parm.one_minus_f = 1.0 - (par.a - proj_parm.b) / par.a; + proj_parm.one_minus_f_squared = proj_parm.one_minus_f * proj_parm.one_minus_f; + } + } + + }} // namespace detail::qsc + #endif // doxygen + + /*! + \brief Quadrilateralized Spherical Cube projection + \ingroup projections + \tparam Geographic latlong point type + \tparam Cartesian xy point type + \tparam Parameters parameter type + \par Projection characteristics + - Azimuthal + - Spheroid + \par Example + \image html ex_qsc.gif + */ + template + struct qsc_ellipsoid : public detail::qsc::base_qsc_ellipsoid + { + inline qsc_ellipsoid(const Parameters& par) : detail::qsc::base_qsc_ellipsoid(par) + { + detail::qsc::setup_qsc(this->m_par, this->m_proj_parm); + } + }; + + #ifndef DOXYGEN_NO_DETAIL + namespace detail + { + + // Factory entry(s) + template + class qsc_entry : public detail::factory_entry + { + public : + virtual projection* create_new(const Parameters& par) const + { + return new base_v_fi, Geographic, Cartesian, Parameters>(par); + } + }; + + template + inline void qsc_init(detail::base_factory& factory) + { + factory.add_to_factory("qsc", new qsc_entry); + } + + } // namespace detail + #endif // doxygen + +}}} // namespace boost::geometry::projections + +#endif // BOOST_GEOMETRY_PROJECTIONS_QSC_HPP + From e4d49f1302047a6e2ef2b5c4b0604c3b647e5450 Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Sat, 25 Apr 2015 16:06:58 +0200 Subject: [PATCH 48/89] [projections] update to 4.9.1 (rest, no changes) and removed some trailing spaces --- .../geometry/extensions/gis/projections/proj/aea.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/aeqd.hpp | 6 +++--- .../geometry/extensions/gis/projections/proj/airy.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/aitoff.hpp | 6 +++--- .../geometry/extensions/gis/projections/proj/august.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/bacon.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/bipc.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/boggs.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/bonne.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/cass.hpp | 8 ++++---- .../boost/geometry/extensions/gis/projections/proj/cc.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/cea.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/chamb.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/collg.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/crast.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/denoy.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/eck1.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/eck2.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/eck3.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/eck4.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/eck5.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/eqc.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/eqdc.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/fahey.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/fouc_s.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/gall.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/geocent.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/geos.hpp | 6 +++--- .../geometry/extensions/gis/projections/proj/gins8.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/gn_sinu.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/gnom.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/goode.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/gstmerc.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/hammer.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/hatano.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/imw_p.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/krovak.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/labrd.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/laea.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/lagrng.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/larr.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/lask.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/latlong.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/lcc.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/lcca.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/loxim.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/lsat.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/mbt_fps.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/mbtfpp.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/mbtfpq.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/merc.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/mill.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/mod_ster.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/moll.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/nell.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/nell_h.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/nocol.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/nsper.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/nzmg.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/ob_tran.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/ocea.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/oea.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/omerc.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/ortho.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/poly.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/putp2.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/putp3.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/putp4p.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/putp5.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/putp6.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/qsc.hpp | 6 +++--- .../geometry/extensions/gis/projections/proj/robin.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/rouss.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/rpoly.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/sconics.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/somerc.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/stere.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/sterea.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/sts.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/tcc.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/tcea.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/tmerc.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/tpeqd.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/urm5.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/urmfps.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/vandg.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/vandg2.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/vandg4.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/wag2.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/wag3.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/wag7.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/wink1.hpp | 8 ++++---- .../geometry/extensions/gis/projections/proj/wink2.hpp | 8 ++++---- 93 files changed, 368 insertions(+), 368 deletions(-) diff --git a/include/boost/geometry/extensions/gis/projections/proj/aea.hpp b/include/boost/geometry/extensions/gis/projections/proj/aea.hpp index 3b7108722..6aa65ccd2 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/aea.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/aea.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -54,7 +54,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace aea{ + namespace detail { namespace aea{ static const double EPS10 = 1.e-10; static const double TOL7 = 1.e-7; static const int N_ITER = 15; @@ -216,7 +216,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::aea - #endif // doxygen + #endif // doxygen /*! \brief Albers Equal Area projection @@ -296,7 +296,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("leac", new leac_entry); } - } // namespace detail + } // namespace detail // Create EPSG specializations // (Proof of Concept, only for some) diff --git a/include/boost/geometry/extensions/gis/projections/proj/aeqd.hpp b/include/boost/geometry/extensions/gis/projections/proj/aeqd.hpp index 27713c176..c8cbeb067 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/aeqd.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/aeqd.hpp @@ -51,7 +51,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace aeqd{ + namespace detail { namespace aeqd{ static const double EPS10 = 1.e-10; static const double TOL = 1.e-14; static const int N_POLE = 0; @@ -351,7 +351,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::aeqd - #endif // doxygen + #endif // doxygen /*! \brief Azimuthal Equidistant projection @@ -448,7 +448,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("aeqd", new aeqd_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/airy.hpp b/include/boost/geometry/extensions/gis/projections/proj/airy.hpp index dfa0e648e..c8c383599 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/airy.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/airy.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace airy{ + namespace detail { namespace airy{ static const double EPS = 1.e-10; static const int N_POLE = 0; static const int S_POLE = 1; @@ -165,7 +165,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::airy - #endif // doxygen + #endif // doxygen /*! \brief Airy projection @@ -211,7 +211,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("airy", new airy_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/aitoff.hpp b/include/boost/geometry/extensions/gis/projections/proj/aitoff.hpp index 2c7f6aa68..966c0e6f4 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/aitoff.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/aitoff.hpp @@ -49,7 +49,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace aitoff{ + namespace detail { namespace aitoff{ struct par_aitoff { @@ -212,7 +212,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::aitoff - #endif // doxygen + #endif // doxygen /*! \brief Aitoff projection @@ -289,7 +289,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("wintri", new wintri_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/august.hpp b/include/boost/geometry/extensions/gis/projections/proj/august.hpp index fcad9ba53..6a88a2e3f 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/august.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/august.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace august{ + namespace detail { namespace august{ static const double M = 1.333333333333333; @@ -90,7 +90,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::august - #endif // doxygen + #endif // doxygen /*! \brief August Epicycloidal projection @@ -135,7 +135,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("august", new august_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/bacon.hpp b/include/boost/geometry/extensions/gis/projections/proj/bacon.hpp index f1a558b5a..402a22796 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/bacon.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/bacon.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace bacon{ + namespace detail { namespace bacon{ static const double HLFPI2 = 2.46740110027233965467; static const double EPS = 1e-10; @@ -121,7 +121,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::bacon - #endif // doxygen + #endif // doxygen /*! \brief Apian Globular I projection @@ -232,7 +232,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("bacon", new bacon_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/bipc.hpp b/include/boost/geometry/extensions/gis/projections/proj/bipc.hpp index 8daebcbdd..048ef007b 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/bipc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/bipc.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace bipc{ + namespace detail { namespace bipc{ static const double EPS = 1e-10; static const double EPS10 = 1e-10; static const double ONEEPS = 1.000000001; @@ -203,7 +203,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::bipc - #endif // doxygen + #endif // doxygen /*! \brief Bipolar conic of western hemisphere projection @@ -247,7 +247,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("bipc", new bipc_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/boggs.hpp b/include/boost/geometry/extensions/gis/projections/proj/boggs.hpp index b756e44bb..8ba33ab21 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/boggs.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/boggs.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace boggs{ + namespace detail { namespace boggs{ static const int NITER = 20; static const double EPS = 1e-7; static const double ONETOL = 1.000001; @@ -103,7 +103,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::boggs - #endif // doxygen + #endif // doxygen /*! \brief Boggs Eumorphic projection @@ -148,7 +148,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("boggs", new boggs_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/bonne.hpp b/include/boost/geometry/extensions/gis/projections/proj/bonne.hpp index f76e09f04..40e0ae9d7 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/bonne.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/bonne.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -49,7 +49,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace bonne{ + namespace detail { namespace bonne{ static const double EPS10 = 1e-10; struct par_bonne @@ -168,7 +168,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::bonne - #endif // doxygen + #endif // doxygen /*! \brief Bonne (Werner lat_1=90) projection @@ -240,7 +240,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("bonne", new bonne_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/cass.hpp b/include/boost/geometry/extensions/gis/projections/proj/cass.hpp index c8dfc0f7d..037476abf 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/cass.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/cass.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -51,7 +51,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace cass{ + namespace detail { namespace cass{ static const double EPS10 = 1e-10; static const double C1 = .16666666666666666666; static const double C2 = .00833333333333333333; @@ -166,7 +166,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::cass - #endif // doxygen + #endif // doxygen /*! \brief Cassini projection @@ -236,7 +236,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("cass", new cass_entry); } - } // namespace detail + } // namespace detail // Create EPSG specializations // (Proof of Concept, only for some) diff --git a/include/boost/geometry/extensions/gis/projections/proj/cc.hpp b/include/boost/geometry/extensions/gis/projections/proj/cc.hpp index bbc7c475e..0b491abe2 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/cc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/cc.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace cc{ + namespace detail { namespace cc{ static const double EPS10 = 1.e-10; struct par_cc @@ -95,7 +95,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::cc - #endif // doxygen + #endif // doxygen /*! \brief Central Cylindrical projection @@ -139,7 +139,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("cc", new cc_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/cea.hpp b/include/boost/geometry/extensions/gis/projections/proj/cea.hpp index 35a673858..741ad4426 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/cea.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/cea.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -50,7 +50,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace cea{ + namespace detail { namespace cea{ static const double EPS = 1e-10; struct par_cea @@ -145,7 +145,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::cea - #endif // doxygen + #endif // doxygen /*! \brief Equal Area Cylindrical projection @@ -217,7 +217,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("cea", new cea_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/chamb.hpp b/include/boost/geometry/extensions/gis/projections/proj/chamb.hpp index a334e50e6..5f7949637 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/chamb.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/chamb.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -51,7 +51,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace chamb{ + namespace detail { namespace chamb{ static const double THIRD = 0.333333333333333333; static const double TOL = 1e-9; @@ -190,7 +190,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::chamb - #endif // doxygen + #endif // doxygen /*! \brief Chamberlin Trimetric projection @@ -236,7 +236,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("chamb", new chamb_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/collg.hpp b/include/boost/geometry/extensions/gis/projections/proj/collg.hpp index 70335de4f..0358e0648 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/collg.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/collg.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace collg{ + namespace detail { namespace collg{ static const double FXC = 1.12837916709551257390; static const double FYC = 1.77245385090551602729; static const double ONEEPS = 1.0000001; @@ -102,7 +102,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::collg - #endif // doxygen + #endif // doxygen /*! \brief Collignon projection @@ -146,7 +146,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("collg", new collg_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/crast.hpp b/include/boost/geometry/extensions/gis/projections/proj/crast.hpp index 9dd998792..ba1a581f8 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/crast.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/crast.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace crast{ + namespace detail { namespace crast{ static const double XM = 0.97720502380583984317; static const double RXM = 1.02332670794648848847; static const double YM = 3.06998012383946546542; @@ -94,7 +94,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::crast - #endif // doxygen + #endif // doxygen /*! \brief Craster Parabolic (Putnins P4) projection @@ -138,7 +138,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("crast", new crast_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/denoy.hpp b/include/boost/geometry/extensions/gis/projections/proj/denoy.hpp index 179643829..11c1d97a3 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/denoy.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/denoy.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace denoy{ + namespace detail { namespace denoy{ static const double C0 = 0.95; static const double C1 = -.08333333333333333333; static const double C3 = .00166666666666666666; @@ -89,7 +89,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::denoy - #endif // doxygen + #endif // doxygen /*! \brief Denoyer Semi-Elliptical projection @@ -134,7 +134,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("denoy", new denoy_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/eck1.hpp b/include/boost/geometry/extensions/gis/projections/proj/eck1.hpp index 35bd58bf5..1acb1e6d5 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/eck1.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/eck1.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace eck1{ + namespace detail { namespace eck1{ static const double FC = .92131773192356127802; static const double RP = .31830988618379067154; @@ -90,7 +90,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::eck1 - #endif // doxygen + #endif // doxygen /*! \brief Eckert I projection @@ -134,7 +134,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("eck1", new eck1_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/eck2.hpp b/include/boost/geometry/extensions/gis/projections/proj/eck2.hpp index 2858610e2..22f56a403 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/eck2.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/eck2.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace eck2{ + namespace detail { namespace eck2{ static const double FXC = 0.46065886596178063902; static const double FYC = 1.44720250911653531871; static const double C13 = 0.33333333333333333333; @@ -101,7 +101,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::eck2 - #endif // doxygen + #endif // doxygen /*! \brief Eckert II projection @@ -145,7 +145,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("eck2", new eck2_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/eck3.hpp b/include/boost/geometry/extensions/gis/projections/proj/eck3.hpp index d98475dbd..e9d9caf0e 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/eck3.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/eck3.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -49,7 +49,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace eck3{ + namespace detail { namespace eck3{ struct par_eck3 { @@ -140,7 +140,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::eck3 - #endif // doxygen + #endif // doxygen /*! \brief Eckert III projection @@ -280,7 +280,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("kav7", new kav7_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/eck4.hpp b/include/boost/geometry/extensions/gis/projections/proj/eck4.hpp index 53cbe31f9..f118e3347 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/eck4.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/eck4.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace eck4{ + namespace detail { namespace eck4{ static const double C_x = .42223820031577120149; static const double C_y = 1.32650042817700232218; static const double RC_y = .75386330736002178205; @@ -117,7 +117,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::eck4 - #endif // doxygen + #endif // doxygen /*! \brief Eckert IV projection @@ -161,7 +161,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("eck4", new eck4_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/eck5.hpp b/include/boost/geometry/extensions/gis/projections/proj/eck5.hpp index 63ed2038a..e9b12f7bc 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/eck5.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/eck5.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace eck5{ + namespace detail { namespace eck5{ static const double XF = 0.44101277172455148219; static const double RXF = 2.26750802723822639137; static const double YF = 0.88202554344910296438; @@ -91,7 +91,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::eck5 - #endif // doxygen + #endif // doxygen /*! \brief Eckert V projection @@ -135,7 +135,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("eck5", new eck5_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/eqc.hpp b/include/boost/geometry/extensions/gis/projections/proj/eqc.hpp index a72017fc7..f7c831468 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/eqc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/eqc.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace eqc{ + namespace detail { namespace eqc{ struct par_eqc { @@ -94,7 +94,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::eqc - #endif // doxygen + #endif // doxygen /*! \brief Equidistant Cylindrical (Plate Caree) projection @@ -140,7 +140,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("eqc", new eqc_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/eqdc.hpp b/include/boost/geometry/extensions/gis/projections/proj/eqdc.hpp index dd82cef0f..70dec1580 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/eqdc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/eqdc.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -50,7 +50,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace eqdc{ + namespace detail { namespace eqdc{ static const double EPS10 = 1.e-10; struct par_eqdc @@ -160,7 +160,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::eqdc - #endif // doxygen + #endif // doxygen /*! \brief Equidistant Conic projection @@ -206,7 +206,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("eqdc", new eqdc_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/fahey.hpp b/include/boost/geometry/extensions/gis/projections/proj/fahey.hpp index 91b96fcb2..ac444c8ef 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/fahey.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/fahey.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace fahey{ + namespace detail { namespace fahey{ static const double TOL = 1e-6; @@ -90,7 +90,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::fahey - #endif // doxygen + #endif // doxygen /*! \brief Fahey projection @@ -134,7 +134,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("fahey", new fahey_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/fouc_s.hpp b/include/boost/geometry/extensions/gis/projections/proj/fouc_s.hpp index fcaafded5..da057e0f0 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/fouc_s.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/fouc_s.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace fouc_s{ + namespace detail { namespace fouc_s{ static const int MAX_ITER = 10; static const double LOOP_TOL = 1e-7; @@ -117,7 +117,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::fouc_s - #endif // doxygen + #endif // doxygen /*! \brief Foucaut Sinusoidal projection @@ -161,7 +161,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("fouc_s", new fouc_s_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/gall.hpp b/include/boost/geometry/extensions/gis/projections/proj/gall.hpp index 177d80d16..21ba02354 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/gall.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/gall.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace gall{ + namespace detail { namespace gall{ static const double YF = 1.70710678118654752440; static const double XF = 0.70710678118654752440; static const double RYF = 0.58578643762690495119; @@ -92,7 +92,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::gall - #endif // doxygen + #endif // doxygen /*! \brief Gall (Gall Stereographic) projection @@ -136,7 +136,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("gall", new gall_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/geocent.hpp b/include/boost/geometry/extensions/gis/projections/proj/geocent.hpp index 81026f735..4df4b4d2f 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/geocent.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/geocent.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace geocent{ + namespace detail { namespace geocent{ @@ -94,7 +94,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::geocent - #endif // doxygen + #endif // doxygen /*! \brief Geocentric projection @@ -136,7 +136,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("geocent", new geocent_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/geos.hpp b/include/boost/geometry/extensions/gis/projections/proj/geos.hpp index 71527acc5..e2fe57c44 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/geos.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/geos.hpp @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace geos{ + namespace detail { namespace geos{ struct par_geos { @@ -251,7 +251,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::geos - #endif // doxygen + #endif // doxygen /*! \brief Geostationary Satellite View projection @@ -323,7 +323,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("geos", new geos_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/gins8.hpp b/include/boost/geometry/extensions/gis/projections/proj/gins8.hpp index 85394ddab..4fe4d33f2 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/gins8.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/gins8.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace gins8{ + namespace detail { namespace gins8{ static const double Cl = 0.000952426; static const double Cp = 0.162388; static const double C12 = 0.08333333333333333; @@ -89,7 +89,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::gins8 - #endif // doxygen + #endif // doxygen /*! \brief Ginsburg VIII (TsNIIGAiK) projection @@ -134,7 +134,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("gins8", new gins8_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/gn_sinu.hpp b/include/boost/geometry/extensions/gis/projections/proj/gn_sinu.hpp index da80f8e6f..bd2bc33f9 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/gn_sinu.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/gn_sinu.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -50,7 +50,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace gn_sinu{ + namespace detail { namespace gn_sinu{ static const double EPS10 = 1e-10; static const int MAX_ITER = 8; static const double LOOP_TOL = 1e-7; @@ -205,7 +205,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::gn_sinu - #endif // doxygen + #endif // doxygen /*! \brief Sinusoidal (Sanson-Flamsteed) projection @@ -372,7 +372,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("mbtfps", new mbtfps_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/gnom.hpp b/include/boost/geometry/extensions/gis/projections/proj/gnom.hpp index d48e98323..f60d7db82 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/gnom.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/gnom.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace gnom{ + namespace detail { namespace gnom{ static const double EPS10 = 1.e-10; static const int N_POLE = 0; static const int S_POLE = 1; @@ -177,7 +177,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::gnom - #endif // doxygen + #endif // doxygen /*! \brief Gnomonic projection @@ -221,7 +221,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("gnom", new gnom_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/goode.hpp b/include/boost/geometry/extensions/gis/projections/proj/goode.hpp index d3a461491..2873f93fd 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/goode.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/goode.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -50,7 +50,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace goode{ + namespace detail { namespace goode{ static const double Y_COR = 0.05280; static const double PHI_LIM = .71093078197902358062; @@ -109,7 +109,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::goode - #endif // doxygen + #endif // doxygen /*! \brief Goode Homolosine projection @@ -153,7 +153,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("goode", new goode_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/gstmerc.hpp b/include/boost/geometry/extensions/gis/projections/proj/gstmerc.hpp index 7cb2a5419..ccff62891 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/gstmerc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/gstmerc.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -50,7 +50,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace gstmerc{ + namespace detail { namespace gstmerc{ struct par_gstmerc { @@ -124,7 +124,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::gstmerc - #endif // doxygen + #endif // doxygen /*! \brief Gauss-Schreiber Transverse Mercator (aka Gauss-Laborde Reunion) projection @@ -170,7 +170,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("gstmerc", new gstmerc_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/hammer.hpp b/include/boost/geometry/extensions/gis/projections/proj/hammer.hpp index 88874dd90..42755171e 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/hammer.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/hammer.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace hammer{ + namespace detail { namespace hammer{ struct par_hammer { @@ -100,7 +100,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::hammer - #endif // doxygen + #endif // doxygen /*! \brief Hammer & Eckert-Greifendorff projection @@ -146,7 +146,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("hammer", new hammer_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/hatano.hpp b/include/boost/geometry/extensions/gis/projections/proj/hatano.hpp index cfda1242e..bf8c06a8d 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/hatano.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/hatano.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace hatano{ + namespace detail { namespace hatano{ static const int NITER = 20; static const double EPS = 1e-7; static const double ONETOL = 1.000001; @@ -123,7 +123,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::hatano - #endif // doxygen + #endif // doxygen /*! \brief Hatano Asymmetrical Equal Area projection @@ -167,7 +167,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("hatano", new hatano_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/imw_p.hpp b/include/boost/geometry/extensions/gis/projections/proj/imw_p.hpp index 76bd90081..db9b88850 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/imw_p.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/imw_p.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -49,7 +49,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace imw_p{ + namespace detail { namespace imw_p{ static const double TOL = 1e-10; static const double EPS = 1e-10; @@ -230,7 +230,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::imw_p - #endif // doxygen + #endif // doxygen /*! \brief International Map of the World Polyconic projection @@ -275,7 +275,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("imw_p", new imw_p_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/krovak.hpp b/include/boost/geometry/extensions/gis/projections/proj/krovak.hpp index c0e1c51e7..49bd7d885 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/krovak.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/krovak.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace krovak{ + namespace detail { namespace krovak{ struct par_krovak { @@ -282,7 +282,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::krovak - #endif // doxygen + #endif // doxygen /*! \brief Krovak projection @@ -326,7 +326,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("krovak", new krovak_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/labrd.hpp b/include/boost/geometry/extensions/gis/projections/proj/labrd.hpp index 5a9bb5251..3a46dd486 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/labrd.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/labrd.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace labrd{ + namespace detail { namespace labrd{ static const double EPS = 1.e-10; struct par_labrd @@ -180,7 +180,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::labrd - #endif // doxygen + #endif // doxygen /*! \brief Laborde projection @@ -225,7 +225,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("labrd", new labrd_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/laea.hpp b/include/boost/geometry/extensions/gis/projections/proj/laea.hpp index 81c4bf7a2..e07b4af4d 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/laea.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/laea.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -50,7 +50,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace laea{ + namespace detail { namespace laea{ static const double EPS10 = 1.e-10; static const int NITER = 20; static const double CONV = 1.e-10; @@ -315,7 +315,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::laea - #endif // doxygen + #endif // doxygen /*! \brief Lambert Azimuthal Equal Area projection @@ -385,7 +385,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("laea", new laea_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/lagrng.hpp b/include/boost/geometry/extensions/gis/projections/proj/lagrng.hpp index 2c952688c..71c2a4016 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/lagrng.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/lagrng.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace lagrng{ + namespace detail { namespace lagrng{ static const double TOL = 1e-10; struct par_lagrng @@ -106,7 +106,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::lagrng - #endif // doxygen + #endif // doxygen /*! \brief Lagrange projection @@ -152,7 +152,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("lagrng", new lagrng_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/larr.hpp b/include/boost/geometry/extensions/gis/projections/proj/larr.hpp index 9f00af0be..45cff26f8 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/larr.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/larr.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace larr{ + namespace detail { namespace larr{ static const double SIXTH = .16666666666666666; @@ -83,7 +83,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::larr - #endif // doxygen + #endif // doxygen /*! \brief Larrivee projection @@ -128,7 +128,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("larr", new larr_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/lask.hpp b/include/boost/geometry/extensions/gis/projections/proj/lask.hpp index 92a398853..2111b5791 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/lask.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/lask.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace lask{ + namespace detail { namespace lask{ static const double a10 = 0.975534; static const double a12 = -0.119161; static const double a32 = -0.0143059; @@ -97,7 +97,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::lask - #endif // doxygen + #endif // doxygen /*! \brief Laskowski projection @@ -142,7 +142,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("lask", new lask_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/latlong.hpp b/include/boost/geometry/extensions/gis/projections/proj/latlong.hpp index dc59ac994..75e6ab90f 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/latlong.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/latlong.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -50,7 +50,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace latlong{ + namespace detail { namespace latlong{ /* very loosely based upon DMA code by Bradford W. Drew */ @@ -130,7 +130,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::latlong - #endif // doxygen + #endif // doxygen /*! \brief Lat/long (Geodetic) projection @@ -262,7 +262,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("longlat", new longlat_entry); } - } // namespace detail + } // namespace detail // Create EPSG specializations // (Proof of Concept, only for some) diff --git a/include/boost/geometry/extensions/gis/projections/proj/lcc.hpp b/include/boost/geometry/extensions/gis/projections/proj/lcc.hpp index 529b4ab03..088a0cbe5 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/lcc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/lcc.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -53,7 +53,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace lcc{ + namespace detail { namespace lcc{ static const double EPS10 = 1.e-10; struct par_lcc @@ -183,7 +183,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::lcc - #endif // doxygen + #endif // doxygen /*! \brief Lambert Conformal Conic projection @@ -229,7 +229,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("lcc", new lcc_entry); } - } // namespace detail + } // namespace detail // Create EPSG specializations // (Proof of Concept, only for some) diff --git a/include/boost/geometry/extensions/gis/projections/proj/lcca.hpp b/include/boost/geometry/extensions/gis/projections/proj/lcca.hpp index 7d8531420..37737793b 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/lcca.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/lcca.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -49,7 +49,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace lcca{ + namespace detail { namespace lcca{ static const int MAX_ITER = 10; static const double DEL_TOL = 1e-12; @@ -140,7 +140,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::lcca - #endif // doxygen + #endif // doxygen /*! \brief Lambert Conformal Conic Alternative projection @@ -186,7 +186,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("lcca", new lcca_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/loxim.hpp b/include/boost/geometry/extensions/gis/projections/proj/loxim.hpp index 9ea3dee86..7eba713b0 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/loxim.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/loxim.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace loxim{ + namespace detail { namespace loxim{ static const double EPS = 1e-8; struct par_loxim @@ -114,7 +114,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::loxim - #endif // doxygen + #endif // doxygen /*! \brief Loximuthal projection @@ -158,7 +158,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("loxim", new loxim_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/lsat.hpp b/include/boost/geometry/extensions/gis/projections/proj/lsat.hpp index a6f0ac59b..2061750ca 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/lsat.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/lsat.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace lsat{ + namespace detail { namespace lsat{ static const double TOL = 1e-7; static const double PI_HALFPI = 4.71238898038468985766; static const double TWOPI_HALFPI = 7.85398163397448309610; @@ -247,7 +247,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::lsat - #endif // doxygen + #endif // doxygen /*! \brief Space oblique for LANDSAT projection @@ -293,7 +293,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("lsat", new lsat_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/mbt_fps.hpp b/include/boost/geometry/extensions/gis/projections/proj/mbt_fps.hpp index 8dd01505e..0abb4ee4f 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/mbt_fps.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/mbt_fps.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace mbt_fps{ + namespace detail { namespace mbt_fps{ static const int MAX_ITER = 10; static const double LOOP_TOL = 1e-7; static const double C1 = 0.45503; @@ -111,7 +111,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::mbt_fps - #endif // doxygen + #endif // doxygen /*! \brief McBryde-Thomas Flat-Pole Sine (No. 2) projection @@ -155,7 +155,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("mbt_fps", new mbt_fps_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/mbtfpp.hpp b/include/boost/geometry/extensions/gis/projections/proj/mbtfpp.hpp index a7d1cb4fb..b552f82aa 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/mbtfpp.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/mbtfpp.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace mbtfpp{ + namespace detail { namespace mbtfpp{ static const double CS_ = .95257934441568037152; static const double FXC = .92582009977255146156; static const double FYC = 3.40168025708304504493; @@ -105,7 +105,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::mbtfpp - #endif // doxygen + #endif // doxygen /*! \brief McBride-Thomas Flat-Polar Parabolic projection @@ -149,7 +149,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("mbtfpp", new mbtfpp_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/mbtfpq.hpp b/include/boost/geometry/extensions/gis/projections/proj/mbtfpq.hpp index 421eeffe2..66544aa5b 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/mbtfpq.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/mbtfpq.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace mbtfpq{ + namespace detail { namespace mbtfpq{ static const int NITER = 20; static const double EPS = 1e-7; static const double ONETOL = 1.000001; @@ -120,7 +120,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::mbtfpq - #endif // doxygen + #endif // doxygen /*! \brief McBryde-Thomas Flat-Polar Quartic projection @@ -164,7 +164,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("mbtfpq", new mbtfpq_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/merc.hpp b/include/boost/geometry/extensions/gis/projections/proj/merc.hpp index ac536f535..8b6c29daf 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/merc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/merc.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -51,7 +51,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace merc{ + namespace detail { namespace merc{ static const double EPS10 = 1.e-10; @@ -135,7 +135,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::merc - #endif // doxygen + #endif // doxygen /*! \brief Mercator projection @@ -207,7 +207,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("merc", new merc_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/mill.hpp b/include/boost/geometry/extensions/gis/projections/proj/mill.hpp index 04dab0d28..be21405ca 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/mill.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/mill.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace mill{ + namespace detail { namespace mill{ // template class, using CRTP to implement forward/inverse @@ -88,7 +88,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::mill - #endif // doxygen + #endif // doxygen /*! \brief Miller Cylindrical projection @@ -132,7 +132,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("mill", new mill_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/mod_ster.hpp b/include/boost/geometry/extensions/gis/projections/proj/mod_ster.hpp index 2d5b36ade..f772392e0 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/mod_ster.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/mod_ster.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -50,7 +50,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace mod_ster{ + namespace detail { namespace mod_ster{ static const double EPSLN = 1e-10; struct par_mod_ster @@ -301,7 +301,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::mod_ster - #endif // doxygen + #endif // doxygen /*! \brief Miller Oblated Stereographic projection @@ -468,7 +468,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("gs50", new gs50_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/moll.hpp b/include/boost/geometry/extensions/gis/projections/proj/moll.hpp index d47d90754..0afb9bd4e 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/moll.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/moll.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -50,7 +50,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace moll{ + namespace detail { namespace moll{ static const int MAX_ITER = 10; static const double LOOP_TOL = 1e-7; @@ -147,7 +147,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::moll - #endif // doxygen + #endif // doxygen /*! \brief Mollweide projection @@ -255,7 +255,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("wag5", new wag5_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/nell.hpp b/include/boost/geometry/extensions/gis/projections/proj/nell.hpp index 330c30aef..125f66313 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/nell.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/nell.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace nell{ + namespace detail { namespace nell{ static const int MAX_ITER = 10; static const double LOOP_TOL = 1e-7; @@ -102,7 +102,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::nell - #endif // doxygen + #endif // doxygen /*! \brief Nell projection @@ -146,7 +146,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("nell", new nell_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/nell_h.hpp b/include/boost/geometry/extensions/gis/projections/proj/nell_h.hpp index 77017ea46..a9d0ec33d 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/nell_h.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/nell_h.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace nell_h{ + namespace detail { namespace nell_h{ static const int NITER = 9; static const double EPS = 1e-7; @@ -103,7 +103,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::nell_h - #endif // doxygen + #endif // doxygen /*! \brief Nell-Hammer projection @@ -147,7 +147,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("nell_h", new nell_h_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/nocol.hpp b/include/boost/geometry/extensions/gis/projections/proj/nocol.hpp index 140932fc2..4276b02fc 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/nocol.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/nocol.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace nocol{ + namespace detail { namespace nocol{ static const double EPS = 1e-10; @@ -109,7 +109,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::nocol - #endif // doxygen + #endif // doxygen /*! \brief Nicolosi Globular projection @@ -154,7 +154,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("nicol", new nicol_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/nsper.hpp b/include/boost/geometry/extensions/gis/projections/proj/nsper.hpp index 277e1f37a..66dcf71bc 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/nsper.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/nsper.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -49,7 +49,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace nsper{ + namespace detail { namespace nsper{ static const double EPS10 = 1.e-10; static const int N_POLE = 0; static const int S_POLE = 1; @@ -233,7 +233,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::nsper - #endif // doxygen + #endif // doxygen /*! \brief Near-sided perspective projection @@ -311,7 +311,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("tpers", new tpers_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/nzmg.hpp b/include/boost/geometry/extensions/gis/projections/proj/nzmg.hpp index d47a1361e..9da524997 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/nzmg.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/nzmg.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace nzmg{ + namespace detail { namespace nzmg{ static const double EPSLN = 1e-10; static const double SEC5_TO_RAD = 0.4848136811095359935899141023; static const double RAD_TO_SEC5 = 2.062648062470963551564733573; @@ -147,7 +147,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::nzmg - #endif // doxygen + #endif // doxygen /*! \brief New Zealand Map Grid projection @@ -190,7 +190,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("nzmg", new nzmg_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/ob_tran.hpp b/include/boost/geometry/extensions/gis/projections/proj/ob_tran.hpp index 0eb65b472..f38ae8a0e 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/ob_tran.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/ob_tran.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -52,7 +52,7 @@ namespace boost { namespace geometry { namespace projections template class factory; #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace ob_tran{ + namespace detail { namespace ob_tran{ static const double TOL = 1e-10; template @@ -233,7 +233,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::ob_tran - #endif // doxygen + #endif // doxygen /*! \brief General Oblique Transformation projection @@ -312,7 +312,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("ob_tran", new ob_tran_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/ocea.hpp b/include/boost/geometry/extensions/gis/projections/proj/ocea.hpp index cc0351f4a..41e206ccc 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/ocea.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/ocea.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace ocea{ + namespace detail { namespace ocea{ struct par_ocea { @@ -138,7 +138,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::ocea - #endif // doxygen + #endif // doxygen /*! \brief Oblique Cylindrical Equal Area projection @@ -183,7 +183,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("ocea", new ocea_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/oea.hpp b/include/boost/geometry/extensions/gis/projections/proj/oea.hpp index 1eaa4722f..f1a043317 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/oea.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/oea.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace oea{ + namespace detail { namespace oea{ struct par_oea { @@ -130,7 +130,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::oea - #endif // doxygen + #endif // doxygen /*! \brief Oblated Equal Area projection @@ -175,7 +175,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("oea", new oea_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/omerc.hpp b/include/boost/geometry/extensions/gis/projections/proj/omerc.hpp index 979e259a0..37d37eeb1 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/omerc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/omerc.hpp @@ -50,11 +50,11 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace omerc{ + namespace detail { namespace omerc{ static const double TOL = 1.e-7; static const double EPS = 1.e-10; - inline double TSFN0(double x) + inline double TSFN0(double x) {return tan(.5 * (HALFPI - (x))); } @@ -255,7 +255,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::omerc - #endif // doxygen + #endif // doxygen /*! \brief Oblique Mercator projection @@ -302,7 +302,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("omerc", new omerc_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/ortho.hpp b/include/boost/geometry/extensions/gis/projections/proj/ortho.hpp index db7b8a378..44f5b0d7e 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/ortho.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/ortho.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace ortho{ + namespace detail { namespace ortho{ static const double EPS10 = 1.e-10; static const int N_POLE = 0; static const int S_POLE = 1; @@ -169,7 +169,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::ortho - #endif // doxygen + #endif // doxygen /*! \brief Orthographic projection @@ -213,7 +213,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("ortho", new ortho_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/poly.hpp b/include/boost/geometry/extensions/gis/projections/proj/poly.hpp index c9cd40871..f9b560ec5 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/poly.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/poly.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -50,7 +50,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace poly{ + namespace detail { namespace poly{ static const double TOL = 1e-10; static const double CONV = 1e-10; static const int N_ITER = 10; @@ -190,7 +190,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::poly - #endif // doxygen + #endif // doxygen /*! \brief Polyconic (American) projection @@ -260,7 +260,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("poly", new poly_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/putp2.hpp b/include/boost/geometry/extensions/gis/projections/proj/putp2.hpp index c0720c411..1e05e1099 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/putp2.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/putp2.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace putp2{ + namespace detail { namespace putp2{ static const double C_x = 1.89490; static const double C_y = 1.71848; static const double C_p = 0.6141848493043784; @@ -113,7 +113,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::putp2 - #endif // doxygen + #endif // doxygen /*! \brief Putnins P2 projection @@ -157,7 +157,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("putp2", new putp2_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/putp3.hpp b/include/boost/geometry/extensions/gis/projections/proj/putp3.hpp index 3e0b70f8c..5722dd08e 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/putp3.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/putp3.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -49,7 +49,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace putp3{ + namespace detail { namespace putp3{ static const double C = 0.79788456; static const double RPISQ = 0.1013211836; @@ -114,7 +114,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::putp3 - #endif // doxygen + #endif // doxygen /*! \brief Putnins P3 projection @@ -190,7 +190,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("putp3p", new putp3p_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/putp4p.hpp b/include/boost/geometry/extensions/gis/projections/proj/putp4p.hpp index 5096b01a1..42204f98c 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/putp4p.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/putp4p.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -49,7 +49,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace putp4p{ + namespace detail { namespace putp4p{ struct par_putp4p { @@ -119,7 +119,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::putp4p - #endif // doxygen + #endif // doxygen /*! \brief Putnins P4' projection @@ -195,7 +195,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("weren", new weren_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/putp5.hpp b/include/boost/geometry/extensions/gis/projections/proj/putp5.hpp index 4ca77a510..ce3ef9db8 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/putp5.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/putp5.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -49,7 +49,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace putp5{ + namespace detail { namespace putp5{ static const double C = 1.01346; static const double D = 1.2158542; @@ -116,7 +116,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::putp5 - #endif // doxygen + #endif // doxygen /*! \brief Putnins P5 projection @@ -192,7 +192,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("putp5p", new putp5p_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/putp6.hpp b/include/boost/geometry/extensions/gis/projections/proj/putp6.hpp index 4bdf271e6..6f8def3a9 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/putp6.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/putp6.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -49,7 +49,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace putp6{ + namespace detail { namespace putp6{ static const double EPS = 1e-10; static const int NITER = 10; static const double CON_POLE = 1.732050807568877; @@ -141,7 +141,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::putp6 - #endif // doxygen + #endif // doxygen /*! \brief Putnins P6 projection @@ -217,7 +217,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("putp6p", new putp6p_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/qsc.hpp b/include/boost/geometry/extensions/gis/projections/proj/qsc.hpp index 56e8cf5a8..a9f6bf0db 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/qsc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/qsc.hpp @@ -49,7 +49,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace qsc{ + namespace detail { namespace qsc{ static const double EPS10 = 1.e-10; static const int FACE_FRONT = 0; static const int FACE_RIGHT = 1; @@ -411,7 +411,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::qsc - #endif // doxygen + #endif // doxygen /*! \brief Quadrilateralized Spherical Cube projection @@ -455,7 +455,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("qsc", new qsc_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/robin.hpp b/include/boost/geometry/extensions/gis/projections/proj/robin.hpp index d6b3a0cc6..fae3416a0 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/robin.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/robin.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -49,7 +49,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace robin{ + namespace detail { namespace robin{ static const double FXC = 0.8487; static const double FYC = 1.3523; static const double C1 = 11.45915590261646417544; @@ -187,7 +187,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::robin - #endif // doxygen + #endif // doxygen /*! \brief Robinson projection @@ -231,7 +231,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("robin", new robin_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/rouss.hpp b/include/boost/geometry/extensions/gis/projections/proj/rouss.hpp index b247e7767..1429c76e9 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/rouss.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/rouss.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -49,7 +49,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace rouss{ + namespace detail { namespace rouss{ struct par_rouss { @@ -161,7 +161,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::rouss - #endif // doxygen + #endif // doxygen /*! \brief Roussilhe Stereographic projection @@ -205,7 +205,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("rouss", new rouss_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/rpoly.hpp b/include/boost/geometry/extensions/gis/projections/proj/rpoly.hpp index df33dd1ba..7783e5080 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/rpoly.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/rpoly.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace rpoly{ + namespace detail { namespace rpoly{ static const double EPS = 1e-9; struct par_rpoly @@ -106,7 +106,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::rpoly - #endif // doxygen + #endif // doxygen /*! \brief Rectangular Polyconic projection @@ -152,7 +152,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("rpoly", new rpoly_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/sconics.hpp b/include/boost/geometry/extensions/gis/projections/proj/sconics.hpp index 6259f9f74..0206c4918 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/sconics.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/sconics.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -49,7 +49,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace sconics{ + namespace detail { namespace sconics{ static const int EULER = 0; static const int MURD1 = 1; static const int MURD2 = 2; @@ -262,7 +262,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::sconics - #endif // doxygen + #endif // doxygen /*! \brief Tissot projection @@ -505,7 +505,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("vitk1", new vitk1_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/somerc.hpp b/include/boost/geometry/extensions/gis/projections/proj/somerc.hpp index 6c1f872ae..e5377abeb 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/somerc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/somerc.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace somerc{ + namespace detail { namespace somerc{ static const double EPS = 1.e-10; static const int NITER = 6; @@ -137,7 +137,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::somerc - #endif // doxygen + #endif // doxygen /*! \brief Swiss. Obl. Mercator projection @@ -182,7 +182,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("somerc", new somerc_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/stere.hpp b/include/boost/geometry/extensions/gis/projections/proj/stere.hpp index 191935acb..d976ec521 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/stere.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/stere.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -50,7 +50,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace stere{ + namespace detail { namespace stere{ static const double EPS10 = 1.e-10; static const double TOL = 1.e-8; static const int NITER = 8; @@ -339,7 +339,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::stere - #endif // doxygen + #endif // doxygen /*! \brief Stereographic projection @@ -445,7 +445,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("ups", new ups_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/sterea.hpp b/include/boost/geometry/extensions/gis/projections/proj/sterea.hpp index cdf35ab0b..96e89dded 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/sterea.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/sterea.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -51,7 +51,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace sterea{ + namespace detail { namespace sterea{ static const double DEL_TOL = 1.e-14; static const int MAX_ITER = 10; @@ -129,7 +129,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::sterea - #endif // doxygen + #endif // doxygen /*! \brief Oblique Stereographic Alternative projection @@ -174,7 +174,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("sterea", new sterea_entry); } - } // namespace detail + } // namespace detail // Create EPSG specializations // (Proof of Concept, only for some) diff --git a/include/boost/geometry/extensions/gis/projections/proj/sts.hpp b/include/boost/geometry/extensions/gis/projections/proj/sts.hpp index 2c562aa23..1d84cf64f 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/sts.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/sts.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -49,7 +49,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace sts{ + namespace detail { namespace sts{ struct par_sts { @@ -148,7 +148,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::sts - #endif // doxygen + #endif // doxygen /*! \brief Kavraisky V projection @@ -288,7 +288,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("fouc", new fouc_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/tcc.hpp b/include/boost/geometry/extensions/gis/projections/proj/tcc.hpp index 588533369..e7a375d27 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/tcc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/tcc.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace tcc{ + namespace detail { namespace tcc{ static const double EPS10 = 1.e-10; struct par_tcc @@ -91,7 +91,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::tcc - #endif // doxygen + #endif // doxygen /*! \brief Transverse Central Cylindrical projection @@ -136,7 +136,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("tcc", new tcc_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/tcea.hpp b/include/boost/geometry/extensions/gis/projections/proj/tcea.hpp index 737f72ee4..57d90cf4f 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/tcea.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/tcea.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace tcea{ + namespace detail { namespace tcea{ struct par_tcea { @@ -99,7 +99,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::tcea - #endif // doxygen + #endif // doxygen /*! \brief Transverse Cylindrical Equal Area projection @@ -143,7 +143,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("tcea", new tcea_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/tmerc.hpp b/include/boost/geometry/extensions/gis/projections/proj/tmerc.hpp index 579139156..e45cb1d7b 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/tmerc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/tmerc.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -53,7 +53,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace tmerc{ + namespace detail { namespace tmerc{ static const double EPS10 = 1.e-10; static const double FC1 = 1.; static const double FC2 = .5; @@ -269,7 +269,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::tmerc - #endif // doxygen + #endif // doxygen /*! \brief Transverse Mercator projection @@ -372,7 +372,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("utm", new utm_entry); } - } // namespace detail + } // namespace detail // Create EPSG specializations // (Proof of Concept, only for some) diff --git a/include/boost/geometry/extensions/gis/projections/proj/tpeqd.hpp b/include/boost/geometry/extensions/gis/projections/proj/tpeqd.hpp index 5bfbee9ae..bc11a1d13 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/tpeqd.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/tpeqd.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace tpeqd{ + namespace detail { namespace tpeqd{ struct par_tpeqd { @@ -147,7 +147,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::tpeqd - #endif // doxygen + #endif // doxygen /*! \brief Two Point Equidistant projection @@ -192,7 +192,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("tpeqd", new tpeqd_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/urm5.hpp b/include/boost/geometry/extensions/gis/projections/proj/urm5.hpp index 519aebf00..ce6a125b3 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/urm5.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/urm5.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace urm5{ + namespace detail { namespace urm5{ struct par_urm5 { @@ -98,7 +98,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::urm5 - #endif // doxygen + #endif // doxygen /*! \brief Urmaev V projection @@ -144,7 +144,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("urm5", new urm5_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/urmfps.hpp b/include/boost/geometry/extensions/gis/projections/proj/urmfps.hpp index b781c3217..3a9d14d46 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/urmfps.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/urmfps.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -49,7 +49,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace urmfps{ + namespace detail { namespace urmfps{ static const double C_x = 0.8773826753; static const double Cy = 1.139753528477; @@ -122,7 +122,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::urmfps - #endif // doxygen + #endif // doxygen /*! \brief Urmaev Flat-Polar Sinusoidal projection @@ -199,7 +199,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("wag1", new wag1_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/vandg.hpp b/include/boost/geometry/extensions/gis/projections/proj/vandg.hpp index 509a593c6..32e5e9d98 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/vandg.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/vandg.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace vandg{ + namespace detail { namespace vandg{ static const double TOL = 1.e-10; static const double THIRD = .33333333333333333333; static const double TWO_THRD = .66666666666666666666; @@ -151,7 +151,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::vandg - #endif // doxygen + #endif // doxygen /*! \brief van der Grinten (I) projection @@ -195,7 +195,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("vandg", new vandg_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/vandg2.hpp b/include/boost/geometry/extensions/gis/projections/proj/vandg2.hpp index 8d4ffd5fa..2bb33d513 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/vandg2.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/vandg2.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace vandg2{ + namespace detail { namespace vandg2{ static const double TOL = 1e-10; static const double TWORPI = 0.63661977236758134308; @@ -121,7 +121,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::vandg2 - #endif // doxygen + #endif // doxygen /*! \brief van der Grinten II projection @@ -199,7 +199,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("vandg3", new vandg3_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/vandg4.hpp b/include/boost/geometry/extensions/gis/projections/proj/vandg4.hpp index 58048e013..798f3a0a7 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/vandg4.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/vandg4.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace vandg4{ + namespace detail { namespace vandg4{ static const double TOL = 1e-10; static const double TWORPI = 0.63661977236758134308; @@ -112,7 +112,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::vandg4 - #endif // doxygen + #endif // doxygen /*! \brief van der Grinten IV projection @@ -157,7 +157,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("vandg4", new vandg4_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/wag2.hpp b/include/boost/geometry/extensions/gis/projections/proj/wag2.hpp index 69c733f91..09a743f70 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/wag2.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/wag2.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace wag2{ + namespace detail { namespace wag2{ static const double C_x = 0.92483; static const double C_y = 1.38725; static const double C_p1 = 0.88022; @@ -94,7 +94,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::wag2 - #endif // doxygen + #endif // doxygen /*! \brief Wagner II projection @@ -138,7 +138,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("wag2", new wag2_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/wag3.hpp b/include/boost/geometry/extensions/gis/projections/proj/wag3.hpp index c7703f47a..b34d39a94 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/wag3.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/wag3.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace wag3{ + namespace detail { namespace wag3{ static const double TWOTHIRD = 0.6666666666666666666667; struct par_wag3 @@ -97,7 +97,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::wag3 - #endif // doxygen + #endif // doxygen /*! \brief Wagner III projection @@ -142,7 +142,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("wag3", new wag3_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/wag7.hpp b/include/boost/geometry/extensions/gis/projections/proj/wag7.hpp index 4ac2ef644..565c8f022 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/wag7.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/wag7.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace wag7{ + namespace detail { namespace wag7{ // template class, using CRTP to implement forward/inverse @@ -86,7 +86,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::wag7 - #endif // doxygen + #endif // doxygen /*! \brief Wagner VII projection @@ -131,7 +131,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("wag7", new wag7_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/wink1.hpp b/include/boost/geometry/extensions/gis/projections/proj/wink1.hpp index ed6c07666..731c5e0ea 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/wink1.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/wink1.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace wink1{ + namespace detail { namespace wink1{ struct par_wink1 { @@ -94,7 +94,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::wink1 - #endif // doxygen + #endif // doxygen /*! \brief Winkel I projection @@ -139,7 +139,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("wink1", new wink1_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/wink2.hpp b/include/boost/geometry/extensions/gis/projections/proj/wink2.hpp index d4973b4c2..cfad21270 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/wink2.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/wink2.hpp @@ -15,7 +15,7 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels -// Last updated version of proj: 4.8.0 +// Last updated version of proj: 4.9.1 // Original copyright notice: @@ -48,7 +48,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace wink2{ + namespace detail { namespace wink2{ static const int MAX_ITER = 10; static const double LOOP_TOL = 1e-7; static const double TWO_D_PI = 0.636619772367581343; @@ -107,7 +107,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::wink2 - #endif // doxygen + #endif // doxygen /*! \brief Winkel II projection @@ -153,7 +153,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("wink2", new wink2_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections From ed7dc5f1dffe58eaef603dfeb2e689fdc80e9588 Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Sat, 25 Apr 2015 16:36:59 +0200 Subject: [PATCH 49/89] [arithmetic] Improve style according to guidelines. - names - lines length --- .../boost/geometry/arithmetic/arithmetic.hpp | 88 ++++++++++++------- 1 file changed, 56 insertions(+), 32 deletions(-) diff --git a/include/boost/geometry/arithmetic/arithmetic.hpp b/include/boost/geometry/arithmetic/arithmetic.hpp index fa4fb3203..fbc3ca443 100644 --- a/include/boost/geometry/arithmetic/arithmetic.hpp +++ b/include/boost/geometry/arithmetic/arithmetic.hpp @@ -33,53 +33,53 @@ namespace detail { -template +template struct param { typedef typename boost::call_traits < - typename coordinate_type

::type + typename coordinate_type::type >::param_type type; }; -template class Function> +template class Function> struct value_operation { - C m_value; + Value m_value; - inline value_operation(C const &value) + inline value_operation(Value const &value) : m_value(value) {} - template - inline void apply(PointDst& dest_point) const + template + inline void apply(PointDst& point_dst) const { - set(dest_point, + set(point_dst, Function < typename geometry::select_most_precise < - C, + Value, typename geometry::coordinate_type::type >::type - >()(get(dest_point), m_value)); + >()(get(point_dst), m_value)); } }; template class Function> struct point_operation { - PointSrc const& m_source_point; + PointSrc const& m_point_src; inline point_operation(PointSrc const& point) - : m_source_point(point) + : m_point_src(point) {} - template - inline void apply(PointDst& dest_point) const + template + inline void apply(PointDst& point_dst) const { - set(dest_point, + set(point_dst, Function < typename geometry::select_most_precise @@ -87,40 +87,40 @@ struct point_operation typename geometry::coordinate_type::type, typename geometry::coordinate_type::type >::type - >()(get(dest_point), get(m_source_point))); + >()(get(point_dst), get(m_point_src))); } }; -template +template struct value_assignment { - C m_value; + Value m_value; - inline value_assignment(C const &value) + inline value_assignment(Value const &value) : m_value(value) {} - template - inline void apply(P& point) const + template + inline void apply(PointDst& point_dst) const { - set(point, m_value); + set(point_dst, m_value); } }; template struct point_assignment { - PointSrc const& m_source_point; + PointSrc const& m_point_src; inline point_assignment(PointSrc const& point) - : m_source_point(point) + : m_point_src(point) {} - template - inline void apply(PointDst& dest_point) const + template + inline void apply(PointDst& point_dst) const { - set(dest_point, get(m_source_point)); + set(point_dst, get(m_point_src)); } }; @@ -141,7 +141,12 @@ inline void add_value(Point& p, typename detail::param::type value) { BOOST_CONCEPT_ASSERT( (concept::Point) ); - for_each_coordinate(p, detail::value_operation::type, std::plus>(value)); + for_each_coordinate(p, + detail::value_operation + < + typename coordinate_type::type, + std::plus + >(value)); } /*! @@ -176,7 +181,12 @@ inline void subtract_value(Point& p, typename detail::param::type value) { BOOST_CONCEPT_ASSERT( (concept::Point) ); - for_each_coordinate(p, detail::value_operation::type, std::minus>(value)); + for_each_coordinate(p, + detail::value_operation + < + typename coordinate_type::type, + std::minus + >(value)); } /*! @@ -211,7 +221,12 @@ inline void multiply_value(Point& p, typename detail::param::type value) { BOOST_CONCEPT_ASSERT( (concept::Point) ); - for_each_coordinate(p, detail::value_operation::type, std::multiplies>(value)); + for_each_coordinate(p, + detail::value_operation + < + typename coordinate_type::type, + std::multiplies + >(value)); } /*! @@ -247,7 +262,12 @@ inline void divide_value(Point& p, typename detail::param::type value) { BOOST_CONCEPT_ASSERT( (concept::Point) ); - for_each_coordinate(p, detail::value_operation::type, std::divides>(value)); + for_each_coordinate(p, + detail::value_operation + < + typename coordinate_type::type, + std::divides + >(value)); } /*! @@ -282,7 +302,11 @@ inline void assign_value(Point& p, typename detail::param::type value) { BOOST_CONCEPT_ASSERT( (concept::Point) ); - for_each_coordinate(p, detail::value_assignment::type>(value)); + for_each_coordinate(p, + detail::value_assignment + < + typename coordinate_type::type + >(value)); } /*! From 33447669102a1d1d287e925afce422312f9a5fe8 Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Sat, 25 Apr 2015 19:39:42 +0200 Subject: [PATCH 50/89] [projections] remove redundant return statements --- .../geometry/extensions/gis/projections/proj/aitoff.hpp | 6 ------ .../geometry/extensions/gis/projections/proj/gn_sinu.hpp | 1 - .../geometry/extensions/gis/projections/proj/krovak.hpp | 8 -------- .../geometry/extensions/gis/projections/proj/ortho.hpp | 4 ---- .../geometry/extensions/gis/projections/proj/qsc.hpp | 2 -- 5 files changed, 21 deletions(-) diff --git a/include/boost/geometry/extensions/gis/projections/proj/aitoff.hpp b/include/boost/geometry/extensions/gis/projections/proj/aitoff.hpp index 966c0e6f4..b7f15787e 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/aitoff.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/aitoff.hpp @@ -90,9 +90,7 @@ namespace boost { namespace geometry { namespace projections xy_x = (xy_x + lp_lon * this->m_proj_parm.cosphi1) * 0.5; xy_y = (xy_y + lp_lat) * 0.5; } - return; } - /*********************************************************************************** * * Inverse functions added by Drazen Tutic and Lovro Gradiser based on paper: @@ -114,7 +112,6 @@ namespace boost { namespace geometry { namespace projections * ************************************************************************************/ - inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const { int iter, MAXITER = 10, round = 0, MAXROUND = 20; @@ -171,10 +168,7 @@ namespace boost { namespace geometry { namespace projections } while (((fabs(xy_x-x) > EPSILON) || (fabs(xy_y-y) > EPSILON)) && (round++ < MAXROUND)); if (iter == MAXITER && round == MAXROUND) fprintf(stderr, "Warning: Accuracy of 1e-12 not reached. Last increments: dlat=%e and dlon=%e\n", dp, dl); - - return; } - }; template diff --git a/include/boost/geometry/extensions/gis/projections/proj/gn_sinu.hpp b/include/boost/geometry/extensions/gis/projections/proj/gn_sinu.hpp index bd2bc33f9..f1a827c58 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/gn_sinu.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/gn_sinu.hpp @@ -95,7 +95,6 @@ namespace boost { namespace geometry { namespace projections } else if ((s - EPS10) < HALFPI) lp_lon = 0.; else throw proj_exception();; - return; } /* General spherical sinusoidals */ }; diff --git a/include/boost/geometry/extensions/gis/projections/proj/krovak.hpp b/include/boost/geometry/extensions/gis/projections/proj/krovak.hpp index 49bd7d885..537981757 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/krovak.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/krovak.hpp @@ -161,13 +161,8 @@ namespace boost { namespace geometry { namespace projections xy_y *= -1.0; xy_x *= -1.0; } - - return; } - - - inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const { /* calculate lat/lon from xy */ @@ -247,10 +242,7 @@ namespace boost { namespace geometry { namespace projections while (ok==0); lp_lon -= this->m_par.lam0; - - return; } - }; // Krovak diff --git a/include/boost/geometry/extensions/gis/projections/proj/ortho.hpp b/include/boost/geometry/extensions/gis/projections/proj/ortho.hpp index 44f5b0d7e..399126f7b 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/ortho.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/ortho.hpp @@ -101,10 +101,8 @@ namespace boost { namespace geometry { namespace projections break; } xy_x = cosphi * sin(lp_lon); - return; } - inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const { double rh, cosc, sinc; @@ -146,9 +144,7 @@ namespace boost { namespace geometry { namespace projections ? (xy_x == 0. ? 0. : xy_x < 0. ? -HALFPI : HALFPI) : atan2(xy_x, xy_y); } - return; } - }; // Orthographic diff --git a/include/boost/geometry/extensions/gis/projections/proj/qsc.hpp b/include/boost/geometry/extensions/gis/projections/proj/qsc.hpp index a9f6bf0db..529e8e4b9 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/qsc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/qsc.hpp @@ -238,9 +238,7 @@ namespace boost { namespace geometry { namespace projections xy_x = t * cos(mu); xy_y = t * sin(mu); boost::ignore_unused(nu); - return; } - /* Inverse projection, ellipsoid */ inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const From 24f070a0379d2253ade7c4a29c6aab2b5a849bbc Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Sat, 25 Apr 2015 20:58:02 +0200 Subject: [PATCH 51/89] [projections][imw_p] changes in conversion (staying more close to original) --- .../extensions/gis/projections/proj/imw_p.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/boost/geometry/extensions/gis/projections/proj/imw_p.hpp b/include/boost/geometry/extensions/gis/projections/proj/imw_p.hpp index db9b88850..8f6d9d310 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/imw_p.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/imw_p.hpp @@ -53,7 +53,7 @@ namespace boost { namespace geometry { namespace projections static const double TOL = 1e-10; static const double EPS = 1e-10; - struct PXY { double x, y; }; // x/y projection specific + struct XY { double x, y; }; // specific for IMW_P struct par_imw_p { @@ -80,9 +80,9 @@ namespace boost { namespace geometry { namespace projections return err; } template - inline PXY - loc_for(double const& lp_lam, double const& lp_phi, const Parameters& par, par_imw_p const& proj_parm, double *yc) { - PXY xy; + inline XY + loc_for(double const& lp_lam, double const& lp_phi, Parameters& par, par_imw_p& proj_parm, double *yc) { + XY xy; if (! lp_phi) { xy.x = lp_lam; @@ -159,13 +159,13 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double yc = 0; - PXY xy = loc_for(lp_lon, lp_lat, this->m_par, m_proj_parm, &yc); + XY xy = loc_for(lp_lon, lp_lat, this->m_par, m_proj_parm, &yc); xy_x = xy.x; xy_y = xy.y; } inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const { - PXY t; + XY t; double yc = 0; lp_lat = this->m_proj_parm.phi_2; From a48df2a15338cc4e38c30496f1678435c2c6faca Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Sun, 26 Apr 2015 00:46:10 +0200 Subject: [PATCH 52/89] [extensions][wkb] Improve the coding style according to guidelines. - use full names - improve the indentation of template parameters lists - comment-out the unused parameters names --- .../extensions/gis/io/wkb/detail/ogc.hpp | 16 +++-- .../extensions/gis/io/wkb/detail/parser.hpp | 6 +- .../extensions/gis/io/wkb/detail/writer.hpp | 61 ++++++++++--------- 3 files changed, 44 insertions(+), 39 deletions(-) diff --git a/include/boost/geometry/extensions/gis/io/wkb/detail/ogc.hpp b/include/boost/geometry/extensions/gis/io/wkb/detail/ogc.hpp index 8751f70c9..b85447347 100644 --- a/include/boost/geometry/extensions/gis/io/wkb/detail/ogc.hpp +++ b/include/boost/geometry/extensions/gis/io/wkb/detail/ogc.hpp @@ -107,9 +107,12 @@ struct ewkt_policy { }; -template ::value> +template +< + typename Geometry, + geometry_type_ogc::enum_t OgcType, + std::size_t Dim = dimension::value +> struct geometry_type_impl { static bool check(boost::uint32_t value) @@ -123,8 +126,11 @@ struct geometry_type_impl } }; -template +template +< + typename Geometry, + geometry_type_ogc::enum_t OgcType +> struct geometry_type_impl { static bool check(boost::uint32_t value) diff --git a/include/boost/geometry/extensions/gis/io/wkb/detail/parser.hpp b/include/boost/geometry/extensions/gis/io/wkb/detail/parser.hpp index cf569276d..154d70038 100644 --- a/include/boost/geometry/extensions/gis/io/wkb/detail/parser.hpp +++ b/include/boost/geometry/extensions/gis/io/wkb/detail/parser.hpp @@ -17,7 +17,6 @@ #include #include -#include #include #include #include @@ -152,11 +151,10 @@ template struct parsing_assigner { template - static void run(Iterator& it, Iterator end, P& point, - byte_order_type::enum_t order) + static void run(Iterator& /*it*/, Iterator /*end*/, P& /*point*/, + byte_order_type::enum_t /*order*/) { // terminate - boost::ignore_unused(it, end, point, order); } }; diff --git a/include/boost/geometry/extensions/gis/io/wkb/detail/writer.hpp b/include/boost/geometry/extensions/gis/io/wkb/detail/writer.hpp index 8dd0eda9d..7db961404 100644 --- a/include/boost/geometry/extensions/gis/io/wkb/detail/writer.hpp +++ b/include/boost/geometry/extensions/gis/io/wkb/detail/writer.hpp @@ -16,7 +16,6 @@ #include #include -#include #include #include #include @@ -67,13 +66,16 @@ namespace detail { namespace wkb } }; - template ::value> + template + < + typename Point, + std::size_t I = 0, + std::size_t N = dimension::value + > struct writer_assigner { template - static void run(P const& point, + static void run(Point const& point, OutputIterator& iter, byte_order_type::enum_t byte_order) { @@ -83,28 +85,27 @@ namespace detail { namespace wkb iter, byte_order); - writer_assigner::run(point, iter, byte_order); + writer_assigner::run(point, iter, byte_order); } }; - template - struct writer_assigner + template + struct writer_assigner { template - static void run(P const& point, - OutputIterator& iter, - byte_order_type::enum_t byte_order) + static void run(Point const& /*point*/, + OutputIterator& /*iter*/, + byte_order_type::enum_t /*byte_order*/) { // terminate - boost::ignore_unused(point, iter, byte_order); } }; - template + template struct point_writer { template - static bool write(P const& point, + static bool write(Point const& point, OutputIterator& iter, byte_order_type::enum_t byte_order) { @@ -112,21 +113,21 @@ namespace detail { namespace wkb value_writer::write(byte_order, iter, byte_order); // write geometry type - uint32_t type = geometry_type

::get(); + uint32_t type = geometry_type::get(); value_writer::write(type, iter, byte_order); // write point's x, y, z - writer_assigner

::run(point, iter, byte_order); + writer_assigner::run(point, iter, byte_order); return true; } }; - template + template struct linestring_writer { template - static bool write(L const& linestring, + static bool write(Linestring const& linestring, OutputIterator& iter, byte_order_type::enum_t byte_order) { @@ -134,20 +135,20 @@ namespace detail { namespace wkb value_writer::write(byte_order, iter, byte_order); // write geometry type - uint32_t type = geometry_type::get(); + uint32_t type = geometry_type::get(); value_writer::write(type, iter, byte_order); // write num points uint32_t num_points = boost::size(linestring); value_writer::write(num_points, iter, byte_order); - for(typename boost::range_iterator::type + for(typename boost::range_iterator::type point_iter = boost::begin(linestring); point_iter != boost::end(linestring); ++point_iter) { // write point's x, y, z - writer_assigner::type> + writer_assigner::type> ::run(*point_iter, iter, byte_order); } @@ -155,11 +156,11 @@ namespace detail { namespace wkb } }; - template + template struct polygon_writer { template - static bool write(P const& polygon, + static bool write(Polygon const& polygon, OutputIterator& iter, byte_order_type::enum_t byte_order) { @@ -167,7 +168,7 @@ namespace detail { namespace wkb value_writer::write(byte_order, iter, byte_order); // write geometry type - uint32_t type = geometry_type

::get(); + uint32_t type = geometry_type::get(); value_writer::write(type, iter, byte_order); // write num rings @@ -175,10 +176,10 @@ namespace detail { namespace wkb value_writer::write(num_rings, iter, byte_order); // write exterior ring - typedef typename geometry::ring_type

::type + typedef typename geometry::ring_type::type ring_type; - typename geometry::ring_return_type

::type + typename geometry::ring_return_type::type exterior_ring = geometry::exterior_ring(polygon); value_writer::write(geometry::num_points(exterior_ring), @@ -191,15 +192,15 @@ namespace detail { namespace wkb ++point_iter) { // write point's x, y, z - writer_assigner::type> + writer_assigner::type> ::run(*point_iter, iter, byte_order); } // write interor rings - typedef typename geometry::interior_type

::type + typedef typename geometry::interior_type::type interior_rings_type; - typename geometry::interior_return_type

::type + typename geometry::interior_return_type::type interior_rings = geometry::interior_rings(polygon); for(typename boost::range_iterator::type @@ -217,7 +218,7 @@ namespace detail { namespace wkb ++point_iter) { // write point's x, y, z - writer_assigner::type> + writer_assigner::type> ::run(*point_iter, iter, byte_order); } } From 07c8b24b89e9fec75c6b7efc7e9403284aee78a2 Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Sun, 26 Apr 2015 01:05:26 +0200 Subject: [PATCH 53/89] [extensions][test] Enable the testing of IOs. --- extensions/test/gis/Jamfile.v2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/extensions/test/gis/Jamfile.v2 b/extensions/test/gis/Jamfile.v2 index 13dafde28..ac76bde76 100644 --- a/extensions/test/gis/Jamfile.v2 +++ b/extensions/test/gis/Jamfile.v2 @@ -3,11 +3,13 @@ # Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. # Copyright (c) 2008-2012 Bruno Lalande, Paris, France. # Copyright (c) 2009-2012 Mateusz Loskot, London, UK. +# Copyright (c) 2015 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 # http://www.boost.org/LICENSE_1_0.txt) +build-project io ; build-project latlong ; build-project projections ; From bc894a7971b1a34a5e1e10c4d44ce51795363b43 Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Sun, 26 Apr 2015 01:17:10 +0200 Subject: [PATCH 54/89] [doc] Update 1.59 release notes (ticket). --- doc/release_notes.qbk | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/release_notes.qbk b/doc/release_notes.qbk index a3dd8879e..66fef803e 100644 --- a/doc/release_notes.qbk +++ b/doc/release_notes.qbk @@ -35,6 +35,7 @@ [*Solved tickets] * [@https://svn.boost.org/trac/boost/ticket/11113 11113] Support easy enumeration of all elements with BOOST_FOREACH +* [@https://svn.boost.org/trac/boost/ticket/11236 11236] Invalid result of centroid() for integer coordinate type [/=================] [heading Boost 1.58] From e15b685a8d5745d69cef442d3c2c006720149d81 Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Sun, 26 Apr 2015 10:49:14 +0200 Subject: [PATCH 55/89] [projections] ONLY changes in empty lines (in generation) --- .../geometry/extensions/gis/projections/proj/aea.hpp | 5 ----- .../geometry/extensions/gis/projections/proj/aeqd.hpp | 5 ----- .../geometry/extensions/gis/projections/proj/airy.hpp | 4 ---- .../geometry/extensions/gis/projections/proj/aitoff.hpp | 5 ----- .../geometry/extensions/gis/projections/proj/geocent.hpp | 4 ---- .../geometry/extensions/gis/projections/proj/geos.hpp | 2 -- .../geometry/extensions/gis/projections/proj/gstmerc.hpp | 1 - .../geometry/extensions/gis/projections/proj/krovak.hpp | 8 -------- .../geometry/extensions/gis/projections/proj/latlong.hpp | 2 -- .../geometry/extensions/gis/projections/proj/lcca.hpp | 2 -- .../geometry/extensions/gis/projections/proj/mod_ster.hpp | 1 - .../geometry/extensions/gis/projections/proj/nzmg.hpp | 4 ---- .../geometry/extensions/gis/projections/proj/omerc.hpp | 2 -- .../geometry/extensions/gis/projections/proj/qsc.hpp | 2 -- .../geometry/extensions/gis/projections/proj/robin.hpp | 2 -- .../geometry/extensions/gis/projections/proj/sterea.hpp | 3 --- 16 files changed, 52 deletions(-) diff --git a/include/boost/geometry/extensions/gis/projections/proj/aea.hpp b/include/boost/geometry/extensions/gis/projections/proj/aea.hpp index 6aa65ccd2..27be1a781 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/aea.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/aea.hpp @@ -75,11 +75,6 @@ namespace boost { namespace geometry { namespace projections double en[EN_SIZE]; int ellips; }; - - - - - /* determine latitude angle phi-1 */ inline double phi1_(double qs, double Te, double Tone_es) { diff --git a/include/boost/geometry/extensions/gis/projections/proj/aeqd.hpp b/include/boost/geometry/extensions/gis/projections/proj/aeqd.hpp index c8cbeb067..b9bdf23ea 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/aeqd.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/aeqd.hpp @@ -72,11 +72,6 @@ namespace boost { namespace geometry { namespace projections int mode; }; - - - - - // template class, using CRTP to implement forward/inverse template struct base_aeqd_ellipsoid : public base_t_fi, diff --git a/include/boost/geometry/extensions/gis/projections/proj/airy.hpp b/include/boost/geometry/extensions/gis/projections/proj/airy.hpp index c8c383599..61f03f90a 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/airy.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/airy.hpp @@ -65,10 +65,6 @@ namespace boost { namespace geometry { namespace projections int no_cut; /* do not cut at hemisphere limit */ }; - - - - // template class, using CRTP to implement forward/inverse template struct base_airy_spheroid : public base_t_f, diff --git a/include/boost/geometry/extensions/gis/projections/proj/aitoff.hpp b/include/boost/geometry/extensions/gis/projections/proj/aitoff.hpp index b7f15787e..267c770b1 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/aitoff.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/aitoff.hpp @@ -57,11 +57,6 @@ namespace boost { namespace geometry { namespace projections int mode; }; - - - - - // template class, using CRTP to implement forward/inverse template struct base_aitoff_spheroid : public base_t_fi, diff --git a/include/boost/geometry/extensions/gis/projections/proj/geocent.hpp b/include/boost/geometry/extensions/gis/projections/proj/geocent.hpp index 4df4b4d2f..65b9cc09f 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/geocent.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/geocent.hpp @@ -51,10 +51,6 @@ namespace boost { namespace geometry { namespace projections namespace detail { namespace geocent{ - - - - // template class, using CRTP to implement forward/inverse template struct base_geocent_other : public base_t_fi, diff --git a/include/boost/geometry/extensions/gis/projections/proj/geos.hpp b/include/boost/geometry/extensions/gis/projections/proj/geos.hpp index e2fe57c44..13fe1f6ed 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/geos.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/geos.hpp @@ -63,8 +63,6 @@ namespace boost { namespace geometry { namespace projections int flip_axis; }; - - // template class, using CRTP to implement forward/inverse template struct base_geos_ellipsoid : public base_t_fi, diff --git a/include/boost/geometry/extensions/gis/projections/proj/gstmerc.hpp b/include/boost/geometry/extensions/gis/projections/proj/gstmerc.hpp index ccff62891..2caf55a9c 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/gstmerc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/gstmerc.hpp @@ -63,7 +63,6 @@ namespace boost { namespace geometry { namespace projections double YS; }; - // template class, using CRTP to implement forward/inverse template struct base_gstmerc_spheroid : public base_t_fi, diff --git a/include/boost/geometry/extensions/gis/projections/proj/krovak.hpp b/include/boost/geometry/extensions/gis/projections/proj/krovak.hpp index 537981757..89b32d26f 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/krovak.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/krovak.hpp @@ -54,11 +54,6 @@ namespace boost { namespace geometry { namespace projections { double C_x; }; - - - - - /** NOTES: According to EPSG the full Krovak projection method should have the following parameters. Within PROJ.4 the azimuth, and pseudo @@ -82,9 +77,6 @@ namespace boost { namespace geometry { namespace projections **/ - - - // template class, using CRTP to implement forward/inverse template struct base_krovak_ellipsoid : public base_t_fi, diff --git a/include/boost/geometry/extensions/gis/projections/proj/latlong.hpp b/include/boost/geometry/extensions/gis/projections/proj/latlong.hpp index 75e6ab90f..1a552c01f 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/latlong.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/latlong.hpp @@ -52,10 +52,8 @@ namespace boost { namespace geometry { namespace projections #ifndef DOXYGEN_NO_DETAIL namespace detail { namespace latlong{ - /* very loosely based upon DMA code by Bradford W. Drew */ - // template class, using CRTP to implement forward/inverse template struct base_latlong_other : public base_t_fi, diff --git a/include/boost/geometry/extensions/gis/projections/proj/lcca.hpp b/include/boost/geometry/extensions/gis/projections/proj/lcca.hpp index 37737793b..c5a7b61ab 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/lcca.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/lcca.hpp @@ -59,8 +59,6 @@ namespace boost { namespace geometry { namespace projections double r0, l, M0; double C; }; - - inline double /* func to compute dr */ fS(double S, double C) { return(S * ( 1. + S * S * C)); diff --git a/include/boost/geometry/extensions/gis/projections/proj/mod_ster.hpp b/include/boost/geometry/extensions/gis/projections/proj/mod_ster.hpp index f772392e0..98d6c1a37 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/mod_ster.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/mod_ster.hpp @@ -61,7 +61,6 @@ namespace boost { namespace geometry { namespace projections }; /* based upon Snyder and Linck, USGS-NMD */ - // template class, using CRTP to implement forward/inverse template struct base_mod_ster_ellipsoid : public base_t_fi, diff --git a/include/boost/geometry/extensions/gis/projections/proj/nzmg.hpp b/include/boost/geometry/extensions/gis/projections/proj/nzmg.hpp index 9da524997..a0a83886b 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/nzmg.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/nzmg.hpp @@ -56,10 +56,6 @@ namespace boost { namespace geometry { namespace projections static const int Ntpsi = 9; static const int Ntphi = 8; - - - - static COMPLEX bf[] = { {.7557853228, 0.0}, diff --git a/include/boost/geometry/extensions/gis/projections/proj/omerc.hpp b/include/boost/geometry/extensions/gis/projections/proj/omerc.hpp index 37d37eeb1..bf9fd2e6f 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/omerc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/omerc.hpp @@ -65,8 +65,6 @@ namespace boost { namespace geometry { namespace projections int no_rot; }; - - // template class, using CRTP to implement forward/inverse template struct base_omerc_ellipsoid : public base_t_fi, diff --git a/include/boost/geometry/extensions/gis/projections/proj/qsc.hpp b/include/boost/geometry/extensions/gis/projections/proj/qsc.hpp index 529e8e4b9..2e1f0f0af 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/qsc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/qsc.hpp @@ -70,8 +70,6 @@ namespace boost { namespace geometry { namespace projections double one_minus_f; double one_minus_f_squared; }; - - /* The six cube faces. */ /* The four areas on a cube face. AREA_0 is the area of definition, diff --git a/include/boost/geometry/extensions/gis/projections/proj/robin.hpp b/include/boost/geometry/extensions/gis/projections/proj/robin.hpp index fae3416a0..3d8c2933b 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/robin.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/robin.hpp @@ -58,8 +58,6 @@ namespace boost { namespace geometry { namespace projections static const double ONEEPS = 1.000001; static const double EPS = 1e-8; - - struct COEFS { double c0, c1, c2, c3; }; diff --git a/include/boost/geometry/extensions/gis/projections/proj/sterea.hpp b/include/boost/geometry/extensions/gis/projections/proj/sterea.hpp index 96e89dded..00284c045 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/sterea.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/sterea.hpp @@ -63,9 +63,6 @@ namespace boost { namespace geometry { namespace projections gauss::GAUSS en; }; - - - // template class, using CRTP to implement forward/inverse template struct base_sterea_ellipsoid : public base_t_fi, From 9f9d59a515bee898fb9162179e52abfb70aef984 Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Sun, 26 Apr 2015 10:56:15 +0200 Subject: [PATCH 56/89] [projections] add const (was accidentally removed in one function two commits away) --- .../geometry/extensions/gis/projections/proj/imw_p.hpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/include/boost/geometry/extensions/gis/projections/proj/imw_p.hpp b/include/boost/geometry/extensions/gis/projections/proj/imw_p.hpp index 8f6d9d310..995a7193c 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/imw_p.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/imw_p.hpp @@ -81,7 +81,7 @@ namespace boost { namespace geometry { namespace projections } template inline XY - loc_for(double const& lp_lam, double const& lp_phi, Parameters& par, par_imw_p& proj_parm, double *yc) { + loc_for(double const& lp_lam, double const& lp_phi, Parameters const& par, par_imw_p const& proj_parm, double *yc) { XY xy; if (! lp_phi) { @@ -127,10 +127,9 @@ namespace boost { namespace geometry { namespace projections } return (xy); } - template - inline void - xy(Parameters& par, par_imw_p& proj_parm, double phi, double *x, double *y, double *sp, double *R) { + inline void + xy(Parameters const& par, par_imw_p const& proj_parm, double phi, double *x, double *y, double *sp, double *R) { double F; *sp = sin(phi); @@ -140,7 +139,6 @@ namespace boost { namespace geometry { namespace projections *x = *R * sin(F); } - // template class, using CRTP to implement forward/inverse template struct base_imw_p_ellipsoid : public base_t_fi, From 5607fa25b3e93509aef235eedb41976118a068b8 Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Sun, 26 Apr 2015 12:36:59 +0200 Subject: [PATCH 57/89] [projections] changes in generation (enfn) result is closer to original --- .../geometry/extensions/gis/projections/impl/pj_mlfn.hpp | 3 ++- .../boost/geometry/extensions/gis/projections/proj/aea.hpp | 2 +- .../boost/geometry/extensions/gis/projections/proj/aeqd.hpp | 4 ++-- .../boost/geometry/extensions/gis/projections/proj/cass.hpp | 2 +- .../boost/geometry/extensions/gis/projections/proj/eqdc.hpp | 4 ++-- .../geometry/extensions/gis/projections/proj/gn_sinu.hpp | 4 ++-- .../boost/geometry/extensions/gis/projections/proj/imw_p.hpp | 2 +- .../boost/geometry/extensions/gis/projections/proj/lcca.hpp | 2 +- .../boost/geometry/extensions/gis/projections/proj/poly.hpp | 2 +- .../boost/geometry/extensions/gis/projections/proj/tmerc.hpp | 4 ++-- 10 files changed, 15 insertions(+), 14 deletions(-) diff --git a/include/boost/geometry/extensions/gis/projections/impl/pj_mlfn.hpp b/include/boost/geometry/extensions/gis/projections/impl/pj_mlfn.hpp index b5db34988..c4bbf266e 100644 --- a/include/boost/geometry/extensions/gis/projections/impl/pj_mlfn.hpp +++ b/include/boost/geometry/extensions/gis/projections/impl/pj_mlfn.hpp @@ -65,7 +65,7 @@ static const double EPS = 1e-11; static const int MAX_ITER = 10; static const int EN_SIZE = 5; -inline void pj_enfn(double es, double* en) +inline bool pj_enfn(double es, double* en) { double t; //, *en; @@ -78,6 +78,7 @@ inline void pj_enfn(double es, double* en) en[4] = t * es * C88; } // return en; + return true; } inline double pj_mlfn(double phi, double sphi, double cphi, const double *en) diff --git a/include/boost/geometry/extensions/gis/projections/proj/aea.hpp b/include/boost/geometry/extensions/gis/projections/proj/aea.hpp index 27be1a781..085ab350a 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/aea.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/aea.hpp @@ -163,7 +163,7 @@ namespace boost { namespace geometry { namespace projections secant = fabs(proj_parm.phi1 - proj_parm.phi2) >= EPS10; if( (proj_parm.ellips = (par.es > 0.))) { double ml1, m1; - pj_enfn(par.es, proj_parm.en); + if (!pj_enfn(par.es, proj_parm.en)) throw proj_exception(0); m1 = pj_msfn(sinphi, cosphi, par.es); ml1 = pj_qsfn(sinphi, par.e, par.one_es); if (secant) { /* secant cone */ diff --git a/include/boost/geometry/extensions/gis/projections/proj/aeqd.hpp b/include/boost/geometry/extensions/gis/projections/proj/aeqd.hpp index b9bdf23ea..66faf7076 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/aeqd.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/aeqd.hpp @@ -45,8 +45,8 @@ #include #include #include -#include #include +#include namespace boost { namespace geometry { namespace projections { @@ -317,7 +317,7 @@ namespace boost { namespace geometry { namespace projections // par.inv = s_inverse; // par.fwd = s_forward; } else { - pj_enfn(par.es, proj_parm.en); + if (!pj_enfn(par.es, proj_parm.en)) throw proj_exception(0); if (pj_param(par.params, "bguam").i) { proj_parm.M1 = pj_mlfn(par.phi0, proj_parm.sinph0, proj_parm.cosph0, proj_parm.en); // par.inv = e_guam_inv; diff --git a/include/boost/geometry/extensions/gis/projections/proj/cass.hpp b/include/boost/geometry/extensions/gis/projections/proj/cass.hpp index 037476abf..d6432a284 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/cass.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/cass.hpp @@ -155,7 +155,7 @@ namespace boost { namespace geometry { namespace projections void setup_cass(Parameters& par, par_cass& proj_parm) { if (par.es) { - pj_enfn(par.es, proj_parm.en); + if (!pj_enfn(par.es, proj_parm.en)) throw proj_exception(0); proj_parm.m0 = pj_mlfn(par.phi0, sin(par.phi0), cos(par.phi0), proj_parm.en); // par.inv = e_inverse; // par.fwd = e_forward; diff --git a/include/boost/geometry/extensions/gis/projections/proj/eqdc.hpp b/include/boost/geometry/extensions/gis/projections/proj/eqdc.hpp index 70dec1580..dad1024d8 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/eqdc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/eqdc.hpp @@ -130,8 +130,8 @@ namespace boost { namespace geometry { namespace projections proj_parm.phi1 = pj_param(par.params, "rlat_1").f; proj_parm.phi2 = pj_param(par.params, "rlat_2").f; if (fabs(proj_parm.phi1 + proj_parm.phi2) < EPS10) throw proj_exception(-21); - pj_enfn(par.es, proj_parm.en); - + if (!pj_enfn(par.es, proj_parm.en)) + throw proj_exception(0); proj_parm.n = sinphi = sin(proj_parm.phi1); cosphi = cos(proj_parm.phi1); secant = fabs(proj_parm.phi1 - proj_parm.phi2) >= EPS10; diff --git a/include/boost/geometry/extensions/gis/projections/proj/gn_sinu.hpp b/include/boost/geometry/extensions/gis/projections/proj/gn_sinu.hpp index f1a827c58..5f9fb2be2 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/gn_sinu.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/gn_sinu.hpp @@ -173,8 +173,8 @@ namespace boost { namespace geometry { namespace projections template void setup_sinu(Parameters& par, par_gn_sinu& proj_parm) { - pj_enfn(par.es, proj_parm.en); - + if (!pj_enfn(par.es, proj_parm.en)) + throw proj_exception(0); if (par.es) { // par.inv = e_inverse; // par.fwd = e_forward; diff --git a/include/boost/geometry/extensions/gis/projections/proj/imw_p.hpp b/include/boost/geometry/extensions/gis/projections/proj/imw_p.hpp index 995a7193c..059f3a692 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/imw_p.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/imw_p.hpp @@ -182,7 +182,7 @@ namespace boost { namespace geometry { namespace projections { double del, sig, s, t, x1, x2, T2, y1, m1, m2, y2; int i; - pj_enfn(par.es, proj_parm.en); + if (!pj_enfn(par.es, proj_parm.en)) throw proj_exception(0); if( (i = phi12(par, proj_parm, &del, &sig)) != 0) throw proj_exception(i); if (proj_parm.phi_2 < proj_parm.phi_1) { /* make sure proj_parm.phi_1 most southerly */ diff --git a/include/boost/geometry/extensions/gis/projections/proj/lcca.hpp b/include/boost/geometry/extensions/gis/projections/proj/lcca.hpp index c5a7b61ab..62c119514 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/lcca.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/lcca.hpp @@ -120,7 +120,7 @@ namespace boost { namespace geometry { namespace projections { double s2p0, N0, R0, tan0, tan20; boost::ignore_unused(tan20); - pj_enfn(par.es, proj_parm.en); + if (!pj_enfn(par.es, proj_parm.en)) throw proj_exception(0); if (!pj_param(par.params, "tlat_0").i) throw proj_exception(50); if (par.phi0 == 0.) throw proj_exception(51); proj_parm.l = sin(par.phi0); diff --git a/include/boost/geometry/extensions/gis/projections/proj/poly.hpp b/include/boost/geometry/extensions/gis/projections/proj/poly.hpp index f9b560ec5..8c21a5962 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/poly.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/poly.hpp @@ -178,7 +178,7 @@ namespace boost { namespace geometry { namespace projections void setup_poly(Parameters& par, par_poly& proj_parm) { if (par.es) { - pj_enfn(par.es, proj_parm.en); + if (!pj_enfn(par.es, proj_parm.en)) throw proj_exception(0); proj_parm.ml0 = pj_mlfn(par.phi0, sin(par.phi0), cos(par.phi0), proj_parm.en); // par.inv = e_inverse; // par.fwd = e_forward; diff --git a/include/boost/geometry/extensions/gis/projections/proj/tmerc.hpp b/include/boost/geometry/extensions/gis/projections/proj/tmerc.hpp index e45cb1d7b..f0420a1c6 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/tmerc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/tmerc.hpp @@ -222,8 +222,8 @@ namespace boost { namespace geometry { namespace projections boost::ignore_unused(par); boost::ignore_unused(proj_parm); if (par.es) { - pj_enfn(par.es, proj_parm.en); - + if (!pj_enfn(par.es, proj_parm.en)) + throw proj_exception(0); proj_parm.ml0 = pj_mlfn(par.phi0, sin(par.phi0), cos(par.phi0), proj_parm.en); proj_parm.esp = par.es / (1. - par.es); // par.inv = e_inverse; From 866aae97e0d792ddd300711150f06cab6342cbfd Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Sun, 26 Apr 2015 14:27:19 +0200 Subject: [PATCH 58/89] [projections] changes in authset, conform enfn --- .../boost/geometry/extensions/gis/projections/impl/pj_auth.hpp | 3 ++- include/boost/geometry/extensions/gis/projections/proj/cea.hpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/boost/geometry/extensions/gis/projections/impl/pj_auth.hpp b/include/boost/geometry/extensions/gis/projections/impl/pj_auth.hpp index f198cc51a..adcd3a16b 100644 --- a/include/boost/geometry/extensions/gis/projections/impl/pj_auth.hpp +++ b/include/boost/geometry/extensions/gis/projections/impl/pj_auth.hpp @@ -53,7 +53,7 @@ static const double P20 = .01641501294219154443; static const int APA_SIZE = 3; /* determine latitude from authalic latitude */ -inline void pj_authset(double es, double* APA) +inline bool pj_authset(double es, double* APA) { BOOST_ASSERT(0 != APA); @@ -70,6 +70,7 @@ inline void pj_authset(double es, double* APA) APA[1] += t * P11; APA[2] = t * P20; } + return true; } inline double pj_authlat(double beta, const double* APA) diff --git a/include/boost/geometry/extensions/gis/projections/proj/cea.hpp b/include/boost/geometry/extensions/gis/projections/proj/cea.hpp index 741ad4426..4a4ed0d25 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/cea.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/cea.hpp @@ -134,7 +134,7 @@ namespace boost { namespace geometry { namespace projections t = sin(t); par.k0 /= sqrt(1. - par.es * t * t); par.e = sqrt(par.es); - pj_authset(par.es, proj_parm.apa); + if (!pj_authset(par.es, proj_parm.apa)) throw proj_exception(0); proj_parm.qp = pj_qsfn(1., par.e, par.one_es); // par.inv = e_inverse; // par.fwd = e_forward; From 9f992895512c480820bac8ea2e60dc818098e9de Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Sun, 26 Apr 2015 14:30:15 +0200 Subject: [PATCH 59/89] [projections] changes in mdist conform enfn/authset --- .../geometry/extensions/gis/projections/impl/proj_mdist.hpp | 3 ++- .../boost/geometry/extensions/gis/projections/proj/aeqd.hpp | 1 - .../boost/geometry/extensions/gis/projections/proj/rouss.hpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/boost/geometry/extensions/gis/projections/impl/proj_mdist.hpp b/include/boost/geometry/extensions/gis/projections/impl/proj_mdist.hpp index 562e513ce..9069b47b4 100644 --- a/include/boost/geometry/extensions/gis/projections/impl/proj_mdist.hpp +++ b/include/boost/geometry/extensions/gis/projections/impl/proj_mdist.hpp @@ -53,7 +53,7 @@ namespace detail double b[MDIST_MAX_ITER]; }; - inline void proj_mdist_ini(double es, MDIST& b) + inline bool proj_mdist_ini(double es, MDIST& b) { double numf, numfi, twon1, denf, denfi, ens, T, twon; double den, El, Es; @@ -97,6 +97,7 @@ namespace detail numfi += 2.; denfi += 2.; } + return true; } inline double proj_mdist(double phi, double sphi, double cphi, const MDIST& b) { diff --git a/include/boost/geometry/extensions/gis/projections/proj/aeqd.hpp b/include/boost/geometry/extensions/gis/projections/proj/aeqd.hpp index 66faf7076..8220f14bd 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/aeqd.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/aeqd.hpp @@ -45,7 +45,6 @@ #include #include #include -#include #include namespace boost { namespace geometry { namespace projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/rouss.hpp b/include/boost/geometry/extensions/gis/projections/proj/rouss.hpp index 1429c76e9..4382ae462 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/rouss.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/rouss.hpp @@ -115,8 +115,8 @@ namespace boost { namespace geometry { namespace projections void setup_rouss(Parameters& par, par_rouss& proj_parm) { double N0, es2, t, t2, R_R0_2, R_R0_4; - proj_mdist_ini(par.es, proj_parm.en); - + if (!proj_mdist_ini(par.es, proj_parm.en)) + throw proj_exception(0); es2 = sin(par.phi0); proj_parm.s0 = proj_mdist(par.phi0, es2, cos(par.phi0), proj_parm.en); t = 1. - (es2 = par.es * es2 * es2); From 121f8b39c1ba88888150eedc8271eeb3cb9ae567 Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Sun, 26 Apr 2015 14:47:22 +0200 Subject: [PATCH 60/89] [projections] changes in includes, especially hypot, only necessary in a few cases, and changes in order --- .../boost/geometry/extensions/gis/projections/proj/aea.hpp | 2 +- .../boost/geometry/extensions/gis/projections/proj/airy.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/aitoff.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/august.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/bacon.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/boggs.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/cass.hpp | 2 -- include/boost/geometry/extensions/gis/projections/proj/cc.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/cea.hpp | 4 +--- .../boost/geometry/extensions/gis/projections/proj/chamb.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/collg.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/crast.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/denoy.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/eck1.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/eck2.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/eck3.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/eck4.hpp | 3 +-- .../boost/geometry/extensions/gis/projections/proj/eck5.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/eqc.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/eqdc.hpp | 2 +- .../boost/geometry/extensions/gis/projections/proj/fahey.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/fouc_s.hpp | 3 +-- .../boost/geometry/extensions/gis/projections/proj/gall.hpp | 2 -- .../geometry/extensions/gis/projections/proj/geocent.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/gins8.hpp | 2 -- .../geometry/extensions/gis/projections/proj/gn_sinu.hpp | 3 +-- .../boost/geometry/extensions/gis/projections/proj/goode.hpp | 4 +--- .../geometry/extensions/gis/projections/proj/gstmerc.hpp | 4 +--- .../boost/geometry/extensions/gis/projections/proj/hammer.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/hatano.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/imw_p.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/krovak.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/labrd.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/laea.hpp | 2 +- .../boost/geometry/extensions/gis/projections/proj/lagrng.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/larr.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/lask.hpp | 2 -- .../geometry/extensions/gis/projections/proj/latlong.hpp | 4 ---- .../boost/geometry/extensions/gis/projections/proj/lcc.hpp | 2 +- .../boost/geometry/extensions/gis/projections/proj/lcca.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/loxim.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/lsat.hpp | 3 +-- .../geometry/extensions/gis/projections/proj/mbt_fps.hpp | 3 +-- .../boost/geometry/extensions/gis/projections/proj/mbtfpp.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/mbtfpq.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/merc.hpp | 4 +--- .../boost/geometry/extensions/gis/projections/proj/mill.hpp | 2 -- .../geometry/extensions/gis/projections/proj/mod_ster.hpp | 1 + .../boost/geometry/extensions/gis/projections/proj/moll.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/nell.hpp | 3 +-- .../boost/geometry/extensions/gis/projections/proj/nell_h.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/nocol.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/nzmg.hpp | 3 +-- .../geometry/extensions/gis/projections/proj/ob_tran.hpp | 2 +- .../boost/geometry/extensions/gis/projections/proj/ocea.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/oea.hpp | 1 + .../boost/geometry/extensions/gis/projections/proj/omerc.hpp | 4 +--- .../boost/geometry/extensions/gis/projections/proj/poly.hpp | 4 +--- .../boost/geometry/extensions/gis/projections/proj/putp2.hpp | 3 +-- .../boost/geometry/extensions/gis/projections/proj/putp3.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/putp4p.hpp | 3 +-- .../boost/geometry/extensions/gis/projections/proj/putp5.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/putp6.hpp | 3 +-- .../boost/geometry/extensions/gis/projections/proj/qsc.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/robin.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/rouss.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/rpoly.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/somerc.hpp | 3 +-- .../boost/geometry/extensions/gis/projections/proj/sts.hpp | 3 +-- .../boost/geometry/extensions/gis/projections/proj/tcc.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/tcea.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/tmerc.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/tpeqd.hpp | 1 + .../boost/geometry/extensions/gis/projections/proj/urm5.hpp | 3 +-- .../boost/geometry/extensions/gis/projections/proj/urmfps.hpp | 3 +-- .../boost/geometry/extensions/gis/projections/proj/vandg.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/vandg2.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/vandg4.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/wag2.hpp | 3 +-- .../boost/geometry/extensions/gis/projections/proj/wag3.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/wag7.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/wink1.hpp | 2 -- .../boost/geometry/extensions/gis/projections/proj/wink2.hpp | 2 -- 83 files changed, 29 insertions(+), 163 deletions(-) diff --git a/include/boost/geometry/extensions/gis/projections/proj/aea.hpp b/include/boost/geometry/extensions/gis/projections/proj/aea.hpp index 085ab350a..066c28128 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/aea.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/aea.hpp @@ -45,9 +45,9 @@ #include #include #include +#include #include #include -#include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/airy.hpp b/include/boost/geometry/extensions/gis/projections/proj/airy.hpp index 61f03f90a..8efc490bc 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/airy.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/airy.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/aitoff.hpp b/include/boost/geometry/extensions/gis/projections/proj/aitoff.hpp index 267c770b1..89826ad3e 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/aitoff.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/aitoff.hpp @@ -39,8 +39,6 @@ #include -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/august.hpp b/include/boost/geometry/extensions/gis/projections/proj/august.hpp index 6a88a2e3f..c4e6815b7 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/august.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/august.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/bacon.hpp b/include/boost/geometry/extensions/gis/projections/proj/bacon.hpp index 402a22796..95b86ec60 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/bacon.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/bacon.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/boggs.hpp b/include/boost/geometry/extensions/gis/projections/proj/boggs.hpp index 8ba33ab21..e00ed04e3 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/boggs.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/boggs.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/cass.hpp b/include/boost/geometry/extensions/gis/projections/proj/cass.hpp index d6432a284..7a4e7275b 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/cass.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/cass.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/cc.hpp b/include/boost/geometry/extensions/gis/projections/proj/cc.hpp index 0b491abe2..12d59f36e 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/cc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/cc.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/cea.hpp b/include/boost/geometry/extensions/gis/projections/proj/cea.hpp index 4a4ed0d25..eb36cb103 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/cea.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/cea.hpp @@ -38,14 +38,12 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include #include -#include #include +#include namespace boost { namespace geometry { namespace projections { diff --git a/include/boost/geometry/extensions/gis/projections/proj/chamb.hpp b/include/boost/geometry/extensions/gis/projections/proj/chamb.hpp index 5f7949637..bc41c512b 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/chamb.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/chamb.hpp @@ -40,8 +40,6 @@ #include -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/collg.hpp b/include/boost/geometry/extensions/gis/projections/proj/collg.hpp index 0358e0648..63895e781 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/collg.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/collg.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/crast.hpp b/include/boost/geometry/extensions/gis/projections/proj/crast.hpp index ba1a581f8..213f14091 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/crast.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/crast.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/denoy.hpp b/include/boost/geometry/extensions/gis/projections/proj/denoy.hpp index 11c1d97a3..91a3f0b38 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/denoy.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/denoy.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/eck1.hpp b/include/boost/geometry/extensions/gis/projections/proj/eck1.hpp index 1acb1e6d5..516562b1a 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/eck1.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/eck1.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/eck2.hpp b/include/boost/geometry/extensions/gis/projections/proj/eck2.hpp index 22f56a403..5f17ebdb0 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/eck2.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/eck2.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/eck3.hpp b/include/boost/geometry/extensions/gis/projections/proj/eck3.hpp index e9d9caf0e..dbff39220 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/eck3.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/eck3.hpp @@ -39,8 +39,6 @@ #include -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/eck4.hpp b/include/boost/geometry/extensions/gis/projections/proj/eck4.hpp index f118e3347..371dca9ed 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/eck4.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/eck4.hpp @@ -38,12 +38,11 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include #include +#include namespace boost { namespace geometry { namespace projections { diff --git a/include/boost/geometry/extensions/gis/projections/proj/eck5.hpp b/include/boost/geometry/extensions/gis/projections/proj/eck5.hpp index e9b12f7bc..dccb96fa4 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/eck5.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/eck5.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/eqc.hpp b/include/boost/geometry/extensions/gis/projections/proj/eqc.hpp index f7c831468..fb30d0c26 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/eqc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/eqc.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/eqdc.hpp b/include/boost/geometry/extensions/gis/projections/proj/eqdc.hpp index dad1024d8..ef6b00094 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/eqdc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/eqdc.hpp @@ -44,8 +44,8 @@ #include #include #include -#include #include +#include namespace boost { namespace geometry { namespace projections { diff --git a/include/boost/geometry/extensions/gis/projections/proj/fahey.hpp b/include/boost/geometry/extensions/gis/projections/proj/fahey.hpp index ac444c8ef..ca72efa7c 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/fahey.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/fahey.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/fouc_s.hpp b/include/boost/geometry/extensions/gis/projections/proj/fouc_s.hpp index da057e0f0..12953fb16 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/fouc_s.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/fouc_s.hpp @@ -38,12 +38,11 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include #include +#include namespace boost { namespace geometry { namespace projections { diff --git a/include/boost/geometry/extensions/gis/projections/proj/gall.hpp b/include/boost/geometry/extensions/gis/projections/proj/gall.hpp index 21ba02354..eb6dd605a 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/gall.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/gall.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/geocent.hpp b/include/boost/geometry/extensions/gis/projections/proj/geocent.hpp index 65b9cc09f..e0adacd33 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/geocent.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/geocent.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/gins8.hpp b/include/boost/geometry/extensions/gis/projections/proj/gins8.hpp index 4fe4d33f2..14cce3172 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/gins8.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/gins8.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/gn_sinu.hpp b/include/boost/geometry/extensions/gis/projections/proj/gn_sinu.hpp index 5f9fb2be2..52988993c 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/gn_sinu.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/gn_sinu.hpp @@ -39,12 +39,11 @@ #include -#include - #include #include #include #include +#include #include namespace boost { namespace geometry { namespace projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/goode.hpp b/include/boost/geometry/extensions/gis/projections/proj/goode.hpp index 2873f93fd..0f87f8962 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/goode.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/goode.hpp @@ -38,14 +38,12 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include #include -#include #include +#include namespace boost { namespace geometry { namespace projections { diff --git a/include/boost/geometry/extensions/gis/projections/proj/gstmerc.hpp b/include/boost/geometry/extensions/gis/projections/proj/gstmerc.hpp index 2caf55a9c..8ee79f340 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/gstmerc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/gstmerc.hpp @@ -38,14 +38,12 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include #include -#include #include +#include namespace boost { namespace geometry { namespace projections { diff --git a/include/boost/geometry/extensions/gis/projections/proj/hammer.hpp b/include/boost/geometry/extensions/gis/projections/proj/hammer.hpp index 42755171e..2895b25b1 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/hammer.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/hammer.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/hatano.hpp b/include/boost/geometry/extensions/gis/projections/proj/hatano.hpp index bf8c06a8d..79a113e18 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/hatano.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/hatano.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/imw_p.hpp b/include/boost/geometry/extensions/gis/projections/proj/imw_p.hpp index 059f3a692..14e0048b5 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/imw_p.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/imw_p.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/krovak.hpp b/include/boost/geometry/extensions/gis/projections/proj/krovak.hpp index 89b32d26f..2db34983e 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/krovak.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/krovak.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/labrd.hpp b/include/boost/geometry/extensions/gis/projections/proj/labrd.hpp index 3a46dd486..19681be81 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/labrd.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/labrd.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/laea.hpp b/include/boost/geometry/extensions/gis/projections/proj/laea.hpp index e07b4af4d..fcf6740b0 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/laea.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/laea.hpp @@ -44,8 +44,8 @@ #include #include #include -#include #include +#include namespace boost { namespace geometry { namespace projections { diff --git a/include/boost/geometry/extensions/gis/projections/proj/lagrng.hpp b/include/boost/geometry/extensions/gis/projections/proj/lagrng.hpp index 71c2a4016..ee84a8a6c 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/lagrng.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/lagrng.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/larr.hpp b/include/boost/geometry/extensions/gis/projections/proj/larr.hpp index 45cff26f8..42d3384ca 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/larr.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/larr.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/lask.hpp b/include/boost/geometry/extensions/gis/projections/proj/lask.hpp index 2111b5791..77aa5c064 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/lask.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/lask.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/latlong.hpp b/include/boost/geometry/extensions/gis/projections/proj/latlong.hpp index 1a552c01f..d689463a2 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/latlong.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/latlong.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include @@ -70,14 +68,12 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { - xy_x = lp_lon / this->m_par.a; xy_y = lp_lat / this->m_par.a; } inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const { - lp_lat = xy_y * this->m_par.a; lp_lon = xy_x * this->m_par.a; } diff --git a/include/boost/geometry/extensions/gis/projections/proj/lcc.hpp b/include/boost/geometry/extensions/gis/projections/proj/lcc.hpp index 088a0cbe5..bd67bbc90 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/lcc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/lcc.hpp @@ -45,8 +45,8 @@ #include #include #include -#include #include +#include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/lcca.hpp b/include/boost/geometry/extensions/gis/projections/proj/lcca.hpp index 62c119514..346da454f 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/lcca.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/lcca.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/loxim.hpp b/include/boost/geometry/extensions/gis/projections/proj/loxim.hpp index 7eba713b0..10f4dd17f 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/loxim.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/loxim.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/lsat.hpp b/include/boost/geometry/extensions/gis/projections/proj/lsat.hpp index 2061750ca..39cef0733 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/lsat.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/lsat.hpp @@ -38,12 +38,11 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include #include +#include namespace boost { namespace geometry { namespace projections { diff --git a/include/boost/geometry/extensions/gis/projections/proj/mbt_fps.hpp b/include/boost/geometry/extensions/gis/projections/proj/mbt_fps.hpp index 0abb4ee4f..764429aa6 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/mbt_fps.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/mbt_fps.hpp @@ -38,12 +38,11 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include #include +#include namespace boost { namespace geometry { namespace projections { diff --git a/include/boost/geometry/extensions/gis/projections/proj/mbtfpp.hpp b/include/boost/geometry/extensions/gis/projections/proj/mbtfpp.hpp index b552f82aa..5dd9631ca 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/mbtfpp.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/mbtfpp.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/mbtfpq.hpp b/include/boost/geometry/extensions/gis/projections/proj/mbtfpq.hpp index 66544aa5b..084974276 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/mbtfpq.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/mbtfpq.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/merc.hpp b/include/boost/geometry/extensions/gis/projections/proj/merc.hpp index 8b6c29daf..a2a48c967 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/merc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/merc.hpp @@ -38,15 +38,13 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include #include #include -#include #include +#include namespace boost { namespace geometry { namespace projections { diff --git a/include/boost/geometry/extensions/gis/projections/proj/mill.hpp b/include/boost/geometry/extensions/gis/projections/proj/mill.hpp index be21405ca..e9128a75a 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/mill.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/mill.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/mod_ster.hpp b/include/boost/geometry/extensions/gis/projections/proj/mod_ster.hpp index 98d6c1a37..80d923cb9 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/mod_ster.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/mod_ster.hpp @@ -45,6 +45,7 @@ #include #include #include +#include #include namespace boost { namespace geometry { namespace projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/moll.hpp b/include/boost/geometry/extensions/gis/projections/proj/moll.hpp index 0afb9bd4e..1e7ef64a4 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/moll.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/moll.hpp @@ -39,8 +39,6 @@ #include -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/nell.hpp b/include/boost/geometry/extensions/gis/projections/proj/nell.hpp index 125f66313..59ce067ba 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/nell.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/nell.hpp @@ -38,12 +38,11 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include #include +#include namespace boost { namespace geometry { namespace projections { diff --git a/include/boost/geometry/extensions/gis/projections/proj/nell_h.hpp b/include/boost/geometry/extensions/gis/projections/proj/nell_h.hpp index a9d0ec33d..85df442da 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/nell_h.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/nell_h.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/nocol.hpp b/include/boost/geometry/extensions/gis/projections/proj/nocol.hpp index 4276b02fc..dd52aa8cc 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/nocol.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/nocol.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/nzmg.hpp b/include/boost/geometry/extensions/gis/projections/proj/nzmg.hpp index a0a83886b..7c26398ff 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/nzmg.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/nzmg.hpp @@ -38,12 +38,11 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include #include +#include namespace boost { namespace geometry { namespace projections { diff --git a/include/boost/geometry/extensions/gis/projections/proj/ob_tran.hpp b/include/boost/geometry/extensions/gis/projections/proj/ob_tran.hpp index f38ae8a0e..05210bc19 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/ob_tran.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/ob_tran.hpp @@ -39,12 +39,12 @@ #include -#include #include #include #include #include +#include namespace boost { namespace geometry { namespace projections { diff --git a/include/boost/geometry/extensions/gis/projections/proj/ocea.hpp b/include/boost/geometry/extensions/gis/projections/proj/ocea.hpp index 41e206ccc..ad0f8c6d1 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/ocea.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/ocea.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/oea.hpp b/include/boost/geometry/extensions/gis/projections/proj/oea.hpp index f1a043317..6ecd2488b 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/oea.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/oea.hpp @@ -44,6 +44,7 @@ #include #include #include +#include namespace boost { namespace geometry { namespace projections { diff --git a/include/boost/geometry/extensions/gis/projections/proj/omerc.hpp b/include/boost/geometry/extensions/gis/projections/proj/omerc.hpp index bf9fd2e6f..96c71eb91 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/omerc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/omerc.hpp @@ -38,14 +38,12 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include #include -#include #include +#include namespace boost { namespace geometry { namespace projections { diff --git a/include/boost/geometry/extensions/gis/projections/proj/poly.hpp b/include/boost/geometry/extensions/gis/projections/proj/poly.hpp index 8c21a5962..4090a2259 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/poly.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/poly.hpp @@ -38,14 +38,12 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include #include -#include #include +#include namespace boost { namespace geometry { namespace projections { diff --git a/include/boost/geometry/extensions/gis/projections/proj/putp2.hpp b/include/boost/geometry/extensions/gis/projections/proj/putp2.hpp index 1e05e1099..fcf2a7271 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/putp2.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/putp2.hpp @@ -38,12 +38,11 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include #include +#include namespace boost { namespace geometry { namespace projections { diff --git a/include/boost/geometry/extensions/gis/projections/proj/putp3.hpp b/include/boost/geometry/extensions/gis/projections/proj/putp3.hpp index 5722dd08e..d34741466 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/putp3.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/putp3.hpp @@ -39,8 +39,6 @@ #include -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/putp4p.hpp b/include/boost/geometry/extensions/gis/projections/proj/putp4p.hpp index 42204f98c..9ca25d629 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/putp4p.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/putp4p.hpp @@ -39,12 +39,11 @@ #include -#include - #include #include #include #include +#include namespace boost { namespace geometry { namespace projections { diff --git a/include/boost/geometry/extensions/gis/projections/proj/putp5.hpp b/include/boost/geometry/extensions/gis/projections/proj/putp5.hpp index ce3ef9db8..0ae6d21a8 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/putp5.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/putp5.hpp @@ -39,8 +39,6 @@ #include -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/putp6.hpp b/include/boost/geometry/extensions/gis/projections/proj/putp6.hpp index 6f8def3a9..44da56a6c 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/putp6.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/putp6.hpp @@ -39,12 +39,11 @@ #include -#include - #include #include #include #include +#include namespace boost { namespace geometry { namespace projections { diff --git a/include/boost/geometry/extensions/gis/projections/proj/qsc.hpp b/include/boost/geometry/extensions/gis/projections/proj/qsc.hpp index 2e1f0f0af..b7dde8038 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/qsc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/qsc.hpp @@ -39,8 +39,6 @@ #include -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/robin.hpp b/include/boost/geometry/extensions/gis/projections/proj/robin.hpp index 3d8c2933b..701190e3d 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/robin.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/robin.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/rouss.hpp b/include/boost/geometry/extensions/gis/projections/proj/rouss.hpp index 4382ae462..cad652fa8 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/rouss.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/rouss.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/rpoly.hpp b/include/boost/geometry/extensions/gis/projections/proj/rpoly.hpp index 7783e5080..95cee093f 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/rpoly.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/rpoly.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/somerc.hpp b/include/boost/geometry/extensions/gis/projections/proj/somerc.hpp index e5377abeb..edd7ea059 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/somerc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/somerc.hpp @@ -38,12 +38,11 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include #include +#include namespace boost { namespace geometry { namespace projections { diff --git a/include/boost/geometry/extensions/gis/projections/proj/sts.hpp b/include/boost/geometry/extensions/gis/projections/proj/sts.hpp index 1d84cf64f..338fabb48 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/sts.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/sts.hpp @@ -39,12 +39,11 @@ #include -#include - #include #include #include #include +#include namespace boost { namespace geometry { namespace projections { diff --git a/include/boost/geometry/extensions/gis/projections/proj/tcc.hpp b/include/boost/geometry/extensions/gis/projections/proj/tcc.hpp index e7a375d27..3f53180b9 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/tcc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/tcc.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/tcea.hpp b/include/boost/geometry/extensions/gis/projections/proj/tcea.hpp index 57d90cf4f..7113614c0 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/tcea.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/tcea.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/tmerc.hpp b/include/boost/geometry/extensions/gis/projections/proj/tmerc.hpp index f0420a1c6..1fca2a5e1 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/tmerc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/tmerc.hpp @@ -39,8 +39,6 @@ #include -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/tpeqd.hpp b/include/boost/geometry/extensions/gis/projections/proj/tpeqd.hpp index bc11a1d13..3020fc5d4 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/tpeqd.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/tpeqd.hpp @@ -44,6 +44,7 @@ #include #include #include +#include namespace boost { namespace geometry { namespace projections { diff --git a/include/boost/geometry/extensions/gis/projections/proj/urm5.hpp b/include/boost/geometry/extensions/gis/projections/proj/urm5.hpp index ce6a125b3..5547835a6 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/urm5.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/urm5.hpp @@ -38,12 +38,11 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include #include +#include namespace boost { namespace geometry { namespace projections { diff --git a/include/boost/geometry/extensions/gis/projections/proj/urmfps.hpp b/include/boost/geometry/extensions/gis/projections/proj/urmfps.hpp index 3a9d14d46..427b49e45 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/urmfps.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/urmfps.hpp @@ -39,12 +39,11 @@ #include -#include - #include #include #include #include +#include namespace boost { namespace geometry { namespace projections { diff --git a/include/boost/geometry/extensions/gis/projections/proj/vandg.hpp b/include/boost/geometry/extensions/gis/projections/proj/vandg.hpp index 32e5e9d98..9adad8179 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/vandg.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/vandg.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/vandg2.hpp b/include/boost/geometry/extensions/gis/projections/proj/vandg2.hpp index 2bb33d513..f060f6664 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/vandg2.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/vandg2.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/vandg4.hpp b/include/boost/geometry/extensions/gis/projections/proj/vandg4.hpp index 798f3a0a7..f45815322 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/vandg4.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/vandg4.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/wag2.hpp b/include/boost/geometry/extensions/gis/projections/proj/wag2.hpp index 09a743f70..c03e1d2ca 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/wag2.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/wag2.hpp @@ -38,12 +38,11 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include #include +#include namespace boost { namespace geometry { namespace projections { diff --git a/include/boost/geometry/extensions/gis/projections/proj/wag3.hpp b/include/boost/geometry/extensions/gis/projections/proj/wag3.hpp index b34d39a94..af5a5f4cf 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/wag3.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/wag3.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/wag7.hpp b/include/boost/geometry/extensions/gis/projections/proj/wag7.hpp index 565c8f022..0f553e316 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/wag7.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/wag7.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/wink1.hpp b/include/boost/geometry/extensions/gis/projections/proj/wink1.hpp index 731c5e0ea..280467f3f 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/wink1.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/wink1.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/wink2.hpp b/include/boost/geometry/extensions/gis/projections/proj/wink2.hpp index cfad21270..97b3d51b1 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/wink2.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/wink2.hpp @@ -38,8 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include - #include #include #include From 0e06548aa60680dd2af1618a52e7f29c14bdc43b Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Sun, 26 Apr 2015 15:44:16 +0200 Subject: [PATCH 61/89] [projections] small changes in generation (chamb/lcca) --- .../geometry/extensions/gis/projections/proj/chamb.hpp | 7 ++++--- .../geometry/extensions/gis/projections/proj/lcca.hpp | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/boost/geometry/extensions/gis/projections/proj/chamb.hpp b/include/boost/geometry/extensions/gis/projections/proj/chamb.hpp index bc41c512b..737902717 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/chamb.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/chamb.hpp @@ -53,8 +53,9 @@ namespace boost { namespace geometry { namespace projections static const double THIRD = 0.333333333333333333; static const double TOL = 1e-9; + // specific for 'chamb' struct VECT { double r, Az; }; - struct CXY { double x, y; }; // x/y for chamb + struct XY { double x, y; }; struct par_chamb { @@ -62,10 +63,10 @@ namespace boost { namespace geometry { namespace projections double phi, lam; double cosphi, sinphi; VECT v; - CXY p; + XY p; double Az; } c[3]; - CXY p; + XY p; double beta_0, beta_1, beta_2; }; inline VECT /* distance and azimuth from point 1 to point 2 */ diff --git a/include/boost/geometry/extensions/gis/projections/proj/lcca.hpp b/include/boost/geometry/extensions/gis/projections/proj/lcca.hpp index 346da454f..878170f40 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/lcca.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/lcca.hpp @@ -117,7 +117,6 @@ namespace boost { namespace geometry { namespace projections void setup_lcca(Parameters& par, par_lcca& proj_parm) { double s2p0, N0, R0, tan0, tan20; - boost::ignore_unused(tan20); if (!pj_enfn(par.es, proj_parm.en)) throw proj_exception(0); if (!pj_param(par.params, "tlat_0").i) throw proj_exception(50); if (par.phi0 == 0.) throw proj_exception(51); @@ -133,6 +132,7 @@ namespace boost { namespace geometry { namespace projections proj_parm.C = 1. / (6. * R0 * N0); // par.inv = e_inverse; // par.fwd = e_forward; + boost::ignore_unused(tan20); } }} // namespace detail::lcca From eec5d4efd089e2caeb63bb3e0da77f43b44b8793 Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Sun, 26 Apr 2015 18:02:35 +0200 Subject: [PATCH 62/89] [projections] ob_tran, changes in generation --- .../extensions/gis/projections/proj/ob_tran.hpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/include/boost/geometry/extensions/gis/projections/proj/ob_tran.hpp b/include/boost/geometry/extensions/gis/projections/proj/ob_tran.hpp index 05210bc19..a00e69aef 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/ob_tran.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/ob_tran.hpp @@ -83,7 +83,6 @@ namespace boost { namespace geometry { namespace projections double coslam, sinphi, cosphi; - coslam = cos(lp_lon); sinphi = sin(lp_lat); cosphi = cos(lp_lat); @@ -129,7 +128,6 @@ namespace boost { namespace geometry { namespace projections double cosphi, coslam; - cosphi = cos(lp_lat); coslam = cos(lp_lon); lp_lon = adjlon(aatan2(cosphi * sin(lp_lon), sin(lp_lat)) + this->m_proj_parm.lamp); @@ -155,11 +153,10 @@ namespace boost { namespace geometry { namespace projections template double setup_ob_tran(Parameters& par, par_ob_tran& proj_parm, bool create = true) { - int i; double phip; - - Parameters pj; + /* get name of projection to be translated */ + pj.name = pj_param(par.params, "so_proj").s; /* copy existing header into new */ par.es = 0.; /* force to spherical */ @@ -177,11 +174,10 @@ namespace boost { namespace geometry { namespace projections /* force spherical earth */ pj.one_es = pj.rone_es = 1.; pj.es = pj.e = 0.; - pj.name = pj_param(par.params, "so_proj").s; - factory fac; if (create) { + factory fac; proj_parm.link.reset(fac.create_new(pj)); if (! proj_parm.link.get()) throw proj_exception(-26); } @@ -227,7 +223,6 @@ namespace boost { namespace geometry { namespace projections // par.fwd = t_forward; // par.inv = pj.inv ? t_inverse : 0; } - boost::ignore_unused(i); // return phip to choose model return phip; } From 01b20f50da7cf5c5857074dc9c8e7be3727c9e53 Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Sun, 26 Apr 2015 23:18:15 +0200 Subject: [PATCH 63/89] [projections] fixes in ignore_unused Now checked by scanning if really (un)used --- include/boost/geometry/extensions/gis/projections/proj/aea.hpp | 3 --- .../boost/geometry/extensions/gis/projections/proj/aitoff.hpp | 2 +- .../boost/geometry/extensions/gis/projections/proj/eck3.hpp | 2 +- .../boost/geometry/extensions/gis/projections/proj/gn_sinu.hpp | 3 --- .../boost/geometry/extensions/gis/projections/proj/lcca.hpp | 2 ++ .../geometry/extensions/gis/projections/proj/mod_ster.hpp | 3 --- .../boost/geometry/extensions/gis/projections/proj/moll.hpp | 3 --- .../boost/geometry/extensions/gis/projections/proj/nsper.hpp | 3 --- .../boost/geometry/extensions/gis/projections/proj/putp3.hpp | 2 +- .../boost/geometry/extensions/gis/projections/proj/putp4p.hpp | 2 +- .../boost/geometry/extensions/gis/projections/proj/putp5.hpp | 2 +- .../boost/geometry/extensions/gis/projections/proj/putp6.hpp | 2 +- include/boost/geometry/extensions/gis/projections/proj/qsc.hpp | 1 + .../boost/geometry/extensions/gis/projections/proj/sconics.hpp | 3 --- .../boost/geometry/extensions/gis/projections/proj/stere.hpp | 3 --- include/boost/geometry/extensions/gis/projections/proj/sts.hpp | 3 --- .../boost/geometry/extensions/gis/projections/proj/tmerc.hpp | 3 --- .../boost/geometry/extensions/gis/projections/proj/urmfps.hpp | 3 --- 18 files changed, 9 insertions(+), 36 deletions(-) diff --git a/include/boost/geometry/extensions/gis/projections/proj/aea.hpp b/include/boost/geometry/extensions/gis/projections/proj/aea.hpp index 066c28128..b33fbb17b 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/aea.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/aea.hpp @@ -38,7 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include #include #include @@ -153,8 +152,6 @@ namespace boost { namespace geometry { namespace projections template void setup(Parameters& par, par_aea& proj_parm) { - boost::ignore_unused(par); - boost::ignore_unused(proj_parm); double cosphi, sinphi; int secant; if (fabs(proj_parm.phi1 + proj_parm.phi2) < EPS10) throw proj_exception(-21); diff --git a/include/boost/geometry/extensions/gis/projections/proj/aitoff.hpp b/include/boost/geometry/extensions/gis/projections/proj/aitoff.hpp index 89826ad3e..4fedccf05 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/aitoff.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/aitoff.hpp @@ -39,6 +39,7 @@ #include + #include #include #include @@ -167,7 +168,6 @@ namespace boost { namespace geometry { namespace projections template void setup(Parameters& par, par_aitoff& proj_parm) { - boost::ignore_unused(par); boost::ignore_unused(proj_parm); // par.inv = s_inverse; // par.fwd = s_forward; diff --git a/include/boost/geometry/extensions/gis/projections/proj/eck3.hpp b/include/boost/geometry/extensions/gis/projections/proj/eck3.hpp index dbff39220..036bea324 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/eck3.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/eck3.hpp @@ -39,6 +39,7 @@ #include + #include #include #include @@ -85,7 +86,6 @@ namespace boost { namespace geometry { namespace projections template void setup(Parameters& par, par_eck3& proj_parm) { - boost::ignore_unused(par); boost::ignore_unused(proj_parm); par.es = 0.; // par.inv = s_inverse; diff --git a/include/boost/geometry/extensions/gis/projections/proj/gn_sinu.hpp b/include/boost/geometry/extensions/gis/projections/proj/gn_sinu.hpp index 52988993c..329a89776 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/gn_sinu.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/gn_sinu.hpp @@ -38,7 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include #include #include #include @@ -147,8 +146,6 @@ namespace boost { namespace geometry { namespace projections template void setup(Parameters& par, par_gn_sinu& proj_parm) { - boost::ignore_unused(par); - boost::ignore_unused(proj_parm); par.es = 0; proj_parm.C_x = (proj_parm.C_y = sqrt((proj_parm.m + 1.) / proj_parm.n))/(proj_parm.m + 1.); // par.inv = s_inverse; diff --git a/include/boost/geometry/extensions/gis/projections/proj/lcca.hpp b/include/boost/geometry/extensions/gis/projections/proj/lcca.hpp index 878170f40..cca6571eb 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/lcca.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/lcca.hpp @@ -38,6 +38,8 @@ // DEALINGS IN THE SOFTWARE. +#include + #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/mod_ster.hpp b/include/boost/geometry/extensions/gis/projections/proj/mod_ster.hpp index 80d923cb9..7d5828589 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/mod_ster.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/mod_ster.hpp @@ -38,7 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include #include #include @@ -150,8 +149,6 @@ namespace boost { namespace geometry { namespace projections template void setup(Parameters& par, par_mod_ster& proj_parm) /* general initialization */ { - boost::ignore_unused(par); - boost::ignore_unused(proj_parm); double esphi, chio; if (par.es) { esphi = par.e * sin(par.phi0); diff --git a/include/boost/geometry/extensions/gis/projections/proj/moll.hpp b/include/boost/geometry/extensions/gis/projections/proj/moll.hpp index 1e7ef64a4..a3e1dcb6d 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/moll.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/moll.hpp @@ -38,7 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include #include #include #include @@ -104,8 +103,6 @@ namespace boost { namespace geometry { namespace projections template void setup(Parameters& par, par_moll& proj_parm, double p) { - boost::ignore_unused(par); - boost::ignore_unused(proj_parm); double r, sp, p2 = p + p; par.es = 0; sp = sin(p); diff --git a/include/boost/geometry/extensions/gis/projections/proj/nsper.hpp b/include/boost/geometry/extensions/gis/projections/proj/nsper.hpp index 66dcf71bc..a099ecedd 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/nsper.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/nsper.hpp @@ -38,7 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include #include #include @@ -185,8 +184,6 @@ namespace boost { namespace geometry { namespace projections template void setup(Parameters& par, par_nsper& proj_parm) { - boost::ignore_unused(par); - boost::ignore_unused(proj_parm); if ((proj_parm.height = pj_param(par.params, "dh").f) <= 0.) throw proj_exception(-30); if (fabs(fabs(par.phi0) - HALFPI) < EPS10) proj_parm.mode = par.phi0 < 0. ? S_POLE : N_POLE; diff --git a/include/boost/geometry/extensions/gis/projections/proj/putp3.hpp b/include/boost/geometry/extensions/gis/projections/proj/putp3.hpp index d34741466..d1a6d3a54 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/putp3.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/putp3.hpp @@ -39,6 +39,7 @@ #include + #include #include #include @@ -87,7 +88,6 @@ namespace boost { namespace geometry { namespace projections template void setup(Parameters& par, par_putp3& proj_parm) { - boost::ignore_unused(par); boost::ignore_unused(proj_parm); par.es = 0.; // par.inv = s_inverse; diff --git a/include/boost/geometry/extensions/gis/projections/proj/putp4p.hpp b/include/boost/geometry/extensions/gis/projections/proj/putp4p.hpp index 9ca25d629..7611f9c89 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/putp4p.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/putp4p.hpp @@ -39,6 +39,7 @@ #include + #include #include #include @@ -91,7 +92,6 @@ namespace boost { namespace geometry { namespace projections template void setup(Parameters& par, par_putp4p& proj_parm) { - boost::ignore_unused(par); boost::ignore_unused(proj_parm); par.es = 0.; // par.inv = s_inverse; diff --git a/include/boost/geometry/extensions/gis/projections/proj/putp5.hpp b/include/boost/geometry/extensions/gis/projections/proj/putp5.hpp index 0ae6d21a8..35a6960b0 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/putp5.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/putp5.hpp @@ -39,6 +39,7 @@ #include + #include #include #include @@ -87,7 +88,6 @@ namespace boost { namespace geometry { namespace projections template void setup(Parameters& par, par_putp5& proj_parm) { - boost::ignore_unused(par); boost::ignore_unused(proj_parm); par.es = 0.; // par.inv = s_inverse; diff --git a/include/boost/geometry/extensions/gis/projections/proj/putp6.hpp b/include/boost/geometry/extensions/gis/projections/proj/putp6.hpp index 44da56a6c..b044a985e 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/putp6.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/putp6.hpp @@ -39,6 +39,7 @@ #include + #include #include #include @@ -107,7 +108,6 @@ namespace boost { namespace geometry { namespace projections template void setup(Parameters& par, par_putp6& proj_parm) { - boost::ignore_unused(par); boost::ignore_unused(proj_parm); par.es = 0.; // par.inv = s_inverse; diff --git a/include/boost/geometry/extensions/gis/projections/proj/qsc.hpp b/include/boost/geometry/extensions/gis/projections/proj/qsc.hpp index b7dde8038..6560317fb 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/qsc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/qsc.hpp @@ -39,6 +39,7 @@ #include + #include #include #include diff --git a/include/boost/geometry/extensions/gis/projections/proj/sconics.hpp b/include/boost/geometry/extensions/gis/projections/proj/sconics.hpp index 0206c4918..a8e9a42b9 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/sconics.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/sconics.hpp @@ -38,7 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include #include #include @@ -151,8 +150,6 @@ namespace boost { namespace geometry { namespace projections template void setup(Parameters& par, par_sconics& proj_parm) { - boost::ignore_unused(par); - boost::ignore_unused(proj_parm); double del, cs; int i; if( (i = phi12(par, proj_parm, &del)) ) diff --git a/include/boost/geometry/extensions/gis/projections/proj/stere.hpp b/include/boost/geometry/extensions/gis/projections/proj/stere.hpp index d976ec521..a6418574f 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/stere.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/stere.hpp @@ -38,7 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include #include #include @@ -256,8 +255,6 @@ namespace boost { namespace geometry { namespace projections template void setup(Parameters& par, par_stere& proj_parm) /* general initialization */ { - boost::ignore_unused(par); - boost::ignore_unused(proj_parm); double t; if (fabs((t = fabs(par.phi0)) - HALFPI) < EPS10) proj_parm.mode = par.phi0 < 0. ? S_POLE : N_POLE; diff --git a/include/boost/geometry/extensions/gis/projections/proj/sts.hpp b/include/boost/geometry/extensions/gis/projections/proj/sts.hpp index 338fabb48..e273e918e 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/sts.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/sts.hpp @@ -38,7 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include #include #include #include @@ -106,8 +105,6 @@ namespace boost { namespace geometry { namespace projections template void setup(Parameters& par, par_sts& proj_parm, double p, double q, int mode) { - boost::ignore_unused(par); - boost::ignore_unused(proj_parm); par.es = 0.; // par.inv = s_inverse; // par.fwd = s_forward; diff --git a/include/boost/geometry/extensions/gis/projections/proj/tmerc.hpp b/include/boost/geometry/extensions/gis/projections/proj/tmerc.hpp index 1fca2a5e1..384059f12 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/tmerc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/tmerc.hpp @@ -38,7 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include #include #include #include @@ -217,8 +216,6 @@ namespace boost { namespace geometry { namespace projections template void setup(Parameters& par, par_tmerc& proj_parm) /* general initialization */ { - boost::ignore_unused(par); - boost::ignore_unused(proj_parm); if (par.es) { if (!pj_enfn(par.es, proj_parm.en)) throw proj_exception(0); diff --git a/include/boost/geometry/extensions/gis/projections/proj/urmfps.hpp b/include/boost/geometry/extensions/gis/projections/proj/urmfps.hpp index 427b49e45..07416fe00 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/urmfps.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/urmfps.hpp @@ -38,7 +38,6 @@ // DEALINGS IN THE SOFTWARE. -#include #include #include #include @@ -90,8 +89,6 @@ namespace boost { namespace geometry { namespace projections template void setup(Parameters& par, par_urmfps& proj_parm) { - boost::ignore_unused(par); - boost::ignore_unused(proj_parm); proj_parm.C_y = Cy / proj_parm.n; par.es = 0.; // par.inv = s_inverse; From 5c13b26592349bb2cb89e64115d6f3ccbdb289e4 Mon Sep 17 00:00:00 2001 From: Menelaos Karavelas Date: Mon, 27 Apr 2015 12:41:51 +0300 Subject: [PATCH 64/89] [util][math] add free functions for recovering 2*pi and pi/2 --- include/boost/geometry/util/math.hpp | 29 +++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/include/boost/geometry/util/math.hpp b/include/boost/geometry/util/math.hpp index 721f1682a..8361ee76f 100644 --- a/include/boost/geometry/util/math.hpp +++ b/include/boost/geometry/util/math.hpp @@ -354,7 +354,8 @@ struct modulo /*! -\brief Short construct to enable partial specialization for PI, currently not possible in Math. +\brief Short constructs to enable partial specialization for PI, 2*PI + and PI/2, currently not possible in Math. */ template struct define_pi @@ -366,6 +367,26 @@ struct define_pi } }; +template +struct define_two_pi +{ + static inline T apply() + { + // Default calls Boost.Math + return boost::math::constants::two_pi(); + } +}; + +template +struct define_half_pi +{ + static inline T apply() + { + // Default calls Boost.Math + return boost::math::constants::half_pi(); + } +}; + template struct relaxed_epsilon { @@ -407,6 +428,12 @@ struct round template inline T pi() { return detail::define_pi::apply(); } +template +inline T two_pi() { return detail::define_two_pi::apply(); } + +template +inline T half_pi() { return detail::define_half_pi::apply(); } + template inline T relaxed_epsilon(T const& factor) { From 1c3fba8b5433fcaad52e52939ac8b57b78d1aa20 Mon Sep 17 00:00:00 2001 From: Menelaos Karavelas Date: Mon, 27 Apr 2015 12:43:05 +0300 Subject: [PATCH 65/89] [extensions][ttmath] add specializations for define_two_pi and define_half_pi --- .../extensions/contrib/ttmath_stub.hpp | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/include/boost/geometry/extensions/contrib/ttmath_stub.hpp b/include/boost/geometry/extensions/contrib/ttmath_stub.hpp index 014378e06..c8af1acf5 100644 --- a/include/boost/geometry/extensions/contrib/ttmath_stub.hpp +++ b/include/boost/geometry/extensions/contrib/ttmath_stub.hpp @@ -187,6 +187,18 @@ namespace detail // Partial specialization for ttmath template struct define_pi > + { + static inline ttmath::Big apply() + { + static ttmath::Big const half_pi( + "1.57079632679489661923132169163975144209858469968755291048747229615390820314310449931401741267105853399107404325664115332354692230477529111586267970406424055872514205135096926055277982231147447746519098"); + return half_pi; + } + }; + + // Partial specialization for ttmath + template + struct define_half_pi > { static inline ttmath::Big apply() { @@ -196,11 +208,33 @@ namespace detail } }; + // Partial specialization for ttmath + template + struct define_two_pi > + { + static inline ttmath::Big apply() + { + static ttmath::Big const two_pi( + "6.28318530717958647692528676655900576839433879875021164194988918461563281257241799725606965068423413596429617302656461329418768921910116446345071881625696223490056820540387704221111928924589790986076392"); + return two_pi; + } + }; + + template <> + struct define_half_pi + : public define_half_pi > + {}; + template <> struct define_pi : public define_pi > {}; + template <> + struct define_two_pi + : public define_two_pi > + {}; + template struct equals_with_epsilon, false> { From d895a12b96659d6b458eab34dcbee1868003c831 Mon Sep 17 00:00:00 2001 From: Menelaos Karavelas Date: Mon, 27 Apr 2015 12:48:02 +0300 Subject: [PATCH 66/89] [strategies][cartesian][buffer] use math::two_pi<>() instead of computing it from math::pi<>() --- .../geometry/strategies/cartesian/buffer_end_round.hpp | 10 +++++++--- .../strategies/cartesian/buffer_join_round.hpp | 8 ++++++-- .../strategies/cartesian/buffer_point_circle.hpp | 3 +-- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/include/boost/geometry/strategies/cartesian/buffer_end_round.hpp b/include/boost/geometry/strategies/cartesian/buffer_end_round.hpp index a233f1c4b..3d7d5bb46 100644 --- a/include/boost/geometry/strategies/cartesian/buffer_end_round.hpp +++ b/include/boost/geometry/strategies/cartesian/buffer_end_round.hpp @@ -1,6 +1,11 @@ // Boost.Geometry (aka GGL, Generic Geometry Library) -// Copyright (c) 2012-2014 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2012-2015 Barend Gehrels, Amsterdam, the Netherlands. + +// This file was modified by Oracle on 2015. +// Modifications copyright (c) 2015, Oracle and/or its affiliates. + +// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -62,8 +67,7 @@ private : DistanceType const& buffer_distance, RangeOut& range_out) const { - PromotedType const two = 2.0; - PromotedType const two_pi = two * geometry::math::pi(); + PromotedType const two_pi = geometry::math::two_pi(); std::size_t point_buffer_count = m_points_per_circle; diff --git a/include/boost/geometry/strategies/cartesian/buffer_join_round.hpp b/include/boost/geometry/strategies/cartesian/buffer_join_round.hpp index 9ec51cd1e..aa0b6de8b 100644 --- a/include/boost/geometry/strategies/cartesian/buffer_join_round.hpp +++ b/include/boost/geometry/strategies/cartesian/buffer_join_round.hpp @@ -2,6 +2,11 @@ // Copyright (c) 2012-2015 Barend Gehrels, Amsterdam, the Netherlands. +// This file was modified by Oracle on 2015. +// Modifications copyright (c) 2015, Oracle and/or its affiliates. + +// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle + // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -76,8 +81,7 @@ private : PromotedType const dx2 = get<0>(perp2) - get<0>(vertex); PromotedType const dy2 = get<1>(perp2) - get<1>(vertex); - PromotedType const two = 2.0; - PromotedType const two_pi = two * geometry::math::pi(); + PromotedType const two_pi = geometry::math::two_pi(); PromotedType const angle1 = atan2(dy1, dx1); PromotedType angle2 = atan2(dy2, dx2); diff --git a/include/boost/geometry/strategies/cartesian/buffer_point_circle.hpp b/include/boost/geometry/strategies/cartesian/buffer_point_circle.hpp index 86ebc43c9..f28985717 100644 --- a/include/boost/geometry/strategies/cartesian/buffer_point_circle.hpp +++ b/include/boost/geometry/strategies/cartesian/buffer_point_circle.hpp @@ -85,8 +85,7 @@ public : promoted_type const buffer_distance = distance_strategy.apply(point, point, strategy::buffer::buffer_side_left); - promoted_type const two = 2.0; - promoted_type const two_pi = two * geometry::math::pi(); + promoted_type const two_pi = geometry::math::two_pi(); promoted_type const diff = two_pi / promoted_type(m_count); promoted_type a = 0; From 3800cb4830c6f961d4d346216ec35b3234c92caa Mon Sep 17 00:00:00 2001 From: Menelaos Karavelas Date: Mon, 27 Apr 2015 12:48:47 +0300 Subject: [PATCH 67/89] [strategies][spherical][area] use math::two_pi<>() and math::half_pi<>() instead of computing them from math::pi<>() --- .../geometry/strategies/spherical/area_huiller.hpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/include/boost/geometry/strategies/spherical/area_huiller.hpp b/include/boost/geometry/strategies/spherical/area_huiller.hpp index e55fdb2b0..cf18338ca 100644 --- a/include/boost/geometry/strategies/spherical/area_huiller.hpp +++ b/include/boost/geometry/strategies/spherical/area_huiller.hpp @@ -1,6 +1,11 @@ // Boost.Geometry (aka GGL, Generic Geometry Library) -// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands. + +// This file was modified by Oracle on 2015. +// Modifications copyright (c) 2015, Oracle and/or its affiliates. + +// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -113,8 +118,10 @@ public : calculation_type const half = 0.5; calculation_type const two = 2.0; calculation_type const four = 4.0; - calculation_type const two_pi = two * geometry::math::pi(); - calculation_type const half_pi = half * geometry::math::pi(); + calculation_type const two_pi + = geometry::math::two_pi(); + calculation_type const half_pi + = geometry::math::half_pi(); // Distance p1 p2 calculation_type a = state.distance_over_unit_sphere.apply(p1, p2); From 7031e84c95af5d1f8d1f99bd844c7b7f45acff69 Mon Sep 17 00:00:00 2001 From: Menelaos Karavelas Date: Mon, 27 Apr 2015 13:44:15 +0300 Subject: [PATCH 68/89] [extensions][ttmath] fix wrong definition of pi and half-pi for ttmath::Big<> --- include/boost/geometry/extensions/contrib/ttmath_stub.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/geometry/extensions/contrib/ttmath_stub.hpp b/include/boost/geometry/extensions/contrib/ttmath_stub.hpp index c8af1acf5..cb53fc114 100644 --- a/include/boost/geometry/extensions/contrib/ttmath_stub.hpp +++ b/include/boost/geometry/extensions/contrib/ttmath_stub.hpp @@ -186,7 +186,7 @@ namespace detail // Partial specialization for ttmath template - struct define_pi > + struct define_half_pi > { static inline ttmath::Big apply() { @@ -198,7 +198,7 @@ namespace detail // Partial specialization for ttmath template - struct define_half_pi > + struct define_pi > { static inline ttmath::Big apply() { From 914c2e5f8018ed78734f8db8ca173cd4e40bafae Mon Sep 17 00:00:00 2001 From: Menelaos Karavelas Date: Mon, 27 Apr 2015 15:07:33 +0300 Subject: [PATCH 69/89] [io][wkt] reduce dependency on geometry::disjoint algorithm by calling detail::disjoint::disjoint_point_point --- include/boost/geometry/io/wkt/write.hpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/include/boost/geometry/io/wkt/write.hpp b/include/boost/geometry/io/wkt/write.hpp index add40e255..f16c0cab7 100644 --- a/include/boost/geometry/io/wkt/write.hpp +++ b/include/boost/geometry/io/wkt/write.hpp @@ -1,9 +1,14 @@ // Boost.Geometry (aka GGL, Generic Geometry Library) -// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. -// Copyright (c) 2008-2012 Bruno Lalande, Paris, France. -// Copyright (c) 2009-2012 Mateusz Loskot, London, UK. -// Copyright (c) 2014 Adam Wulkiewicz, Lodz, Poland. +// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Bruno Lalande, Paris, France. +// Copyright (c) 2009-2015 Mateusz Loskot, London, UK. +// Copyright (c) 2014-2015 Adam Wulkiewicz, Lodz, Poland. + +// This file was modified by Oracle on 2015. +// Modifications copyright (c) 2015, Oracle and/or its affiliates. + +// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands. @@ -28,7 +33,7 @@ #include #include #include -#include +#include #include #include #include @@ -150,7 +155,7 @@ struct wkt_range // optionally, close range to ring by repeating the first point if (force_closed && boost::size(range) > 1 - && geometry::disjoint(*begin, *(end - 1))) + && detail::disjoint::disjoint_point_point(*begin, *(end - 1))) { os << ","; stream_type::apply(os, *begin); From a8282b538380a16b61756ea1b1b10f53daa418d2 Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Mon, 27 Apr 2015 15:49:50 +0200 Subject: [PATCH 70/89] [projections] fix missing inline calls --- .../boost/geometry/extensions/gis/projections/impl/pj_init.hpp | 2 +- .../boost/geometry/extensions/gis/projections/impl/pj_inv.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/geometry/extensions/gis/projections/impl/pj_init.hpp b/include/boost/geometry/extensions/gis/projections/impl/pj_init.hpp index 54e4b6c46..9234a6efa 100644 --- a/include/boost/geometry/extensions/gis/projections/impl/pj_init.hpp +++ b/include/boost/geometry/extensions/gis/projections/impl/pj_init.hpp @@ -71,7 +71,7 @@ namespace detail /* large enough to hold projection specific parameters. */ /************************************************************************/ template -parameters pj_init(R const& arguments, bool use_defaults = true) +inline parameters pj_init(R const& arguments, bool use_defaults = true) { parameters pin; for (std::vector::const_iterator it = boost::begin(arguments); diff --git a/include/boost/geometry/extensions/gis/projections/impl/pj_inv.hpp b/include/boost/geometry/extensions/gis/projections/impl/pj_inv.hpp index 2b4f0c147..d59bc2121 100644 --- a/include/boost/geometry/extensions/gis/projections/impl/pj_inv.hpp +++ b/include/boost/geometry/extensions/gis/projections/impl/pj_inv.hpp @@ -56,7 +56,7 @@ namespace inv /* inverse projection entry */ template -void pj_inv(PRJ const& prj, PAR const& par, XY const& xy, LL& ll) +inline void pj_inv(PRJ const& prj, PAR const& par, XY const& xy, LL& ll) { /* can't do as much preliminary checking as with forward */ /* descale and de-offset */ From 6d3fb0f11bad57bfcf943736f4403e46d1706bfc Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Mon, 27 Apr 2015 15:50:18 +0200 Subject: [PATCH 71/89] [projections] remove old variable warning protections --- .../extensions/gis/projections/impl/base_dynamic.hpp | 12 ++---------- .../extensions/gis/projections/impl/projects.hpp | 4 ++-- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/include/boost/geometry/extensions/gis/projections/impl/base_dynamic.hpp b/include/boost/geometry/extensions/gis/projections/impl/base_dynamic.hpp index ff7eb5263..7a1f1cf26 100644 --- a/include/boost/geometry/extensions/gis/projections/impl/base_dynamic.hpp +++ b/include/boost/geometry/extensions/gis/projections/impl/base_dynamic.hpp @@ -11,7 +11,6 @@ #include -#include #include @@ -47,20 +46,13 @@ public: m_proj.fwd(lp_lon, lp_lat, xy_x, xy_y); } - virtual bool inverse(XY const& xy, LL& ll) const + virtual bool inverse(XY const& , LL& ) const { - boost::ignore_unused_variable_warning(xy); - boost::ignore_unused_variable_warning(ll); - // exception? return false; } - virtual void inv(XY_T& xy_x, XY_T& xy_y, LL_T& lp_lon, LL_T& lp_lat) const + virtual void inv(XY_T& , XY_T& , LL_T& , LL_T& ) const { - boost::ignore_unused_variable_warning(xy_x); - boost::ignore_unused_variable_warning(xy_y); - boost::ignore_unused_variable_warning(lp_lon); - boost::ignore_unused_variable_warning(lp_lat); // exception? } diff --git a/include/boost/geometry/extensions/gis/projections/impl/projects.hpp b/include/boost/geometry/extensions/gis/projections/impl/projects.hpp index eab7eba94..89240c222 100644 --- a/include/boost/geometry/extensions/gis/projections/impl/projects.hpp +++ b/include/boost/geometry/extensions/gis/projections/impl/projects.hpp @@ -39,7 +39,7 @@ #include #include -#include +#include #include namespace boost { namespace geometry { namespace projections @@ -177,7 +177,7 @@ public: proj_exception(int code = 0) { - boost::ignore_unused_variable_warning(code); + boost::ignore_unused(code); } }; From 70cc7fdb4756d16e9d3626dd4d452ba7c9037697 Mon Sep 17 00:00:00 2001 From: Menelaos Karavelas Date: Mon, 27 Apr 2015 17:47:29 +0300 Subject: [PATCH 72/89] [strategies][spherical][area][huiller] update the URL for one of the references --- .../boost/geometry/strategies/spherical/area_huiller.hpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/include/boost/geometry/strategies/spherical/area_huiller.hpp b/include/boost/geometry/strategies/spherical/area_huiller.hpp index e55fdb2b0..ea62f7494 100644 --- a/include/boost/geometry/strategies/spherical/area_huiller.hpp +++ b/include/boost/geometry/strategies/spherical/area_huiller.hpp @@ -39,10 +39,9 @@ crossing polygons and for polygons with holes. However, some cases (especially 180 meridian cases) must still be checked. \note The version which sums angles, which is often seen, doesn't handle non-convex polygons correctly. -\note The version which sums longitudes, see -http://trs-new.jpl.nasa.gov/dspace/bitstream/2014/40409/1/07-03.pdf, is simple -and works well in most cases but not in 180 meridian crossing cases. This probably -could be solved. +\note The version which sums longitudes, see http://hdl.handle.net/2014/40409, +is simple and works well in most cases but not in 180 meridian crossing cases. +This probably could be solved. \note This version is made for spherical equatorial coordinate systems From ca9fa7260d33afa1b8567f23e7943ddef829dd28 Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Wed, 29 Apr 2015 10:51:42 +0200 Subject: [PATCH 73/89] [projections] added spheroid models skipped earlier --- .../gis/projections/proj/gn_sinu.hpp | 64 +++++++++++++++++++ .../extensions/gis/projections/proj/stere.hpp | 23 +++++++ 2 files changed, 87 insertions(+) diff --git a/include/boost/geometry/extensions/gis/projections/proj/gn_sinu.hpp b/include/boost/geometry/extensions/gis/projections/proj/gn_sinu.hpp index 329a89776..aae623eca 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/gn_sinu.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/gn_sinu.hpp @@ -202,6 +202,28 @@ namespace boost { namespace geometry { namespace projections }} // namespace detail::gn_sinu #endif // doxygen + /*! + \brief General Sinusoidal Series projection + \ingroup projections + \tparam Geographic latlong point type + \tparam Cartesian xy point type + \tparam Parameters parameter type + \par Projection characteristics + - Pseudocylindrical + - Spheroid + - m= n= + \par Example + \image html ex_gn_sinu.gif + */ + template + struct gn_sinu_ellipsoid : public detail::gn_sinu::base_gn_sinu_ellipsoid + { + inline gn_sinu_ellipsoid(const Parameters& par) : detail::gn_sinu::base_gn_sinu_ellipsoid(par) + { + detail::gn_sinu::setup_gn_sinu(this->m_par, this->m_proj_parm); + } + }; + /*! \brief Sinusoidal (Sanson-Flamsteed) projection \ingroup projections @@ -224,6 +246,48 @@ namespace boost { namespace geometry { namespace projections } }; + /*! + \brief Eckert VI projection + \ingroup projections + \tparam Geographic latlong point type + \tparam Cartesian xy point type + \tparam Parameters parameter type + \par Projection characteristics + - Pseudocylindrical + - Spheroid + \par Example + \image html ex_eck6.gif + */ + template + struct eck6_ellipsoid : public detail::gn_sinu::base_gn_sinu_ellipsoid + { + inline eck6_ellipsoid(const Parameters& par) : detail::gn_sinu::base_gn_sinu_ellipsoid(par) + { + detail::gn_sinu::setup_eck6(this->m_par, this->m_proj_parm); + } + }; + + /*! + \brief McBryde-Thomas Flat-Polar Sinusoidal projection + \ingroup projections + \tparam Geographic latlong point type + \tparam Cartesian xy point type + \tparam Parameters parameter type + \par Projection characteristics + - Pseudocylindrical + - Spheroid + \par Example + \image html ex_mbtfps.gif + */ + template + struct mbtfps_ellipsoid : public detail::gn_sinu::base_gn_sinu_ellipsoid + { + inline mbtfps_ellipsoid(const Parameters& par) : detail::gn_sinu::base_gn_sinu_ellipsoid(par) + { + detail::gn_sinu::setup_mbtfps(this->m_par, this->m_proj_parm); + } + }; + /*! \brief General Sinusoidal Series projection \ingroup projections diff --git a/include/boost/geometry/extensions/gis/projections/proj/stere.hpp b/include/boost/geometry/extensions/gis/projections/proj/stere.hpp index a6418574f..c057db69a 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/stere.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/stere.hpp @@ -407,6 +407,29 @@ namespace boost { namespace geometry { namespace projections } }; + /*! + \brief Universal Polar Stereographic projection + \ingroup projections + \tparam Geographic latlong point type + \tparam Cartesian xy point type + \tparam Parameters parameter type + \par Projection characteristics + - Azimuthal + - Spheroid + - Ellipsoid + - south + \par Example + \image html ex_ups.gif + */ + template + struct ups_spheroid : public detail::stere::base_stere_spheroid + { + inline ups_spheroid(const Parameters& par) : detail::stere::base_stere_spheroid(par) + { + detail::stere::setup_ups(this->m_par, this->m_proj_parm); + } + }; + #ifndef DOXYGEN_NO_DETAIL namespace detail { From cc5f891b1a6e2c0fff44b998f8fc152d86fb03fc Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Wed, 29 Apr 2015 11:07:59 +0200 Subject: [PATCH 74/89] [projections] enable sphere for utm, which can be done if the throw at non par.es is skipped --- .../extensions/gis/projections/proj/tmerc.hpp | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/include/boost/geometry/extensions/gis/projections/proj/tmerc.hpp b/include/boost/geometry/extensions/gis/projections/proj/tmerc.hpp index 384059f12..6816a7fdb 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/tmerc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/tmerc.hpp @@ -244,7 +244,6 @@ namespace boost { namespace geometry { namespace projections void setup_utm(Parameters& par, par_tmerc& proj_parm) { int zone; - if (!par.es) throw proj_exception(-34); par.y0 = pj_param(par.params, "bsouth").i ? 10000000. : 0.; par.x0 = 500000.; if (pj_param(par.params, "tzone").i) /* zone input ? */ @@ -332,6 +331,28 @@ namespace boost { namespace geometry { namespace projections } }; + /*! + \brief Universal Transverse Mercator (UTM) projection + \ingroup projections + \tparam Geographic latlong point type + \tparam Cartesian xy point type + \tparam Parameters parameter type + \par Projection characteristics + - Cylindrical + - Spheroid + - zone= south + \par Example + \image html ex_utm.gif + */ + template + struct utm_spheroid : public detail::tmerc::base_tmerc_spheroid + { + inline utm_spheroid(const Parameters& par) : detail::tmerc::base_tmerc_spheroid(par) + { + detail::tmerc::setup_utm(this->m_par, this->m_proj_parm); + } + }; + #ifndef DOXYGEN_NO_DETAIL namespace detail { From 2d3d4780cce78bc54c85764cbe74caa037ff6a9f Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Wed, 29 Apr 2015 11:44:20 +0200 Subject: [PATCH 75/89] [projections] natearth, regeneration --- .../gis/projections/proj/natearth.hpp | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/include/boost/geometry/extensions/gis/projections/proj/natearth.hpp b/include/boost/geometry/extensions/gis/projections/proj/natearth.hpp index 8acfe6a98..99efd0116 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/natearth.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/natearth.hpp @@ -4,7 +4,7 @@ // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. -// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -15,6 +15,8 @@ // PROJ4 is maintained by Frank Warmerdam // PROJ4 is converted to Boost.Geometry by Barend Gehrels +// Last updated version of proj: 4.9.1 + // Original copyright notice: // Permission is hereby granted, free of charge, to any person obtaining a @@ -35,7 +37,6 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -#include #include #include @@ -45,7 +46,7 @@ namespace boost { namespace geometry { namespace projections { #ifndef DOXYGEN_NO_DETAIL - namespace detail { namespace natearth{ + namespace detail { namespace natearth{ static const double A0 = 0.8707; static const double A1 = -0.131979; static const double A2 = -0.013791; @@ -64,8 +65,6 @@ namespace boost { namespace geometry { namespace projections static const double EPS = 1e-11; static const double MAX_Y = (0.8707 * 0.52 * PI); - - // template class, using CRTP to implement forward/inverse template @@ -84,7 +83,7 @@ namespace boost { namespace geometry { namespace projections inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const { double phi2, phi4; - + phi2 = lp_lat * lp_lat; phi4 = phi2 * phi2; xy_x = lp_lon * (A0 + phi2 * (A1 + phi2 * (A2 + phi4 * phi2 * (A3 + phi2 * A4)))); @@ -94,14 +93,14 @@ namespace boost { namespace geometry { namespace projections inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const { double yc, tol, y2, y4, f, fder; - + /* make sure y is inside valid range */ if (xy_y > MAX_Y) { xy_y = MAX_Y; } else if (xy_y < -MAX_Y) { xy_y = -MAX_Y; } - + /* latitude */ yc = xy_y; for (;;) { /* Newton-Raphson */ @@ -115,11 +114,10 @@ namespace boost { namespace geometry { namespace projections } } lp_lat = yc; - + /* longitude */ y2 = yc * yc; lp_lon = xy_x / (A0 + y2 * (A1 + y2 * (A2 + y2 * y2 * y2 * (A3 + y2 * A4)))); - } }; @@ -133,7 +131,7 @@ namespace boost { namespace geometry { namespace projections } }} // namespace detail::natearth - #endif // doxygen + #endif // doxygen /*! \brief Natural Earth projection @@ -177,7 +175,7 @@ namespace boost { namespace geometry { namespace projections factory.add_to_factory("natearth", new natearth_entry); } - } // namespace detail + } // namespace detail #endif // doxygen }}} // namespace boost::geometry::projections From 3937486a0fb7fef1b16bcd57c64d634c67c40359 Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Wed, 29 Apr 2015 12:59:37 +0200 Subject: [PATCH 76/89] [projections] changes in white lines --- include/boost/geometry/extensions/gis/projections/proj/aea.hpp | 1 + .../boost/geometry/extensions/gis/projections/proj/august.hpp | 1 - include/boost/geometry/extensions/gis/projections/proj/boggs.hpp | 1 - include/boost/geometry/extensions/gis/projections/proj/chamb.hpp | 1 + include/boost/geometry/extensions/gis/projections/proj/collg.hpp | 1 - include/boost/geometry/extensions/gis/projections/proj/crast.hpp | 1 - include/boost/geometry/extensions/gis/projections/proj/denoy.hpp | 1 - include/boost/geometry/extensions/gis/projections/proj/eck1.hpp | 1 - include/boost/geometry/extensions/gis/projections/proj/eck2.hpp | 1 - include/boost/geometry/extensions/gis/projections/proj/eck4.hpp | 1 - include/boost/geometry/extensions/gis/projections/proj/eck5.hpp | 1 - include/boost/geometry/extensions/gis/projections/proj/fahey.hpp | 1 - include/boost/geometry/extensions/gis/projections/proj/gall.hpp | 1 - .../boost/geometry/extensions/gis/projections/proj/geocent.hpp | 1 - include/boost/geometry/extensions/gis/projections/proj/gins8.hpp | 1 - .../boost/geometry/extensions/gis/projections/proj/gn_sinu.hpp | 1 + .../boost/geometry/extensions/gis/projections/proj/hatano.hpp | 1 - include/boost/geometry/extensions/gis/projections/proj/imw_p.hpp | 1 + .../boost/geometry/extensions/gis/projections/proj/krovak.hpp | 1 + include/boost/geometry/extensions/gis/projections/proj/larr.hpp | 1 - include/boost/geometry/extensions/gis/projections/proj/lask.hpp | 1 - include/boost/geometry/extensions/gis/projections/proj/lcca.hpp | 1 + include/boost/geometry/extensions/gis/projections/proj/lsat.hpp | 1 + .../boost/geometry/extensions/gis/projections/proj/mbt_fps.hpp | 1 - .../boost/geometry/extensions/gis/projections/proj/mbtfpp.hpp | 1 - .../boost/geometry/extensions/gis/projections/proj/mbtfpq.hpp | 1 - include/boost/geometry/extensions/gis/projections/proj/merc.hpp | 1 - include/boost/geometry/extensions/gis/projections/proj/mill.hpp | 1 - .../boost/geometry/extensions/gis/projections/proj/mod_ster.hpp | 1 + .../boost/geometry/extensions/gis/projections/proj/natearth.hpp | 1 - include/boost/geometry/extensions/gis/projections/proj/nell.hpp | 1 - .../boost/geometry/extensions/gis/projections/proj/nell_h.hpp | 1 - include/boost/geometry/extensions/gis/projections/proj/nocol.hpp | 1 - include/boost/geometry/extensions/gis/projections/proj/putp2.hpp | 1 - include/boost/geometry/extensions/gis/projections/proj/qsc.hpp | 1 + .../boost/geometry/extensions/gis/projections/proj/sconics.hpp | 1 + include/boost/geometry/extensions/gis/projections/proj/stere.hpp | 1 + include/boost/geometry/extensions/gis/projections/proj/vandg.hpp | 1 - .../boost/geometry/extensions/gis/projections/proj/vandg4.hpp | 1 - include/boost/geometry/extensions/gis/projections/proj/wag2.hpp | 1 - include/boost/geometry/extensions/gis/projections/proj/wag7.hpp | 1 - 41 files changed, 11 insertions(+), 30 deletions(-) diff --git a/include/boost/geometry/extensions/gis/projections/proj/aea.hpp b/include/boost/geometry/extensions/gis/projections/proj/aea.hpp index b33fbb17b..c4f29d29c 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/aea.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/aea.hpp @@ -74,6 +74,7 @@ namespace boost { namespace geometry { namespace projections double en[EN_SIZE]; int ellips; }; + /* determine latitude angle phi-1 */ inline double phi1_(double qs, double Te, double Tone_es) { diff --git a/include/boost/geometry/extensions/gis/projections/proj/august.hpp b/include/boost/geometry/extensions/gis/projections/proj/august.hpp index c4e6815b7..46c14821f 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/august.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/august.hpp @@ -49,7 +49,6 @@ namespace boost { namespace geometry { namespace projections namespace detail { namespace august{ static const double M = 1.333333333333333; - // template class, using CRTP to implement forward/inverse template struct base_august_spheroid : public base_t_f, diff --git a/include/boost/geometry/extensions/gis/projections/proj/boggs.hpp b/include/boost/geometry/extensions/gis/projections/proj/boggs.hpp index e00ed04e3..90e72c9bf 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/boggs.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/boggs.hpp @@ -55,7 +55,6 @@ namespace boost { namespace geometry { namespace projections static const double FYC = 0.49931; static const double FYC2 = 1.41421356237309504880; - // template class, using CRTP to implement forward/inverse template struct base_boggs_spheroid : public base_t_f, diff --git a/include/boost/geometry/extensions/gis/projections/proj/chamb.hpp b/include/boost/geometry/extensions/gis/projections/proj/chamb.hpp index 737902717..c170581bf 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/chamb.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/chamb.hpp @@ -69,6 +69,7 @@ namespace boost { namespace geometry { namespace projections XY p; double beta_0, beta_1, beta_2; }; + inline VECT /* distance and azimuth from point 1 to point 2 */ vect(double dphi, double c1, double s1, double c2, double s2, double dlam) { VECT v; diff --git a/include/boost/geometry/extensions/gis/projections/proj/collg.hpp b/include/boost/geometry/extensions/gis/projections/proj/collg.hpp index 63895e781..153b288e7 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/collg.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/collg.hpp @@ -51,7 +51,6 @@ namespace boost { namespace geometry { namespace projections static const double FYC = 1.77245385090551602729; static const double ONEEPS = 1.0000001; - // template class, using CRTP to implement forward/inverse template struct base_collg_spheroid : public base_t_fi, diff --git a/include/boost/geometry/extensions/gis/projections/proj/crast.hpp b/include/boost/geometry/extensions/gis/projections/proj/crast.hpp index 213f14091..049f1f303 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/crast.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/crast.hpp @@ -53,7 +53,6 @@ namespace boost { namespace geometry { namespace projections static const double RYM = 0.32573500793527994772; static const double THIRD = 0.333333333333333333; - // template class, using CRTP to implement forward/inverse template struct base_crast_spheroid : public base_t_fi, diff --git a/include/boost/geometry/extensions/gis/projections/proj/denoy.hpp b/include/boost/geometry/extensions/gis/projections/proj/denoy.hpp index 91a3f0b38..0739ea9d2 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/denoy.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/denoy.hpp @@ -53,7 +53,6 @@ namespace boost { namespace geometry { namespace projections static const double D1 = 0.9; static const double D5 = 0.03; - // template class, using CRTP to implement forward/inverse template struct base_denoy_spheroid : public base_t_f, diff --git a/include/boost/geometry/extensions/gis/projections/proj/eck1.hpp b/include/boost/geometry/extensions/gis/projections/proj/eck1.hpp index 516562b1a..618d45c1d 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/eck1.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/eck1.hpp @@ -50,7 +50,6 @@ namespace boost { namespace geometry { namespace projections static const double FC = .92131773192356127802; static const double RP = .31830988618379067154; - // template class, using CRTP to implement forward/inverse template struct base_eck1_spheroid : public base_t_fi, diff --git a/include/boost/geometry/extensions/gis/projections/proj/eck2.hpp b/include/boost/geometry/extensions/gis/projections/proj/eck2.hpp index 5f17ebdb0..b8f9166f8 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/eck2.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/eck2.hpp @@ -52,7 +52,6 @@ namespace boost { namespace geometry { namespace projections static const double C13 = 0.33333333333333333333; static const double ONEEPS = 1.0000001; - // template class, using CRTP to implement forward/inverse template struct base_eck2_spheroid : public base_t_fi, diff --git a/include/boost/geometry/extensions/gis/projections/proj/eck4.hpp b/include/boost/geometry/extensions/gis/projections/proj/eck4.hpp index 371dca9ed..1b14b83c7 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/eck4.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/eck4.hpp @@ -56,7 +56,6 @@ namespace boost { namespace geometry { namespace projections static const double EPS = 1e-7; static const int NITER = 6; - // template class, using CRTP to implement forward/inverse template struct base_eck4_spheroid : public base_t_fi, diff --git a/include/boost/geometry/extensions/gis/projections/proj/eck5.hpp b/include/boost/geometry/extensions/gis/projections/proj/eck5.hpp index dccb96fa4..9dbc39b89 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/eck5.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/eck5.hpp @@ -52,7 +52,6 @@ namespace boost { namespace geometry { namespace projections static const double YF = 0.88202554344910296438; static const double RYF = 1.13375401361911319568; - // template class, using CRTP to implement forward/inverse template struct base_eck5_spheroid : public base_t_fi, diff --git a/include/boost/geometry/extensions/gis/projections/proj/fahey.hpp b/include/boost/geometry/extensions/gis/projections/proj/fahey.hpp index ca72efa7c..721e6f0ba 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/fahey.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/fahey.hpp @@ -49,7 +49,6 @@ namespace boost { namespace geometry { namespace projections namespace detail { namespace fahey{ static const double TOL = 1e-6; - // template class, using CRTP to implement forward/inverse template struct base_fahey_spheroid : public base_t_fi, diff --git a/include/boost/geometry/extensions/gis/projections/proj/gall.hpp b/include/boost/geometry/extensions/gis/projections/proj/gall.hpp index eb6dd605a..835788520 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/gall.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/gall.hpp @@ -52,7 +52,6 @@ namespace boost { namespace geometry { namespace projections static const double RYF = 0.58578643762690495119; static const double RXF = 1.41421356237309504880; - // template class, using CRTP to implement forward/inverse template struct base_gall_spheroid : public base_t_fi, diff --git a/include/boost/geometry/extensions/gis/projections/proj/geocent.hpp b/include/boost/geometry/extensions/gis/projections/proj/geocent.hpp index e0adacd33..beb2069fb 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/geocent.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/geocent.hpp @@ -48,7 +48,6 @@ namespace boost { namespace geometry { namespace projections #ifndef DOXYGEN_NO_DETAIL namespace detail { namespace geocent{ - // template class, using CRTP to implement forward/inverse template struct base_geocent_other : public base_t_fi, diff --git a/include/boost/geometry/extensions/gis/projections/proj/gins8.hpp b/include/boost/geometry/extensions/gis/projections/proj/gins8.hpp index 14cce3172..9fa9bf435 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/gins8.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/gins8.hpp @@ -51,7 +51,6 @@ namespace boost { namespace geometry { namespace projections static const double Cp = 0.162388; static const double C12 = 0.08333333333333333; - // template class, using CRTP to implement forward/inverse template struct base_gins8_spheroid : public base_t_f, diff --git a/include/boost/geometry/extensions/gis/projections/proj/gn_sinu.hpp b/include/boost/geometry/extensions/gis/projections/proj/gn_sinu.hpp index aae623eca..5bb5094cd 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/gn_sinu.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/gn_sinu.hpp @@ -58,6 +58,7 @@ namespace boost { namespace geometry { namespace projections double en[EN_SIZE]; double m, n, C_x, C_y; }; + /* Ellipsoidal Sinusoidal only */ // template class, using CRTP to implement forward/inverse diff --git a/include/boost/geometry/extensions/gis/projections/proj/hatano.hpp b/include/boost/geometry/extensions/gis/projections/proj/hatano.hpp index 79a113e18..b272f29c3 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/hatano.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/hatano.hpp @@ -61,7 +61,6 @@ namespace boost { namespace geometry { namespace projections static const double FXC = 0.85; static const double RXC = 1.17647058823529411764; - // template class, using CRTP to implement forward/inverse template struct base_hatano_spheroid : public base_t_fi, diff --git a/include/boost/geometry/extensions/gis/projections/proj/imw_p.hpp b/include/boost/geometry/extensions/gis/projections/proj/imw_p.hpp index 14e0048b5..5797caf91 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/imw_p.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/imw_p.hpp @@ -60,6 +60,7 @@ namespace boost { namespace geometry { namespace projections double en[EN_SIZE]; int mode; /* = 0, phi_1 and phi_2 != 0, = 1, phi_1 = 0, = -1 phi_2 = 0 */ }; + template inline int phi12(Parameters& par, par_imw_p& proj_parm, double *del, double *sig) { diff --git a/include/boost/geometry/extensions/gis/projections/proj/krovak.hpp b/include/boost/geometry/extensions/gis/projections/proj/krovak.hpp index 2db34983e..7f2a7efb6 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/krovak.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/krovak.hpp @@ -52,6 +52,7 @@ namespace boost { namespace geometry { namespace projections { double C_x; }; + /** NOTES: According to EPSG the full Krovak projection method should have the following parameters. Within PROJ.4 the azimuth, and pseudo diff --git a/include/boost/geometry/extensions/gis/projections/proj/larr.hpp b/include/boost/geometry/extensions/gis/projections/proj/larr.hpp index 42d3384ca..d24486ac7 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/larr.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/larr.hpp @@ -49,7 +49,6 @@ namespace boost { namespace geometry { namespace projections namespace detail { namespace larr{ static const double SIXTH = .16666666666666666; - // template class, using CRTP to implement forward/inverse template struct base_larr_spheroid : public base_t_f, diff --git a/include/boost/geometry/extensions/gis/projections/proj/lask.hpp b/include/boost/geometry/extensions/gis/projections/proj/lask.hpp index 77aa5c064..1ab51f1ac 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/lask.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/lask.hpp @@ -58,7 +58,6 @@ namespace boost { namespace geometry { namespace projections static const double b23 = -0.0285500; static const double b05 = -0.0491032; - // template class, using CRTP to implement forward/inverse template struct base_lask_spheroid : public base_t_f, diff --git a/include/boost/geometry/extensions/gis/projections/proj/lcca.hpp b/include/boost/geometry/extensions/gis/projections/proj/lcca.hpp index cca6571eb..3e1cb025b 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/lcca.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/lcca.hpp @@ -59,6 +59,7 @@ namespace boost { namespace geometry { namespace projections double r0, l, M0; double C; }; + inline double /* func to compute dr */ fS(double S, double C) { return(S * ( 1. + S * S * C)); diff --git a/include/boost/geometry/extensions/gis/projections/proj/lsat.hpp b/include/boost/geometry/extensions/gis/projections/proj/lsat.hpp index 39cef0733..ddd5c9525 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/lsat.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/lsat.hpp @@ -57,6 +57,7 @@ namespace boost { namespace geometry { namespace projections double a2, a4, b, c1, c3; double q, t, u, w, p22, sa, ca, xj, rlm, rlm2; }; + /* based upon Snyder and Linck, USGS-NMD */ template inline void diff --git a/include/boost/geometry/extensions/gis/projections/proj/mbt_fps.hpp b/include/boost/geometry/extensions/gis/projections/proj/mbt_fps.hpp index 764429aa6..9f1497ab0 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/mbt_fps.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/mbt_fps.hpp @@ -57,7 +57,6 @@ namespace boost { namespace geometry { namespace projections static const double C_y = 1.44492; static const double C1_2 = 0.33333333333333333333333333; - // template class, using CRTP to implement forward/inverse template struct base_mbt_fps_spheroid : public base_t_fi, diff --git a/include/boost/geometry/extensions/gis/projections/proj/mbtfpp.hpp b/include/boost/geometry/extensions/gis/projections/proj/mbtfpp.hpp index 5dd9631ca..58bb5e440 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/mbtfpp.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/mbtfpp.hpp @@ -54,7 +54,6 @@ namespace boost { namespace geometry { namespace projections static const double C13 = .33333333333333333333; static const double ONEEPS = 1.0000001; - // template class, using CRTP to implement forward/inverse template struct base_mbtfpp_spheroid : public base_t_fi, diff --git a/include/boost/geometry/extensions/gis/projections/proj/mbtfpq.hpp b/include/boost/geometry/extensions/gis/projections/proj/mbtfpq.hpp index 084974276..df35b8b55 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/mbtfpq.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/mbtfpq.hpp @@ -57,7 +57,6 @@ namespace boost { namespace geometry { namespace projections static const double FXC = 0.31245971410378249250; static const double RXC = 3.20041258076506210122; - // template class, using CRTP to implement forward/inverse template struct base_mbtfpq_spheroid : public base_t_fi, diff --git a/include/boost/geometry/extensions/gis/projections/proj/merc.hpp b/include/boost/geometry/extensions/gis/projections/proj/merc.hpp index a2a48c967..bb0f5a290 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/merc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/merc.hpp @@ -52,7 +52,6 @@ namespace boost { namespace geometry { namespace projections namespace detail { namespace merc{ static const double EPS10 = 1.e-10; - // template class, using CRTP to implement forward/inverse template struct base_merc_ellipsoid : public base_t_fi, diff --git a/include/boost/geometry/extensions/gis/projections/proj/mill.hpp b/include/boost/geometry/extensions/gis/projections/proj/mill.hpp index e9128a75a..586896910 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/mill.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/mill.hpp @@ -48,7 +48,6 @@ namespace boost { namespace geometry { namespace projections #ifndef DOXYGEN_NO_DETAIL namespace detail { namespace mill{ - // template class, using CRTP to implement forward/inverse template struct base_mill_spheroid : public base_t_fi, diff --git a/include/boost/geometry/extensions/gis/projections/proj/mod_ster.hpp b/include/boost/geometry/extensions/gis/projections/proj/mod_ster.hpp index 7d5828589..53393537e 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/mod_ster.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/mod_ster.hpp @@ -59,6 +59,7 @@ namespace boost { namespace geometry { namespace projections double cchio, schio; int n; }; + /* based upon Snyder and Linck, USGS-NMD */ // template class, using CRTP to implement forward/inverse diff --git a/include/boost/geometry/extensions/gis/projections/proj/natearth.hpp b/include/boost/geometry/extensions/gis/projections/proj/natearth.hpp index 99efd0116..1bef3f59b 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/natearth.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/natearth.hpp @@ -65,7 +65,6 @@ namespace boost { namespace geometry { namespace projections static const double EPS = 1e-11; static const double MAX_Y = (0.8707 * 0.52 * PI); - // template class, using CRTP to implement forward/inverse template struct base_natearth_spheroid : public base_t_fi, diff --git a/include/boost/geometry/extensions/gis/projections/proj/nell.hpp b/include/boost/geometry/extensions/gis/projections/proj/nell.hpp index 59ce067ba..493e32a86 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/nell.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/nell.hpp @@ -51,7 +51,6 @@ namespace boost { namespace geometry { namespace projections static const int MAX_ITER = 10; static const double LOOP_TOL = 1e-7; - // template class, using CRTP to implement forward/inverse template struct base_nell_spheroid : public base_t_fi, diff --git a/include/boost/geometry/extensions/gis/projections/proj/nell_h.hpp b/include/boost/geometry/extensions/gis/projections/proj/nell_h.hpp index 85df442da..08bcb0c5a 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/nell_h.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/nell_h.hpp @@ -50,7 +50,6 @@ namespace boost { namespace geometry { namespace projections static const int NITER = 9; static const double EPS = 1e-7; - // template class, using CRTP to implement forward/inverse template struct base_nell_h_spheroid : public base_t_fi, diff --git a/include/boost/geometry/extensions/gis/projections/proj/nocol.hpp b/include/boost/geometry/extensions/gis/projections/proj/nocol.hpp index dd52aa8cc..af9f50498 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/nocol.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/nocol.hpp @@ -49,7 +49,6 @@ namespace boost { namespace geometry { namespace projections namespace detail { namespace nocol{ static const double EPS = 1e-10; - // template class, using CRTP to implement forward/inverse template struct base_nocol_spheroid : public base_t_f, diff --git a/include/boost/geometry/extensions/gis/projections/proj/putp2.hpp b/include/boost/geometry/extensions/gis/projections/proj/putp2.hpp index fcf2a7271..ed593989a 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/putp2.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/putp2.hpp @@ -55,7 +55,6 @@ namespace boost { namespace geometry { namespace projections static const int NITER = 10; static const double PI_DIV_3 = 1.0471975511965977; - // template class, using CRTP to implement forward/inverse template struct base_putp2_spheroid : public base_t_fi, diff --git a/include/boost/geometry/extensions/gis/projections/proj/qsc.hpp b/include/boost/geometry/extensions/gis/projections/proj/qsc.hpp index 6560317fb..d38a2a9f9 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/qsc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/qsc.hpp @@ -69,6 +69,7 @@ namespace boost { namespace geometry { namespace projections double one_minus_f; double one_minus_f_squared; }; + /* The six cube faces. */ /* The four areas on a cube face. AREA_0 is the area of definition, diff --git a/include/boost/geometry/extensions/gis/projections/proj/sconics.hpp b/include/boost/geometry/extensions/gis/projections/proj/sconics.hpp index a8e9a42b9..792e5a477 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/sconics.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/sconics.hpp @@ -68,6 +68,7 @@ namespace boost { namespace geometry { namespace projections double c1, c2; int type; }; + /* get common factors for simple conics */ template inline int diff --git a/include/boost/geometry/extensions/gis/projections/proj/stere.hpp b/include/boost/geometry/extensions/gis/projections/proj/stere.hpp index c057db69a..70da21f17 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/stere.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/stere.hpp @@ -67,6 +67,7 @@ namespace boost { namespace geometry { namespace projections double akm1; int mode; }; + inline double ssfn_(double phit, double sinphi, double eccen) { sinphi *= eccen; diff --git a/include/boost/geometry/extensions/gis/projections/proj/vandg.hpp b/include/boost/geometry/extensions/gis/projections/proj/vandg.hpp index 9adad8179..75a1a9ea4 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/vandg.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/vandg.hpp @@ -56,7 +56,6 @@ namespace boost { namespace geometry { namespace projections static const double TPISQ = 19.73920880217871723738; static const double HPISQ = 4.93480220054467930934; - // template class, using CRTP to implement forward/inverse template struct base_vandg_spheroid : public base_t_fi, diff --git a/include/boost/geometry/extensions/gis/projections/proj/vandg4.hpp b/include/boost/geometry/extensions/gis/projections/proj/vandg4.hpp index f45815322..bc993a6d6 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/vandg4.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/vandg4.hpp @@ -50,7 +50,6 @@ namespace boost { namespace geometry { namespace projections static const double TOL = 1e-10; static const double TWORPI = 0.63661977236758134308; - // template class, using CRTP to implement forward/inverse template struct base_vandg4_spheroid : public base_t_f, diff --git a/include/boost/geometry/extensions/gis/projections/proj/wag2.hpp b/include/boost/geometry/extensions/gis/projections/proj/wag2.hpp index c03e1d2ca..04a133742 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/wag2.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/wag2.hpp @@ -53,7 +53,6 @@ namespace boost { namespace geometry { namespace projections static const double C_p1 = 0.88022; static const double C_p2 = 0.88550; - // template class, using CRTP to implement forward/inverse template struct base_wag2_spheroid : public base_t_fi, diff --git a/include/boost/geometry/extensions/gis/projections/proj/wag7.hpp b/include/boost/geometry/extensions/gis/projections/proj/wag7.hpp index 0f553e316..a98a14984 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/wag7.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/wag7.hpp @@ -48,7 +48,6 @@ namespace boost { namespace geometry { namespace projections #ifndef DOXYGEN_NO_DETAIL namespace detail { namespace wag7{ - // template class, using CRTP to implement forward/inverse template struct base_wag7_spheroid : public base_t_f, From c5c4c90c874e1dec51f4dc4c56c77f80166e3314 Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Wed, 29 Apr 2015 13:00:06 +0200 Subject: [PATCH 77/89] [projections] omerc, remove now unused inlined function --- .../boost/geometry/extensions/gis/projections/proj/omerc.hpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/include/boost/geometry/extensions/gis/projections/proj/omerc.hpp b/include/boost/geometry/extensions/gis/projections/proj/omerc.hpp index 96c71eb91..b05f48906 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/omerc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/omerc.hpp @@ -52,10 +52,6 @@ namespace boost { namespace geometry { namespace projections static const double TOL = 1.e-7; static const double EPS = 1.e-10; - inline double TSFN0(double x) - {return tan(.5 * (HALFPI - (x))); } - - struct par_omerc { double A, B, E, AB, ArB, BrA, rB, singam, cosgam, sinrot, cosrot; From c81255cf5ee539b4004a1b666db2a499f8c78e15 Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Wed, 29 Apr 2015 13:35:14 +0200 Subject: [PATCH 78/89] [projections] add new projection isa include entry in unit test (tested with proj4.9.1) --- .../test/gis/projections/projections.cpp | 1 + .../extensions/gis/projections/factory.hpp | 2 + .../extensions/gis/projections/proj/isea.hpp | 1150 +++++++++++++++++ 3 files changed, 1153 insertions(+) create mode 100644 include/boost/geometry/extensions/gis/projections/proj/isea.hpp diff --git a/extensions/test/gis/projections/projections.cpp b/extensions/test/gis/projections/projections.cpp index 180acc3eb..75ed46bfc 100644 --- a/extensions/test/gis/projections/projections.cpp +++ b/extensions/test/gis/projections/projections.cpp @@ -149,6 +149,7 @@ void test_all() test_forward

("hammer", 4.897000, 52.371000, 370843.923425, 5630047.232233, "+proj=hammer +ellps=WGS84 +units=m"); test_forward

("hatano", 4.897000, 52.371000, 383644.128560, 6290117.704632, "+proj=hatano +ellps=WGS84 +units=m"); test_forward

("imw_p", 4.897000, 52.371000, 318784.808056, 3594184.939568, "+proj=imw_p +ellps=WGS84 +units=m +lat_1=20n +lat_2=60n +lon_1=5"); + test_forward

("isea", 4.897000, 52.371000, -413613.639976, 9218173.701546, "+proj=isea +ellps=WGS84 +units=m"); test_forward

("kav5", 4.897000, 52.371000, 383646.088858, 5997047.888175, "+proj=kav5 +ellps=WGS84 +units=m"); test_forward

("kav7", 4.897000, 52.371000, 407769.043907, 5829913.052335, "+proj=kav7 +ellps=WGS84 +units=m"); test_forward

("krovak", 14.416667, 50.083333, -743286.779768, -1043498.912060, "+proj=krovak +ellps=WGS84 +units=m"); diff --git a/include/boost/geometry/extensions/gis/projections/factory.hpp b/include/boost/geometry/extensions/gis/projections/factory.hpp index b95aed82f..0acb12eb7 100644 --- a/include/boost/geometry/extensions/gis/projections/factory.hpp +++ b/include/boost/geometry/extensions/gis/projections/factory.hpp @@ -53,6 +53,7 @@ #include #include #include // xy functions after inverse +#include #include #include #include @@ -175,6 +176,7 @@ public: detail::hatano_init(*this); detail::krovak_init(*this); detail::imw_p_init(*this); + detail::isea_init(*this); detail::labrd_init(*this); detail::laea_init(*this); detail::lagrng_init(*this); diff --git a/include/boost/geometry/extensions/gis/projections/proj/isea.hpp b/include/boost/geometry/extensions/gis/projections/proj/isea.hpp new file mode 100644 index 000000000..d82e4d174 --- /dev/null +++ b/include/boost/geometry/extensions/gis/projections/proj/isea.hpp @@ -0,0 +1,1150 @@ +#ifndef BOOST_GEOMETRY_PROJECTIONS_ISEA_HPP +#define BOOST_GEOMETRY_PROJECTIONS_ISEA_HPP + +// Boost.Geometry - extensions-gis-projections (based on PROJ4) +// This file is automatically generated. DO NOT EDIT. + +// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. + +// Use, modification and distribution is subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// This file is converted from PROJ4, http://trac.osgeo.org/proj +// PROJ4 is originally written by Gerald Evenden (then of the USGS) +// PROJ4 is maintained by Frank Warmerdam +// PROJ4 is converted to Boost.Geometry by Barend Gehrels + +// Last updated version of proj: 4.9.1 + +// Original copyright notice: + +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: + +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. + +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + + +#include +#include +#include +#include + +namespace boost { namespace geometry { namespace projections +{ + #ifndef DOXYGEN_NO_DETAIL + namespace detail { namespace isea{ + static const double E = 52.62263186; + static const double F = 10.81231696; + static const double DEG60 = 1.04719755119659774614; + static const double DEG120 = 2.09439510239319549229; + static const double DEG72 = 1.25663706143591729537; + static const double DEG90 = 1.57079632679489661922; + static const double DEG144 = 2.51327412287183459075; + static const double DEG36 = 0.62831853071795864768; + static const double DEG108 = 1.88495559215387594306; + static const double DEG180 = M_PI; + static const double ISEA_SCALE = 0.8301572857837594396028083; + static const double V_LAT = 0.46364760899944494524; + static const double RAD2DEG = (180.0/M_PI); + static const double DEG2RAD = (M_PI/180.0); + static const double E_RAD = 0.91843818702186776133; + static const double F_RAD = 0.18871053072122403508; + static const double TABLE_G = 0.6615845383; + static const double TABLE_H = 0.1909830056; + static const double RPRIME = 0.91038328153090290025; + static const double PRECISION = 0.0000000000005; + static const double ISEA_STD_LAT = 1.01722196792335072101; + static const double ISEA_STD_LON = .19634954084936207740; + + #define DOWNTRI(tri) (((tri - 1) / 5) % 2 == 1) + + + + struct hex { + int iso; + int x, y, z; + }; + + /* y *must* be positive down as the xy /iso conversion assumes this */ + static + int hex_xy(struct hex *h) { + if (!h->iso) return 1; + if (h->x >= 0) { + h->y = -h->y - (h->x+1)/2; + } else { + /* need to round toward -inf, not toward zero, so x-1 */ + h->y = -h->y - h->x/2; + } + h->iso = 0; + + return 1; + } + + static + int hex_iso(struct hex *h) { + if (h->iso) return 1; + + if (h->x >= 0) { + h->y = (-h->y - (h->x+1)/2); + } else { + /* need to round toward -inf, not toward zero, so x-1 */ + h->y = (-h->y - (h->x)/2); + } + + h->z = -h->x - h->y; + h->iso = 1; + return 1; + } + + static + int hexbin2(int horizontal, double width, double x, double y, + int *i, int *j) { + double z, rx, ry, rz; + double abs_dx, abs_dy, abs_dz; + int ix, iy, iz, s; + struct hex h; + + x = x / cos(30 * M_PI / 180.0); /* rotated X coord */ + y = y - x / 2.0; /* adjustment for rotated X */ + + /* adjust for actual hexwidth */ + x /= width; + y /= width; + + z = -x - y; + + ix = rx = floor(x + 0.5); + iy = ry = floor(y + 0.5); + iz = rz = floor(z + 0.5); + + s = ix + iy + iz; + + if (s) { + abs_dx = fabs(rx - x); + abs_dy = fabs(ry - y); + abs_dz = fabs(rz - z); + + if (abs_dx >= abs_dy && abs_dx >= abs_dz) { + ix -= s; + } else if (abs_dy >= abs_dx && abs_dy >= abs_dz) { + iy -= s; + } else { + iz -= s; + } + } + h.x = ix; + h.y = iy; + h.z = iz; + h.iso = 1; + + hex_xy(&h); + *i = h.x; + *j = h.y; + return ix * 100 + iy; + } + + enum isea_poly { ISEA_NONE, ISEA_ICOSAHEDRON = 20 }; + enum isea_topology { ISEA_HEXAGON=6, ISEA_TRIANGLE=3, ISEA_DIAMOND=4 }; + enum isea_address_form { ISEA_GEO, ISEA_Q2DI, ISEA_SEQNUM, ISEA_INTERLEAVE, + ISEA_PLANE, ISEA_Q2DD, ISEA_PROJTRI, ISEA_VERTEX2DD, ISEA_HEX + }; + + struct isea_dgg { + int polyhedron; /* ignored, icosahedron */ + double o_lat, o_lon, o_az; /* orientation, radians */ + int pole; /* true if standard snyder */ + int topology; /* ignored, hexagon */ + int aperture; /* valid values depend on partitioning method */ + int resolution; + double radius; /* radius of the earth in meters, ignored 1.0 */ + int output; /* an isea_address_form */ + int triangle; /* triangle of last transformed point */ + int quad; /* quad of last transformed point */ + unsigned long serial; + }; + + struct isea_pt { + double x, y; + }; + + struct isea_geo { + double lon, lat; + }; + + struct isea_address { + int type; /* enum isea_address_form */ + int number; + double x,y; /* or i,j or lon,lat depending on type */ + }; + + /* ENDINC */ + + enum snyder_polyhedron { + SNYDER_POLY_HEXAGON, SNYDER_POLY_PENTAGON, + SNYDER_POLY_TETRAHEDRON, SNYDER_POLY_CUBE, + SNYDER_POLY_OCTAHEDRON, SNYDER_POLY_DODECAHEDRON, + SNYDER_POLY_ICOSAHEDRON + }; + + struct snyder_constants { + double g, G, theta, ea_w, ea_a, ea_b, g_w, g_a, g_b; + }; + + /* TODO put these in radians to avoid a later conversion */ + static + struct snyder_constants constants[] = { + {23.80018260, 62.15458023, 60.0, 3.75, 1.033, 0.968, 5.09, 1.195, 1.0}, + {20.07675127, 55.69063953, 54.0, 2.65, 1.030, 0.983, 3.59, 1.141, 1.027}, + {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}, + {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}, + {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}, + {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}, + {37.37736814, 36.0, 30.0, 17.27, 1.163, 0.860, 13.14, 1.584, 1.0}, + }; + + + /* sqrt(5)/M_PI */ + + /* 26.565051177 degrees */ + + + static + struct isea_geo vertex[] = { + {0.0, DEG90}, + {DEG180, V_LAT}, + {-DEG108, V_LAT}, + {-DEG36, V_LAT}, + {DEG36, V_LAT}, + {DEG108, V_LAT}, + {-DEG144, -V_LAT}, + {-DEG72, -V_LAT}, + {0.0, -V_LAT}, + {DEG72, -V_LAT}, + {DEG144, -V_LAT}, + {0.0, -DEG90} + }; + + /* TODO make an isea_pt array of the vertices as well */ + + static int tri_v1[] = {0, 0, 0, 0, 0, 0, 6, 7, 8, 9, 10, 2, 3, 4, 5, 1, 11, 11, 11, 11, 11}; + + /* 52.62263186 */ + + /* 10.81231696 */ + + /* triangle Centers */ + struct isea_geo icostriangles[] = { + {0.0, 0.0}, + {-DEG144, E_RAD}, + {-DEG72, E_RAD}, + {0.0, E_RAD}, + {DEG72, E_RAD}, + {DEG144, E_RAD}, + {-DEG144, F_RAD}, + {-DEG72, F_RAD}, + {0.0, F_RAD}, + {DEG72, F_RAD}, + {DEG144, F_RAD}, + {-DEG108, -F_RAD}, + {-DEG36, -F_RAD}, + {DEG36, -F_RAD}, + {DEG108, -F_RAD}, + {DEG180, -F_RAD}, + {-DEG108, -E_RAD}, + {-DEG36, -E_RAD}, + {DEG36, -E_RAD}, + {DEG108, -E_RAD}, + {DEG180, -E_RAD}, + }; + + static double + az_adjustment(int triangle) + { + double adj; + + struct isea_geo v; + struct isea_geo c; + + v = vertex[tri_v1[triangle]]; + c = icostriangles[triangle]; + + /* TODO looks like the adjustment is always either 0 or 180 */ + /* at least if you pick your vertex carefully */ + adj = atan2(cos(v.lat) * sin(v.lon - c.lon), + cos(c.lat) * sin(v.lat) + - sin(c.lat) * cos(v.lat) * cos(v.lon - c.lon)); + return adj; + } + + /* R tan(g) sin(60) */ + + /* H = 0.25 R tan g = */ + + + static + struct isea_pt + isea_triangle_xy(int triangle) + { + struct isea_pt c; + double Rprime = 0.91038328153090290025; + + triangle = (triangle - 1) % 20; + + c.x = TABLE_G * ((triangle % 5) - 2) * 2.0; + if (triangle > 9) { + c.x += TABLE_G; + } + switch (triangle / 5) { + case 0: + c.y = 5.0 * TABLE_H; + break; + case 1: + c.y = TABLE_H; + break; + case 2: + c.y = -TABLE_H; + break; + case 3: + c.y = -5.0 * TABLE_H; + break; + default: + /* should be impossible */ + exit(EXIT_FAILURE); + }; + c.x *= Rprime; + c.y *= Rprime; + + return c; + } + + /* snyder eq 14 */ + static double + sph_azimuth(double f_lon, double f_lat, double t_lon, double t_lat) + { + double az; + + az = atan2(cos(t_lat) * sin(t_lon - f_lon), + cos(f_lat) * sin(t_lat) + - sin(f_lat) * cos(t_lat) * cos(t_lon - f_lon) + ); + return az; + } + + /* coord needs to be in radians */ + static + int + isea_snyder_forward(struct isea_geo * ll, struct isea_pt * out) + { + int i; + + double g; + + double G; + + double theta; + + /* additional variables from snyder */ + double q, Rprime, H, Ag, Azprime, Az, dprime, f, rho, + x, y; + + /* variables used to store intermediate results */ + double cot_theta, tan_g, az_offset; + + /* how many multiples of 60 degrees we adjust the azimuth */ + int Az_adjust_multiples; + + struct snyder_constants c; + + + /* TODO put these constants in as radians to begin with */ + c = constants[SNYDER_POLY_ICOSAHEDRON]; + theta = c.theta * DEG2RAD; + g = c.g * DEG2RAD; + G = c.G * DEG2RAD; + + for (i = 1; i <= 20; i++) { + double z; + struct isea_geo center; + + center = icostriangles[i]; + + /* step 1 */ + #if 0 + z = sph_distance(center.lon, center.lat, ll->lon, ll->lat); + #else + z = acos(sin(center.lat) * sin(ll->lat) + + cos(center.lat) * cos(ll->lat) * cos(ll->lon - center.lon)); + #endif + + /* not on this triangle */ + if (z > g + 0.000005) { /* TODO DBL_EPSILON */ + continue; + } + Az = sph_azimuth(ll->lon, ll->lat, center.lon, center.lat); + + Az = atan2(cos(ll->lat) * sin(ll->lon - center.lon), + cos(center.lat) * sin(ll->lat) + - sin(center.lat) * cos(ll->lat) * cos(ll->lon - center.lon) + ); + + /* step 2 */ + + /* This calculates "some" vertex coordinate */ + az_offset = az_adjustment(i); + + Az -= az_offset; + + /* TODO I don't know why we do this. It's not in snyder */ + /* maybe because we should have picked a better vertex */ + if (Az < 0.0) { + Az += 2.0 * M_PI; + } + + Az_adjust_multiples = 0; + while (Az < 0.0) { + Az += DEG120; + Az_adjust_multiples--; + } + while (Az > DEG120 + DBL_EPSILON) { + Az -= DEG120; + Az_adjust_multiples++; + } + + /* step 3 */ + cot_theta = 1.0 / tan(theta); + tan_g = tan(g); /* TODO this is a constant */ + + /* Calculate q from eq 9. */ + /* TODO cot_theta is cot(30) */ + q = atan2(tan_g, cos(Az) + sin(Az) * cot_theta); + + /* not in this triangle */ + if (z > q + 0.000005) { + continue; + } + /* step 4 */ + + /* Apply equations 5-8 and 10-12 in order */ + + /* eq 5 */ + /* Rprime = 0.9449322893 * R; */ + /* R' in the paper is for the truncated */ + Rprime = 0.91038328153090290025; + + /* eq 6 */ + H = acos(sin(Az) * sin(G) * cos(g) - cos(Az) * cos(G)); + + /* eq 7 */ + /* Ag = (Az + G + H - DEG180) * M_PI * R * R / DEG180; */ + Ag = Az + G + H - DEG180; + + /* eq 8 */ + Azprime = atan2(2.0 * Ag, Rprime * Rprime * tan_g * tan_g - 2.0 * Ag * cot_theta); + + /* eq 10 */ + /* cot(theta) = 1.73205080756887729355 */ + dprime = Rprime * tan_g / (cos(Azprime) + sin(Azprime) * cot_theta); + + /* eq 11 */ + f = dprime / (2.0 * Rprime * sin(q / 2.0)); + + /* eq 12 */ + rho = 2.0 * Rprime * f * sin(z / 2.0); + + + Azprime += DEG120 * Az_adjust_multiples; + + /* calculate rectangular coordinates */ + + x = rho * sin(Azprime); + y = rho * cos(Azprime); + + + out->x = x; + out->y = y; + + return i; + } + + + fprintf(stderr, "impossible transform: %f %f is not on any triangle\n", + ll->lon * RAD2DEG, ll->lat * RAD2DEG); + + exit(EXIT_FAILURE); + + /* not reached */ + return 0; /* supresses a warning */ + } + + + + /* formula from Snyder, Map Projections: A working manual, p31 */ + static + struct isea_geo + snyder_ctran(struct isea_geo * np, struct isea_geo * pt) + { + struct isea_geo npt; + double alpha, phi, lambda, lambda0, beta, lambdap, phip; + double sin_phip; + double lp_b; /* lambda prime minus beta */ + double cos_p, sin_a; + + phi = pt->lat; + lambda = pt->lon; + alpha = np->lat; + beta = np->lon; + lambda0 = beta; + + cos_p = cos(phi); + sin_a = sin(alpha); + + /* mpawm 5-7 */ + sin_phip = sin_a * sin(phi) - cos(alpha) * cos_p * cos(lambda - lambda0); + + /* mpawm 5-8b */ + + /* use the two argument form so we end up in the right quadrant */ + lp_b = atan2(cos_p * sin(lambda - lambda0), + (sin_a * cos_p * cos(lambda - lambda0) + cos(alpha) * sin(phi))); + + lambdap = lp_b + beta; + + /* normalize longitude */ + /* TODO can we just do a modulus ? */ + lambdap = fmod(lambdap, 2 * M_PI); + while (lambdap > M_PI) + lambdap -= 2 * M_PI; + while (lambdap < -M_PI) + lambdap += 2 * M_PI; + + phip = asin(sin_phip); + + npt.lat = phip; + npt.lon = lambdap; + + return npt; + } + + static + struct isea_geo + isea_ctran(struct isea_geo * np, struct isea_geo * pt, double lon0) + { + struct isea_geo npt; + + np->lon += M_PI; + npt = snyder_ctran(np, pt); + np->lon -= M_PI; + + npt.lon -= (M_PI - lon0 + np->lon); + + npt.lon += M_PI; + /* normalize longitude */ + npt.lon = fmod(npt.lon, 2 * M_PI); + while (npt.lon > M_PI) + npt.lon -= 2 * M_PI; + while (npt.lon < -M_PI) + npt.lon += 2 * M_PI; + + return npt; + } + + /* in radians */ + + /* fuller's at 5.2454 west, 2.3009 N, adjacent at 7.46658 deg */ + + static + int + isea_grid_init(struct isea_dgg * g) + { + if (!g) + return 0; + + g->polyhedron = 20; + g->o_lat = ISEA_STD_LAT; + g->o_lon = ISEA_STD_LON; + g->o_az = 0.0; + g->aperture = 4; + g->resolution = 6; + g->radius = 1.0; + g->topology = 6; + + return 1; + } + + static + int + isea_orient_isea(struct isea_dgg * g) + { + if (!g) + return 0; + g->o_lat = ISEA_STD_LAT; + g->o_lon = ISEA_STD_LON; + g->o_az = 0.0; + return 1; + } + + static + int + isea_orient_pole(struct isea_dgg * g) + { + if (!g) + return 0; + g->o_lat = M_PI / 2.0; + g->o_lon = 0.0; + g->o_az = 0; + return 1; + } + + static + int + isea_transform(struct isea_dgg * g, struct isea_geo * in, + struct isea_pt * out) + { + struct isea_geo i, pole; + int tri; + + pole.lat = g->o_lat; + pole.lon = g->o_lon; + + i = isea_ctran(&pole, in, g->o_az); + + tri = isea_snyder_forward(&i, out); + out->x *= g->radius; + out->y *= g->radius; + g->triangle = tri; + + return tri; + } + + + static + void + isea_rotate(struct isea_pt * pt, double degrees) + { + double rad; + + double x, y; + + rad = -degrees * M_PI / 180.0; + while (rad >= 2.0 * M_PI) rad -= 2.0 * M_PI; + while (rad <= -2.0 * M_PI) rad += 2.0 * M_PI; + + x = pt->x * cos(rad) + pt->y * sin(rad); + y = -pt->x * sin(rad) + pt->y * cos(rad); + + pt->x = x; + pt->y = y; + } + + static + int isea_tri_plane(int tri, struct isea_pt *pt, double radius) { + struct isea_pt tc; /* center of triangle */ + + if (DOWNTRI(tri)) { + isea_rotate(pt, 180.0); + } + tc = isea_triangle_xy(tri); + tc.x *= radius; + tc.y *= radius; + pt->x += tc.x; + pt->y += tc.y; + + return tri; + } + + /* convert projected triangle coords to quad xy coords, return quad number */ + static + int + isea_ptdd(int tri, struct isea_pt *pt) { + int downtri, quad; + + downtri = (((tri - 1) / 5) % 2 == 1); + quad = ((tri - 1) % 5) + ((tri - 1) / 10) * 5 + 1; + + isea_rotate(pt, downtri ? 240.0 : 60.0); + if (downtri) { + pt->x += 0.5; + /* pt->y += cos(30.0 * M_PI / 180.0); */ + pt->y += .86602540378443864672; + } + return quad; + } + + static + int + isea_dddi_ap3odd(struct isea_dgg *g, int quad, struct isea_pt *pt, struct isea_pt *di) + { + struct isea_pt v; + double hexwidth; + double sidelength; /* in hexes */ + int d, i; + int maxcoord; + struct hex h; + + /* This is the number of hexes from apex to base of a triangle */ + sidelength = (pow(2.0, g->resolution) + 1.0) / 2.0; + + /* apex to base is cos(30deg) */ + hexwidth = cos(M_PI / 6.0) / sidelength; + + /* TODO I think sidelength is always x.5, so + * (int)sidelength * 2 + 1 might be just as good + */ + maxcoord = (int) (sidelength * 2.0 + 0.5); + + v = *pt; + hexbin2(0, hexwidth, v.x, v.y, &h.x, &h.y); + h.iso = 0; + hex_iso(&h); + + d = h.x - h.z; + i = h.x + h.y + h.y; + + if (quad <= 5) { + if (d == 0 && i == maxcoord) { + /* north pole */ + quad = 0; + d = 0; + i = 0; + } else if (i == maxcoord) { + /* upper right in next quad */ + quad += 1; + if (quad == 6) + quad = 1; + i = maxcoord - d; + d = 0; + } else if (d == maxcoord) { + /* lower right in quad to lower right */ + quad += 5; + d = 0; + } + } else if (quad >= 6) { + if (i == 0 && d == maxcoord) { + /* south pole */ + quad = 11; + d = 0; + i = 0; + } else if (d == maxcoord) { + /* lower right in next quad */ + quad += 1; + if (quad == 11) + quad = 6; + d = maxcoord - i; + i = 0; + } else if (i == maxcoord) { + /* upper right in quad to upper right */ + quad = (quad - 4) % 5; + i = 0; + } + } + + di->x = d; + di->y = i; + + g->quad = quad; + return quad; + } + + static + int + isea_dddi(struct isea_dgg *g, int quad, struct isea_pt *pt, struct isea_pt *di) { + struct isea_pt v; + double hexwidth; + int sidelength; /* in hexes */ + struct hex h; + + if (g->aperture == 3 && g->resolution % 2 != 0) { + return isea_dddi_ap3odd(g, quad, pt, di); + } + /* todo might want to do this as an iterated loop */ + if (g->aperture >0) { + sidelength = (int) (pow(g->aperture, g->resolution / 2.0) + 0.5); + } else { + sidelength = g->resolution; + } + + hexwidth = 1.0 / sidelength; + + v = *pt; + isea_rotate(&v, -30.0); + hexbin2(0, hexwidth, v.x, v.y, &h.x, &h.y); + h.iso = 0; + hex_iso(&h); + + /* we may actually be on another quad */ + if (quad <= 5) { + if (h.x == 0 && h.z == -sidelength) { + /* north pole */ + quad = 0; + h.z = 0; + h.y = 0; + h.x = 0; + } else if (h.z == -sidelength) { + quad = quad + 1; + if (quad == 6) + quad = 1; + h.y = sidelength - h.x; + h.z = h.x - sidelength; + h.x = 0; + } else if (h.x == sidelength) { + quad += 5; + h.y = -h.z; + h.x = 0; + } + } else if (quad >= 6) { + if (h.z == 0 && h.x == sidelength) { + /* south pole */ + quad = 11; + h.x = 0; + h.y = 0; + h.z = 0; + } else if (h.x == sidelength) { + quad = quad + 1; + if (quad == 11) + quad = 6; + h.x = h.y + sidelength; + h.y = 0; + h.z = -h.x; + } else if (h.y == -sidelength) { + quad -= 4; + h.y = 0; + h.z = -h.x; + } + } + di->x = h.x; + di->y = -h.z; + + g->quad = quad; + return quad; + } + + static + int isea_ptdi(struct isea_dgg *g, int tri, struct isea_pt *pt, + struct isea_pt *di) { + struct isea_pt v; + int quad; + + v = *pt; + quad = isea_ptdd(tri, &v); + quad = isea_dddi(g, quad, &v, di); + return quad; + } + + /* q2di to seqnum */ + static + int isea_disn(struct isea_dgg *g, int quad, struct isea_pt *di) { + int sidelength; + int sn, height; + int hexes; + + if (quad == 0) { + g->serial = 1; + return g->serial; + } + /* hexes in a quad */ + hexes = (int) (pow(g->aperture, g->resolution) + 0.5); + if (quad == 11) { + g->serial = 1 + 10 * hexes + 1; + return g->serial; + } + if (g->aperture == 3 && g->resolution % 2 == 1) { + height = (int) (pow(g->aperture, (g->resolution - 1) / 2.0)); + sn = ((int) di->x) * height; + sn += ((int) di->y) / height; + sn += (quad - 1) * hexes; + sn += 2; + } else { + sidelength = (int) (pow(g->aperture, g->resolution / 2.0) + 0.5); + sn = (quad - 1) * hexes + sidelength * di->x + di->y + 2; + } + + g->serial = sn; + return sn; + } + + /* TODO just encode the quad in the d or i coordinate + * quad is 0-11, which can be four bits. + * d' = d << 4 + q, d = d' >> 4, q = d' & 0xf + */ + /* convert a q2di to global hex coord */ + static + int isea_hex(struct isea_dgg *g, int tri, + struct isea_pt *pt, struct isea_pt *hex) { + struct isea_pt v; + int sidelength; + int d, i, x, y, quad; + + quad = isea_ptdi(g, tri, pt, &v); + + hex->x = ((int)v.x << 4) + quad; + hex->y = v.y; + + return 1; + + d = v.x; + i = v.y; + + /* Aperture 3 odd resolutions */ + if (g->aperture == 3 && g->resolution % 2 != 0) { + int offset = (int)(pow(3.0, g->resolution - 1) + 0.5); + + d += offset * ((g->quad-1) % 5); + i += offset * ((g->quad-1) % 5); + + if (quad == 0) { + d = 0; + i = offset; + } else if (quad == 11) { + d = 2 * offset; + i = 0; + } else if (quad > 5) { + d += offset; + } + + x = (2*d - i) /3; + y = (2*i - d) /3; + + hex->x = x + offset / 3; + hex->y = y + 2 * offset / 3; + return 1; + } + + /* aperture 3 even resolutions and aperture 4 */ + sidelength = (int) (pow(g->aperture, g->resolution / 2.0) + 0.5); + if (g->quad == 0) { + hex->x = 0; + hex->y = sidelength; + } else if (g->quad == 11) { + hex->x = sidelength * 2; + hex->y = 0; + } else { + hex->x = d + sidelength * ((g->quad-1) % 5); + if (g->quad > 5) hex->x += sidelength; + hex->y = i + sidelength * ((g->quad-1) % 5); + } + + return 1; + } + + static + struct isea_pt + isea_forward(struct isea_dgg *g, struct isea_geo *in) + { + int tri, downtri; + struct isea_pt out, coord; + + tri = isea_transform(g, in, &out); + + downtri = (((tri - 1) / 5) % 2 == 1); + + if (g->output == ISEA_PLANE) { + isea_tri_plane(tri, &out, g->radius); + return out; + } + + /* convert to isea standard triangle size */ + out.x = out.x / g->radius * ISEA_SCALE; + out.y = out.y / g->radius * ISEA_SCALE; + out.x += 0.5; + out.y += 2.0 * .14433756729740644112; + + switch (g->output) { + case ISEA_PROJTRI: + /* nothing to do, already in projected triangle */ + break; + case ISEA_VERTEX2DD: + g->quad = isea_ptdd(tri, &out); + break; + case ISEA_Q2DD: + /* Same as above, we just don't print as much */ + g->quad = isea_ptdd(tri, &out); + break; + case ISEA_Q2DI: + g->quad = isea_ptdi(g, tri, &out, &coord); + return coord; + break; + case ISEA_SEQNUM: + isea_ptdi(g, tri, &out, &coord); + /* disn will set g->serial */ + isea_disn(g, g->quad, &coord); + return coord; + break; + case ISEA_HEX: + isea_hex(g, tri, &out, &coord); + return coord; + break; + } + + return out; + } + + struct par_isea + { + struct isea_dgg dgg; + }; + + // template class, using CRTP to implement forward/inverse + template + struct base_isea_spheroid : public base_t_f, + Geographic, Cartesian, Parameters> + { + + typedef double geographic_type; + typedef double cartesian_type; + + par_isea m_proj_parm; + + inline base_isea_spheroid(const Parameters& par) + : base_t_f, + Geographic, Cartesian, Parameters>(*this, par) {} + + inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const + { + struct isea_pt out; + struct isea_geo in; + + in.lon = lp_lon; + in.lat = lp_lat; + + isea_dgg copy = this->m_proj_parm.dgg; + out = isea_forward(©, &in); + + xy_x = out.x; + xy_y = out.y; + } + }; + + // Icosahedral Snyder Equal Area + template + void setup_isea(Parameters& par, par_isea& proj_parm) + { + std::string opt; + // par.fwd = s_forward; + isea_grid_init(&proj_parm.dgg); + proj_parm.dgg.output = ISEA_PLANE; + /* proj_parm.dgg.radius = par.a; + / * otherwise defaults to 1 */ + /* calling library will scale, I think */ + opt = pj_param(par.params, "sorient").s; + if (! opt.empty()) { + if (opt == std::string("isea")) { + isea_orient_isea(&proj_parm.dgg); + } else if (opt == std::string("pole")) { + isea_orient_pole(&proj_parm.dgg); + } else { + throw proj_exception(-34); + } + } + if (pj_param(par.params, "tazi").i) { + proj_parm.dgg.o_az = pj_param(par.params, "razi").f; + } + if (pj_param(par.params, "tlon_0").i) { + proj_parm.dgg.o_lon = pj_param(par.params, "rlon_0").f; + } + if (pj_param(par.params, "tlat_0").i) { + proj_parm.dgg.o_lat = pj_param(par.params, "rlat_0").f; + } + if (pj_param(par.params, "taperture").i) { + proj_parm.dgg.aperture = pj_param(par.params, "iaperture").i; + } + if (pj_param(par.params, "tresolution").i) { + proj_parm.dgg.resolution = pj_param(par.params, "iresolution").i; + } + opt = pj_param(par.params, "smode").s; + if (! opt.empty()) { + if (opt == std::string("plane")) { + proj_parm.dgg.output = ISEA_PLANE; + } else if (opt == std::string("di")) { + proj_parm.dgg.output = ISEA_Q2DI; + } + else if (opt == std::string("dd")) { + proj_parm.dgg.output = ISEA_Q2DD; + } + else if (opt == std::string("hex")) { + proj_parm.dgg.output = ISEA_HEX; + } + else { + /* TODO verify error code. Possibly eliminate magic */ + throw proj_exception(-34); + } + } + if (pj_param(par.params, "trescale").i) { + proj_parm.dgg.radius = ISEA_SCALE; + } + if (pj_param(par.params, "tresolution").i) { + proj_parm.dgg.resolution = pj_param(par.params, "iresolution").i; + } else { + proj_parm.dgg.resolution = 4; + } + if (pj_param(par.params, "taperture").i) { + proj_parm.dgg.aperture = pj_param(par.params, "iaperture").i; + } else { + proj_parm.dgg.aperture = 3; + } + } + + }} // namespace detail::isea + #endif // doxygen + + /*! + \brief Icosahedral Snyder Equal Area projection + \ingroup projections + \tparam Geographic latlong point type + \tparam Cartesian xy point type + \tparam Parameters parameter type + \par Projection characteristics + - Spheroid + \par Example + \image html ex_isea.gif + */ + template + struct isea_spheroid : public detail::isea::base_isea_spheroid + { + inline isea_spheroid(const Parameters& par) : detail::isea::base_isea_spheroid(par) + { + detail::isea::setup_isea(this->m_par, this->m_proj_parm); + } + }; + + #ifndef DOXYGEN_NO_DETAIL + namespace detail + { + + // Factory entry(s) + template + class isea_entry : public detail::factory_entry + { + public : + virtual projection* create_new(const Parameters& par) const + { + return new base_v_f, Geographic, Cartesian, Parameters>(par); + } + }; + + template + inline void isea_init(detail::base_factory& factory) + { + factory.add_to_factory("isea", new isea_entry); + } + + } // namespace detail + #endif // doxygen + +}}} // namespace boost::geometry::projections + +#endif // BOOST_GEOMETRY_PROJECTIONS_ISEA_HPP + From 2ad12a62f358436e2079d23bb39d2403f55f0dc1 Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Wed, 29 Apr 2015 13:40:54 +0200 Subject: [PATCH 79/89] [projection] replace exit with throw --- .../boost/geometry/extensions/gis/projections/proj/isea.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/geometry/extensions/gis/projections/proj/isea.hpp b/include/boost/geometry/extensions/gis/projections/proj/isea.hpp index d82e4d174..f946023e7 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/isea.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/isea.hpp @@ -323,7 +323,7 @@ namespace boost { namespace geometry { namespace projections break; default: /* should be impossible */ - exit(EXIT_FAILURE); + throw proj_exception(); }; c.x *= Rprime; c.y *= Rprime; @@ -484,7 +484,7 @@ namespace boost { namespace geometry { namespace projections fprintf(stderr, "impossible transform: %f %f is not on any triangle\n", ll->lon * RAD2DEG, ll->lat * RAD2DEG); - exit(EXIT_FAILURE); + throw proj_exception(); /* not reached */ return 0; /* supresses a warning */ From c6eb7748eb19d9859eeff8a12d66c4fea2aece5b Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Wed, 29 Apr 2015 13:46:26 +0200 Subject: [PATCH 80/89] [projection] replace redundant comments --- .../boost/geometry/extensions/gis/projections/factory.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/boost/geometry/extensions/gis/projections/factory.hpp b/include/boost/geometry/extensions/gis/projections/factory.hpp index 0acb12eb7..5847cc5fe 100644 --- a/include/boost/geometry/extensions/gis/projections/factory.hpp +++ b/include/boost/geometry/extensions/gis/projections/factory.hpp @@ -28,7 +28,7 @@ #include #include #include -#include // control points XY +#include #include #include #include @@ -47,12 +47,12 @@ #include #include #include -#include // includes two other projections +#include #include #include #include #include -#include // xy functions after inverse +#include #include #include #include @@ -77,7 +77,7 @@ #include #include #include -#include // includes other projection +#include #include #include #include From 68eac273d3eb710cca72c8af06514d6dac90bcb4 Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Wed, 29 Apr 2015 14:56:48 +0200 Subject: [PATCH 81/89] [projections] expose error code --- .../geometry/extensions/gis/projections/impl/projects.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/boost/geometry/extensions/gis/projections/impl/projects.hpp b/include/boost/geometry/extensions/gis/projections/impl/projects.hpp index 89240c222..053594d1b 100644 --- a/include/boost/geometry/extensions/gis/projections/impl/projects.hpp +++ b/include/boost/geometry/extensions/gis/projections/impl/projects.hpp @@ -39,7 +39,6 @@ #include #include -#include #include namespace boost { namespace geometry { namespace projections @@ -176,9 +175,12 @@ class proj_exception public: proj_exception(int code = 0) + : m_code(code) { - boost::ignore_unused(code); } + int code() const { return m_code; } +private : + int m_code; }; }}} // namespace boost::geometry::projections From 4edcc4042e585d947f34738d5b5b9fc2ccd1140e Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Wed, 29 Apr 2015 14:57:27 +0200 Subject: [PATCH 82/89] [projections][test] add unit test for static projections (forward) including different models (spheroid/ellipsoid) --- extensions/test/gis/projections/Jamfile.v2 | 1 + .../gis/projections/projections_static.cpp | 385 ++++++++++++++++++ 2 files changed, 386 insertions(+) create mode 100644 extensions/test/gis/projections/projections_static.cpp diff --git a/extensions/test/gis/projections/Jamfile.v2 b/extensions/test/gis/projections/Jamfile.v2 index b57c8ebf5..232aef2b2 100644 --- a/extensions/test/gis/projections/Jamfile.v2 +++ b/extensions/test/gis/projections/Jamfile.v2 @@ -12,5 +12,6 @@ test-suite boost-geometry-extensions-gis-projections : [ run projection.cpp ] [ run projections.cpp ] + [ run projections_static.cpp ] [ run projection_epsg.cpp ] ; diff --git a/extensions/test/gis/projections/projections_static.cpp b/extensions/test/gis/projections/projections_static.cpp new file mode 100644 index 000000000..2599cb534 --- /dev/null +++ b/extensions/test/gis/projections/projections_static.cpp @@ -0,0 +1,385 @@ +// Boost.Geometry (aka GGL, Generic Geometry Library) +// Unit Test + +// Copyright (c) 2015 Barend Gehrels, Amsterdam, the Netherlands. + +// Use, modification and distribution is subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + + +#if defined(_MSC_VER) +#pragma warning( disable : 4305 ) // truncation double -> float +#endif // defined(_MSC_VER) + +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +//#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#include +#include + +#include +#include +#include +#include + + +template