1 #ifndef OSMIUM_GEOM_WKT_HPP
2 #define OSMIUM_GEOM_WKT_HPP
50 class WKTFactoryImpl {
57 typedef std::string point_type;
58 typedef std::string linestring_type;
59 typedef std::string polygon_type;
60 typedef std::string multipolygon_type;
61 typedef std::string ring_type;
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:721
Namespace for everything in the Osmium library.
Definition: assembler.hpp:59
Definition: coordinates.hpp:46
void append_to_string(std::string &s, const char infix, int precision) const
Definition: coordinates.hpp:57