mirror of
https://github.com/boostorg/geometry.git
synced 2026-02-12 12:12:10 +00:00
Moved wkt (used in nearly all tests) from extension to domains tree for release
[SVN r69905]
This commit is contained in:
59
include/boost/geometry/domains/gis/io/io.hpp
Normal file
59
include/boost/geometry/domains/gis/io/io.hpp
Normal file
@@ -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 <boost/geometry/extensions/gis/io/wkt/read_wkt.hpp>
|
||||
#include <boost/geometry/extensions/gis/io/wkt/write_wkt.hpp>
|
||||
|
||||
#include <boost/geometry/extensions/gis/io/wkt/read_wkt_multi.hpp>
|
||||
#include <boost/geometry/extensions/gis/io/wkt/write_wkt_multi.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
struct format_wkt {};
|
||||
struct format_wkb {};
|
||||
struct format_dsv {};
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace dispatch
|
||||
{
|
||||
|
||||
template <typename Tag, typename Geometry>
|
||||
struct read
|
||||
{
|
||||
};
|
||||
|
||||
template <typename Geometry>
|
||||
struct read<format_wkt, Geometry>
|
||||
{
|
||||
static inline void apply(Geometry& geometry, std::string const& wkt)
|
||||
{
|
||||
read_wkt<typename tag<Geometry>::type, Geometry>::apply(wkt, geometry);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
} // namespace dispatch
|
||||
#endif // DOXYGEN_NO_DISPATCH
|
||||
|
||||
|
||||
|
||||
template <typename Format, typename Geometry>
|
||||
inline void read(Geometry& geometry, std::string const& wkt)
|
||||
{
|
||||
geometry::concept::check<Geometry>();
|
||||
dispatch::read<Format, Geometry>::apply(geometry, wkt);
|
||||
}
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_DOMAINS_GIS_IO_HPP
|
||||
@@ -9,7 +9,7 @@
|
||||
#define BOOST_GEOMETRY_MULTI_IO_WKT_DETAIL_WKT_HPP
|
||||
|
||||
|
||||
#include <boost/geometry/extensions/gis/io/wkt/write_wkt.hpp>
|
||||
#include <boost/geometry/domains/gis/io/wkt/write_wkt.hpp>
|
||||
#include <boost/geometry/multi/core/tags.hpp>
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
#include <boost/geometry/util/coordinate_cast.hpp>
|
||||
|
||||
#include <boost/geometry/extensions/gis/io/wkt/detail/wkt.hpp>
|
||||
#include <boost/geometry/domains/gis/io/wkt/detail/wkt.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
@@ -14,8 +14,8 @@
|
||||
#include <boost/geometry/multi/core/tags.hpp>
|
||||
#include <boost/geometry/multi/core/point_type.hpp>
|
||||
|
||||
#include <boost/geometry/extensions/gis/io/wkt/read_wkt.hpp>
|
||||
#include <boost/geometry/extensions/gis/io/wkt/detail/wkt_multi.hpp>
|
||||
#include <boost/geometry/domains/gis/io/wkt/read_wkt.hpp>
|
||||
#include <boost/geometry/domains/gis/io/wkt/detail/wkt_multi.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
@@ -9,11 +9,11 @@
|
||||
#define BOOST_GEOMETRY_EXTENSIONS_GIS_IO_WKT_WKT_HPP
|
||||
|
||||
|
||||
#include <boost/geometry/extensions/gis/io/wkt/read_wkt.hpp>
|
||||
#include <boost/geometry/extensions/gis/io/wkt/write_wkt.hpp>
|
||||
#include <boost/geometry/domains/gis/io/wkt/read_wkt.hpp>
|
||||
#include <boost/geometry/domains/gis/io/wkt/write_wkt.hpp>
|
||||
|
||||
#include <boost/geometry/extensions/gis/io/wkt/read_wkt_multi.hpp>
|
||||
#include <boost/geometry/extensions/gis/io/wkt/write_wkt_multi.hpp>
|
||||
#include <boost/geometry/domains/gis/io/wkt/read_wkt_multi.hpp>
|
||||
#include <boost/geometry/domains/gis/io/wkt/write_wkt_multi.hpp>
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_EXTENSIONS_GIS_IO_WKT_WKT_HPP
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <boost/geometry/geometries/concepts/check.hpp>
|
||||
#include <boost/geometry/geometries/ring.hpp>
|
||||
|
||||
#include <boost/geometry/extensions/gis/io/wkt/detail/wkt.hpp>
|
||||
#include <boost/geometry/domains/gis/io/wkt/detail/wkt.hpp>
|
||||
|
||||
|
||||
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<sequence>::apply(os, points);
|
||||
}
|
||||
@@ -12,8 +12,8 @@
|
||||
|
||||
#include <boost/geometry/multi/core/tags.hpp>
|
||||
|
||||
#include <boost/geometry/extensions/gis/io/wkt/write_wkt.hpp>
|
||||
#include <boost/geometry/extensions/gis/io/wkt/detail/wkt_multi.hpp>
|
||||
#include <boost/geometry/domains/gis/io/wkt/write_wkt.hpp>
|
||||
#include <boost/geometry/domains/gis/io/wkt/detail/wkt_multi.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
Reference in New Issue
Block a user