diff --git a/include/boost/geometry/domains/gis/io/io.hpp b/include/boost/geometry/domains/gis/io/io.hpp new file mode 100644 index 000000000..422ebfee7 --- /dev/null +++ b/include/boost/geometry/domains/gis/io/io.hpp @@ -0,0 +1,59 @@ +// Boost.Geometry (aka GGL, Generic Geometry Library) +// +// Copyright Barend Gehrels 2008-2009, Geodan, 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) + +#ifndef BOOST_GEOMETRY_DOMAINS_GIS_IO_HPP +#define BOOST_GEOMETRY_DOMAINS_GIS_IO_HPP + + +#include +#include + +#include +#include + +namespace boost { namespace geometry +{ + +struct format_wkt {}; +struct format_wkb {}; +struct format_dsv {}; + +#ifndef DOXYGEN_NO_DISPATCH +namespace dispatch +{ + +template +struct read +{ +}; + +template +struct read +{ + static inline void apply(Geometry& geometry, std::string const& wkt) + { + read_wkt::type, Geometry>::apply(wkt, geometry); + } +}; + + +} // namespace dispatch +#endif // DOXYGEN_NO_DISPATCH + + + +template +inline void read(Geometry& geometry, std::string const& wkt) +{ + geometry::concept::check(); + dispatch::read::apply(geometry, wkt); +} + +}} // namespace boost::geometry + + +#endif // BOOST_GEOMETRY_DOMAINS_GIS_IO_HPP diff --git a/include/boost/geometry/extensions/gis/io/wkt/detail/wkt.hpp b/include/boost/geometry/domains/gis/io/wkt/detail/wkt.hpp similarity index 100% rename from include/boost/geometry/extensions/gis/io/wkt/detail/wkt.hpp rename to include/boost/geometry/domains/gis/io/wkt/detail/wkt.hpp diff --git a/include/boost/geometry/extensions/gis/io/wkt/detail/wkt_multi.hpp b/include/boost/geometry/domains/gis/io/wkt/detail/wkt_multi.hpp similarity index 94% rename from include/boost/geometry/extensions/gis/io/wkt/detail/wkt_multi.hpp rename to include/boost/geometry/domains/gis/io/wkt/detail/wkt_multi.hpp index b8947e124..b1ec6d8a7 100644 --- a/include/boost/geometry/extensions/gis/io/wkt/detail/wkt_multi.hpp +++ b/include/boost/geometry/domains/gis/io/wkt/detail/wkt_multi.hpp @@ -9,7 +9,7 @@ #define BOOST_GEOMETRY_MULTI_IO_WKT_DETAIL_WKT_HPP -#include +#include #include diff --git a/include/boost/geometry/extensions/gis/io/wkt/read_wkt.hpp b/include/boost/geometry/domains/gis/io/wkt/read_wkt.hpp similarity index 99% rename from include/boost/geometry/extensions/gis/io/wkt/read_wkt.hpp rename to include/boost/geometry/domains/gis/io/wkt/read_wkt.hpp index 176be813d..ac917788a 100644 --- a/include/boost/geometry/extensions/gis/io/wkt/read_wkt.hpp +++ b/include/boost/geometry/domains/gis/io/wkt/read_wkt.hpp @@ -37,7 +37,7 @@ #include -#include +#include namespace boost { namespace geometry { diff --git a/include/boost/geometry/extensions/gis/io/wkt/read_wkt_multi.hpp b/include/boost/geometry/domains/gis/io/wkt/read_wkt_multi.hpp similarity index 95% rename from include/boost/geometry/extensions/gis/io/wkt/read_wkt_multi.hpp rename to include/boost/geometry/domains/gis/io/wkt/read_wkt_multi.hpp index c9d9a4f3b..797a2d2ea 100644 --- a/include/boost/geometry/extensions/gis/io/wkt/read_wkt_multi.hpp +++ b/include/boost/geometry/domains/gis/io/wkt/read_wkt_multi.hpp @@ -14,8 +14,8 @@ #include #include -#include -#include +#include +#include namespace boost { namespace geometry diff --git a/include/boost/geometry/extensions/gis/io/wkt/wkt.hpp b/include/boost/geometry/domains/gis/io/wkt/wkt.hpp similarity index 65% rename from include/boost/geometry/extensions/gis/io/wkt/wkt.hpp rename to include/boost/geometry/domains/gis/io/wkt/wkt.hpp index c5f9ac02b..c7e10b461 100644 --- a/include/boost/geometry/extensions/gis/io/wkt/wkt.hpp +++ b/include/boost/geometry/domains/gis/io/wkt/wkt.hpp @@ -9,11 +9,11 @@ #define BOOST_GEOMETRY_EXTENSIONS_GIS_IO_WKT_WKT_HPP -#include -#include +#include +#include -#include -#include +#include +#include #endif // BOOST_GEOMETRY_EXTENSIONS_GIS_IO_WKT_WKT_HPP diff --git a/include/boost/geometry/extensions/gis/io/wkt/write_wkt.hpp b/include/boost/geometry/domains/gis/io/wkt/write_wkt.hpp similarity index 98% rename from include/boost/geometry/extensions/gis/io/wkt/write_wkt.hpp rename to include/boost/geometry/domains/gis/io/wkt/write_wkt.hpp index 91e85c15b..5caa0fc33 100644 --- a/include/boost/geometry/extensions/gis/io/wkt/write_wkt.hpp +++ b/include/boost/geometry/domains/gis/io/wkt/write_wkt.hpp @@ -26,7 +26,7 @@ #include #include -#include +#include namespace boost { namespace geometry @@ -225,8 +225,8 @@ struct wkt_segment assign_point_from_index<0>(segment, points[0]); assign_point_from_index<1>(segment, points[1]); - // In Boost.Geometry a segment is represented - // in WKT-format like (for 2D): LINESTRING(x y,x y) + // In Boost.Geometry a segment is represented + // in WKT-format like (for 2D): LINESTRING(x y,x y) os << "LINESTRING"; wkt_sequence::apply(os, points); } diff --git a/include/boost/geometry/extensions/gis/io/wkt/write_wkt_multi.hpp b/include/boost/geometry/domains/gis/io/wkt/write_wkt_multi.hpp similarity index 95% rename from include/boost/geometry/extensions/gis/io/wkt/write_wkt_multi.hpp rename to include/boost/geometry/domains/gis/io/wkt/write_wkt_multi.hpp index a4643fbb3..54dde5c61 100644 --- a/include/boost/geometry/extensions/gis/io/wkt/write_wkt_multi.hpp +++ b/include/boost/geometry/domains/gis/io/wkt/write_wkt_multi.hpp @@ -12,8 +12,8 @@ #include -#include -#include +#include +#include namespace boost { namespace geometry