from_wkt.hpp 854 B

12345678910111213141516171819202122232425262728
  1. // Boost.Geometry (aka GGL, Generic Geometry Library)
  2. // Unit Tests
  3. // Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
  4. // Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
  5. // Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
  6. // Copyright (c) 2013-2015 Adam Wulkiewicz, Lodz, Poland.
  7. // Use, modification and distribution is subject to the Boost Software License,
  8. // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  9. // http://www.boost.org/LICENSE_1_0.txt)
  10. #ifndef BOOST_GEOMETRY_TEST_FROM_WKT_HPP
  11. #define BOOST_GEOMETRY_TEST_FROM_WKT_HPP
  12. #include <string>
  13. #include <boost/geometry/io/wkt/read.hpp>
  14. template <typename Geometry>
  15. inline Geometry from_wkt(std::string const& wkt)
  16. {
  17. Geometry result;
  18. boost::geometry::read_wkt(wkt, result);
  19. return result;
  20. }
  21. #endif // BOOST_GEOMETRY_TEST_FROM_WKT_HPP