1 #ifndef OSMIUM_GEOM_WKT_HPP
2 #define OSMIUM_GEOM_WKT_HPP
50 class WKTFactoryImpl {
57 using point_type = std::string;
58 using linestring_type = std::string;
59 using polygon_type = std::string;
60 using multipolygon_type = std::string;
61 using ring_type = std::string;
63 WKTFactoryImpl(
int precision = 7) :
64 m_precision(precision) {
70 std::string str {
"POINT"};
77 void linestring_start() {
78 m_str =
"LINESTRING(";
86 linestring_type linestring_finish(
size_t ) {
87 assert(!m_str.empty());
99 void multipolygon_start() {
100 m_str =
"MULTIPOLYGON(";
103 void multipolygon_polygon_start() {
107 void multipolygon_polygon_finish() {
111 void multipolygon_outer_ring_start() {
115 void multipolygon_outer_ring_finish() {
116 assert(!m_str.empty());
120 void multipolygon_inner_ring_start() {
124 void multipolygon_inner_ring_finish() {
125 assert(!m_str.empty());
134 multipolygon_type multipolygon_finish() {
135 assert(!m_str.empty());
149 template <
typename TProjection = IdentityProjection>
156 #endif // OSMIUM_GEOM_WKT_HPP
Definition: factory.hpp:146
void swap(Buffer &lhs, Buffer &rhs)
Definition: buffer.hpp:731
Namespace for everything in the Osmium library.
Definition: assembler.hpp:66
Definition: coordinates.hpp:46
void append_to_string(std::string &s, const char infix, int precision) const
Definition: coordinates.hpp:57