Skip to content

Commit

Permalink
[wkt] support tabs, newlines and code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
barendgehrels committed Jan 4, 2023
1 parent 6a7224e commit f92671b
Show file tree
Hide file tree
Showing 9 changed files with 291 additions and 314 deletions.
18 changes: 17 additions & 1 deletion doc/release_notes.qbk
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[/============================================================================
Boost.Geometry (aka GGL, Generic Geometry Library)

Copyright (c) 2009-2022 Barend Gehrels, Geodan, Amsterdam, the Netherlands.
Copyright (c) 2009-2023 Barend Gehrels, Geodan, Amsterdam, the Netherlands.
Copyright (c) 2009-2017 Bruno Lalande, Paris, France.
Copyright (c) 2009-2017 Mateusz Loskot <[email protected]>, London, UK.
Copyright (c) 2011-2017 Adam Wulkiewicz, Lodz, Poland.
Expand All @@ -19,6 +19,22 @@

[section:release_notes Release Notes]

[/=================]
[heading Boost 1.82]
[/=================]

[*Major improvements]

* [@https://github.com/boostorg/geometry/pull/1045 1045] Support geographic buffer for (multi)linestrings and (multi)polygons

[*Solved issues]

* [@https://github.com/boostorg/geometry/issues/705 705] WKT: allow tabs and new lines

[*Breaking changes]

* The WKT output presentation of an empty polygon is now POLYGON() to make it consistent with other geometries

[/=================]
[heading Boost 1.81]
[/=================]
Expand Down
16 changes: 15 additions & 1 deletion include/boost/geometry/io/wkt/detail/prefix.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Boost.Geometry (aka GGL, Generic Geometry Library)

// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
// Copyright (c) 2007-2022 Barend Gehrels, Amsterdam, the Netherlands.
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.

Expand Down Expand Up @@ -57,6 +57,20 @@ struct prefix_multipolygon
static inline const char* apply() { return "MULTIPOLYGON"; }
};

struct prefix_segment
{
static inline const char* apply() { return "SEGMENT"; }
};
struct prefix_box
{
static inline const char* apply() { return "BOX"; }
};
struct prefix_geometrycollection
{
static inline const char* apply() { return "GEOMETRYCOLLECTION"; }
};


}} // namespace wkt::impl
#endif

Expand Down
45 changes: 6 additions & 39 deletions include/boost/geometry/io/wkt/detail/wkt_multi.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Boost.Geometry (aka GGL, Generic Geometry Library)

// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
// Copyright (c) 2007-2022 Barend Gehrels, Amsterdam, the Netherlands.
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.

Expand All @@ -11,46 +11,13 @@
// 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_WKT_DETAIL_WKT_MULTI_HPP
#define BOOST_GEOMETRY_DOMAINS_GIS_IO_WKT_DETAIL_WKT_MULTI_HPP
#ifndef BOOST_GEOMETRY_IO_WKT_MULTI_HPP
#define BOOST_GEOMETRY_IO_WKT_MULTI_HPP

#include <boost/geometry/core/tags.hpp>
#include <boost/geometry/domains/gis/io/wkt/write.hpp>

#include <boost/config/pragma_message.hpp>
BOOST_PRAGMA_MESSAGE("This include file is deprecated and will be removed in the future.")

namespace boost { namespace geometry
{

#ifndef DOXYGEN_NO_DETAIL
namespace detail { namespace wkt
{

struct prefix_null
{
static inline const char* apply() { return ""; }
};

struct prefix_multipoint
{
static inline const char* apply() { return "MULTIPOINT"; }
};

struct prefix_multilinestring
{
static inline const char* apply() { return "MULTILINESTRING"; }
};

struct prefix_multipolygon
{
static inline const char* apply() { return "MULTIPOLYGON"; }
};



}} // namespace wkt::impl
#endif


}} // namespace boost::geometry

#endif // BOOST_GEOMETRY_DOMAINS_GIS_IO_WKT_DETAIL_WKT_MULTI_HPP
#endif // BOOST_GEOMETRY_IO_WKT_MULTI_HPP
Loading

0 comments on commit f92671b

Please sign in to comment.