1#ifndef OSMIUM_GEOM_WKT_HPP
2#define OSMIUM_GEOM_WKT_HPP
55 class WKTFactoryImpl {
57 std::string m_srid_prefix;
64 using point_type = std::string;
65 using linestring_type = std::string;
66 using polygon_type = std::string;
67 using multipolygon_type = std::string;
68 using ring_type = std::string;
71 m_precision(precision),
74 m_srid_prefix =
"SRID=";
75 m_srid_prefix += std::to_string(srid);
83 std::string str{m_srid_prefix};
91 void linestring_start() {
92 m_str = m_srid_prefix;
93 m_str +=
"LINESTRING(";
101 linestring_type linestring_finish(
size_t ) {
102 assert(!m_str.empty());
113 void polygon_start() {
114 m_str = m_srid_prefix;
115 m_str +=
"POLYGON((";
123 polygon_type polygon_finish(
size_t ) {
124 assert(!m_str.empty());
137 void multipolygon_start() {
138 m_str = m_srid_prefix;
139 m_str +=
"MULTIPOLYGON(";
142 void multipolygon_polygon_start() {
146 void multipolygon_polygon_finish() {
150 void multipolygon_outer_ring_start() {
154 void multipolygon_outer_ring_finish() {
155 assert(!m_str.empty());
159 void multipolygon_inner_ring_start() {
163 void multipolygon_inner_ring_finish() {
164 assert(!m_str.empty());
173 multipolygon_type multipolygon_finish() {
174 assert(!m_str.empty());
188 template <
typename TProjection = IdentityProjection>
Definition: factory.hpp:149
wkt_type
Definition: wkt.hpp:48
Namespace for everything in the Osmium library.
Definition: assembler.hpp:53
Definition: coordinates.hpp:48
void append_to_string(std::string &s, const char infix, int precision) const
Definition: coordinates.hpp:100