summaryrefslogtreecommitdiff
path: root/libs/geometry/test/from_wkt.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/geometry/test/from_wkt.hpp')
-rw-r--r--libs/geometry/test/from_wkt.hpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/libs/geometry/test/from_wkt.hpp b/libs/geometry/test/from_wkt.hpp
new file mode 100644
index 000000000..a12dc051d
--- /dev/null
+++ b/libs/geometry/test/from_wkt.hpp
@@ -0,0 +1,29 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Tests
+
+// 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.
+
+// 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_TEST_FROM_WKT_HPP
+#define BOOST_GEOMETRY_TEST_FROM_WKT_HPP
+
+#include <string>
+
+#include <boost/geometry/io/wkt/read.hpp>
+#include <boost/geometry/multi/io/wkt/read.hpp>
+
+template <typename Geometry>
+inline Geometry from_wkt(std::string const& wkt)
+{
+ Geometry result;
+ boost::geometry::read_wkt(wkt, result);
+ return result;
+}
+
+#endif // BOOST_GEOMETRY_TEST_FROM_WKT_HPP