PROJ C++ API
|
Formatter to WKT strings. More...
#include <io.hpp>
Public Types | |
enum | Convention { Convention::WKT2, WKT2_2015 = WKT2, Convention::WKT2_SIMPLIFIED, WKT2_2015_SIMPLIFIED = WKT2_SIMPLIFIED, Convention::WKT2_2018, Convention::WKT2_2018_SIMPLIFIED, Convention::WKT1_GDAL } |
Public Member Functions | |
WKTFormatter & | setMultiLine (bool multiLine) |
Whether to use multi line output or not. | |
WKTFormatter & | setIndendationWidth (int width) |
Set number of spaces for each indentation level (defaults to 4). | |
WKTFormatter & | setStrict (bool strict) |
Set whether the formatter should operate on strict more or not. More... | |
bool | isStrict () const |
Returns whether the formatter is in strict mode. | |
const std::string & | toString () const |
Static Public Member Functions | |
static WKTFormatterNNPtr | create (Convention convention=Convention::WKT2) |
Constructs a new formatter. More... | |
static WKTFormatterNNPtr | create (const WKTFormatterNNPtr &other) |
Constructs a new formatter from another one. More... | |
Formatter to WKT strings.
An instance of this class can only be used by a single thread at a time.
|
strong |
WKT variant.
|
static |
Constructs a new formatter.
A formatter can be used only once (its internal state is mutated)
Its default behaviour can be adjusted with the different setters.
convention | WKT flavor. Defaults to Convention::WKT2 |
|
static |
Constructs a new formatter from another one.
A formatter can be used only once (its internal state is mutated)
Its default behaviour can be adjusted with the different setters.
other | source formatter. |
WKTFormatter & osgeo::proj::io::WKTFormatter::setStrict | ( | bool | strictIn | ) |
Set whether the formatter should operate on strict more or not.
The default is strit mode, in which case a FormattingException can be thrown.
const std::string & osgeo::proj::io::WKTFormatter::toString | ( | ) | const |
Returns the WKT string from the formatter.