All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
WKTParser.h
Go to the documentation of this file.
1 /* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20 /*!
21  \file terralib/geometry/WKTParser.h
22 
23  \brief A class that implements the grammar rules for well known text (WKT) for Geometry.
24  It is based on boost::spirit V2 and WKT BNF definition available in the OGC Simple Features Specification.
25 
26  \warning Do not use this class. It is for TerraLib internal use. Try the te::gm::WKTReader instead.
27 */
28 
29 #ifndef __TERRALIB_GEOMETRY_INTERNAL_WKTPARSER_H
30 #define __TERRALIB_GEOMETRY_INTERNAL_WKTPARSER_H
31 
32 // TerraLib
33 #include "WKTActions.h"
34 
35 // boost
36 #include <boost/bind/bind.hpp>
37 #include <boost/spirit/include/qi.hpp>
38 
39 // STL
40 #include <iostream>
41 #include <string>
42 
43 // Auxiliaries namespaces
44 namespace qi = boost::spirit::qi;
45 namespace ascii = boost::spirit::ascii;
46 
47 // Using the following boost::spirit definitions
48 using qi::char_;
49 using qi::double_;
50 using ascii::no_case;
51 
52 namespace te
53 {
54  namespace gm
55  {
56  /*!
57  \class Parser
58 
59  \brief A class that implements the Grammar Rules for well known text (WKT) format of Geometry.
60  */
61  template<typename Iterator>
62  class WKTParser : public qi::grammar<Iterator, ascii::space_type>
63  {
64  public:
65 
66  /** @name Constructor
67  * Initilizer methods.
68  */
69  //@{
70 
71  /*! \brief Default constructor. */
72  WKTParser() : WKTParser::base_type(geometry)
73  {
74  // Geometries (root)
76 
77  // Initializing all rules
83  initPoint();
84  initLine();
85  initPolygon();
87  initMultiLine();
90  initTIN();
91  initTriangle();
93 
94  // Empty key word
95  empty = no_case["empty"] >> !char_;
96  }
97 
98  //@}
99 
100  private:
101 
102  /** @name Initializer methods.
103  * Methods to initialize the grammar rules.
104  */
105  //@{
106 
107  /*!
108  \brief Initializes geometry tagged rules.
109  */
111  {
112  // Geometries Tags
115  | polygonTagged
120  | tinTagged
123  ;
124  }
125 
126  /*!
127  \brief Initializes geometries z tagged rules.
128  */
130  {
131  // Geometries Z Tags
139  | tinZTagged
142  ;
143  }
144 
145  /*!
146  \brief Initializes geometries m tagged rules.
147  */
149  {
150  // Geometries M Tags
158  | tinMTagged
161  ;
162  }
163 
164  /*!
165  \brief Initializes geometries zm tagged rules.
166  */
168  {
169  // Geometries ZM Tags
177  | tinZMTagged
180  ;
181  }
182 
183  /*!
184  \brief Initializes coordinates rules.
185  */
187  {
188  // (x,y)
189  coordinate = (double_ >> double_)[boost::bind(&WKTActions::createPoint, &m_a, ::_1)]; // It is an action!
190  // (x,y,z)
191  coordinateZ = (double_ >> double_ >> double_)[boost::bind(&WKTActions::createPointZ, &m_a, ::_1)];
192  // (x,y,m)
193  coordinateM = (double_ >> double_ >> double_)[boost::bind(&WKTActions::createPointM, &m_a, ::_1)];
194  // (x,y,z,m)
195  coordinateZM = (double_ >> double_ >> double_ >> double_)[boost::bind(&WKTActions::createPointZM, &m_a, ::_1)];
196  }
197 
198  /*!
199  \brief Initializes point rules.
200  */
201  void initPoint()
202  {
203  // Point Tagged Text
204  pointTagged = no_case["point"] >> pointTxt;
205  // Point Z Tagged
206  pointZTagged = no_case["point z"] >> pointZTxt;
207  // Point M Tagged
208  pointMTagged = no_case["point m"] >> pointMTxt;
209  // Point ZM Tagged
210  pointZMTagged = no_case["point zm"] >> pointZMTxt;
211 
212  // Point
213  pointTxt = empty[boost::bind(&WKTActions::createPoint, &m_a)] | '(' >> coordinate >> ')';
214  // Point Z
215  pointZTxt = empty[boost::bind(&WKTActions::createPointZ, &m_a)] | '(' >> coordinateZ >> ')';
216  // Point M
217  pointMTxt = empty[boost::bind(&WKTActions::createPointM, &m_a)] | '(' >> coordinateM >> ')';
218  // Point ZM
219  pointZMTxt = empty[boost::bind(&WKTActions::createPointZM, &m_a)] | '(' >> coordinateZM >> ')';
220  }
221 
222  /*!
223  \brief Initializes line rules.
224  */
225  void initLine()
226  {
227  // LineString Tagged Text
228  lineStringTagged = no_case["linestring"] >> lineStringTxt;
229  // LineString Z Tagged Text
230  lineStringZTagged = no_case["linestring z"] >> lineStringZTxt;
231  // LineString M Tagged Text
232  lineStringMTagged = no_case["linestring m"] >> lineStringMTxt;
233  // LineString ZM Tagged Text
234  lineStringZMTagged = no_case["linestring zm"] >> lineStringZMTxt;
235 
236  // LineString
237  lineStringTxt = (empty | '(' >> coordinate >> *(',' >> coordinate) >> ')')[boost::bind(&WKTActions::createLine, &m_a)];
238  // LineString Z
239  lineStringZTxt = (empty | '(' >> coordinateZ >> *(',' >> coordinateZ) >> ')')[boost::bind(&WKTActions::createLineZ, &m_a)];
240  // LineString M
241  lineStringMTxt = (empty | '(' >> coordinateM >> *(',' >> coordinateM) >> ')')[boost::bind(&WKTActions::createLineM, &m_a)];
242  // LineString ZM
243  lineStringZMTxt = (empty | '(' >> coordinateZM >> *(',' >> coordinateZM) >> ')')[boost::bind(&WKTActions::createLineZM, &m_a)];
244 
245  // LinearRing
246  linearRingTxt = (empty | '(' >> coordinate >> *(',' >> coordinate) >> ')')[boost::bind(&WKTActions::createLinearRing, &m_a)];
247  // LineString Z
248  linearRingZTxt = (empty | '(' >> coordinateZ >> *(',' >> coordinateZ) >> ')')[boost::bind(&WKTActions::createLinearRingZ, &m_a)];
249  // LineString M
250  linearRingMTxt = (empty | '(' >> coordinateM >> *(',' >> coordinateM) >> ')')[boost::bind(&WKTActions::createLinearRingM, &m_a)];
251  // LineString ZM
252  linearRingZMTxt = (empty | '(' >> coordinateZM >> *(',' >> coordinateZM) >> ')')[boost::bind(&WKTActions::createLinearRingZM, &m_a)];
253  }
254 
255  /*!
256  \brief Initializes polygon rules.
257  */
258  void initPolygon()
259  {
260  // Polygon Tagged Text
261  polygonTagged = no_case["polygon"] >> polygonTxt;
262  // Polygon Z Tagged Text
263  polygonZTagged = no_case["polygon z"] >> polygonZTxt;
264  // Polygon M Tagged Text
265  polygonMTagged = no_case["polygon m"] >> polygonMTxt;
266  // Polygon ZM Tagged Text
267  polygonZMTagged = no_case["polygon zm"] >> polygonZMTxt;
268 
269  // Polygon
270  polygonTxt = (empty | '(' >> linearRingTxt >> *(',' >> linearRingTxt) >> ')')[boost::bind(&WKTActions::createPolygon, &m_a)];
271  // Polygon Z
272  polygonZTxt = (empty | '(' >> linearRingZTxt >> *(',' >> linearRingZTxt) >> ')')[boost::bind(&WKTActions::createPolygonZ, &m_a)];
273  // Polygon M
274  polygonMTxt = (empty | '(' >> linearRingMTxt >> *(',' >> linearRingMTxt) >> ')')[boost::bind(&WKTActions::createPolygonM, &m_a)];
275  // Polygon ZM
276  polygonZMTxt = (empty | '(' >> linearRingZMTxt >> *(',' >> linearRingZMTxt) >> ')')[boost::bind(&WKTActions::createPolygonZM, &m_a)];
277  }
278 
279  /*!
280  \brief Initializes multi point rules.
281  */
283  {
284  // MultiPoint Tagged Text
285  multiPointTagged = (no_case["multipoint"] >> multiPointTxt)[boost::bind(&WKTActions::createMultiPoint, &m_a)];
286  // MultiPoint Z Tagged Text
287  multiPointZTagged = (no_case["multipoint z"] >> multiPointZTxt)[boost::bind(&WKTActions::createMultiPointZ, &m_a)];
288  // MultiPoint M Tagged Text
289  multiPointMTagged = (no_case["multipoint m"] >> multiPointMTxt)[boost::bind(&WKTActions::createMultiPointM, &m_a)];
290  // MultiPoint ZM Tagged Text
291  multiPointZMTagged = (no_case["multipoint zm"] >> multiPointZMTxt)[boost::bind(&WKTActions::createMultiPointZM, &m_a)];
292 
293  // MultiPoint
294  multiPointTxt = empty | '(' >> pointTxt >> *(',' >> pointTxt) >> ')';
295  // MultiPoint Z
296  multiPointZTxt = empty | '(' >> pointZTxt >> *(',' >> pointZTxt) >> ')';
297  // MultiPoint M
298  multiPointMTxt = empty | '(' >> pointMTxt >> *(',' >> pointMTxt) >> ')';
299  // MultiPoint ZM
300  multiPointZMTxt = empty | '(' >> pointZMTxt >> *(',' >> pointZMTxt) >> ')';
301  }
302 
303  /*!
304  \brief Initializes multi line rules.
305  */
307  {
308  // MultiLineString Tagged Text
309  multiLineStringTagged = (no_case["multilinestring"] >> multiLineStringTxt)[boost::bind(&WKTActions::createMultiLineString, &m_a)];
310  // MultiLineString Z Tagged Text
311  multiLineStringZTagged = (no_case["multilinestring z"] >> multiLineStringZTxt)[boost::bind(&WKTActions::createMultiLineStringZ, &m_a)];
312  // MultiLineString M Tagged Text
313  multiLineStringMTagged = (no_case["multilinestring m"] >> multiLineStringMTxt)[boost::bind(&WKTActions::createMultiLineStringM, &m_a)];
314  // MultiLineString ZM Tagged Text
315  multiLineStringZMTagged = (no_case["multilinestring zm"] >> multiLineStringZMTxt)[boost::bind(&WKTActions::createMultiLineStringZM, &m_a)];
316 
317  // MultiLineString
318  multiLineStringTxt = empty | '('>> lineStringTxt >> *(',' >> lineStringTxt) >> ')';
319  // MultiLineString Z
320  multiLineStringZTxt = empty | '('>> lineStringZTxt >> *(',' >> lineStringZTxt) >> ')';
321  // MultiLineString M
322  multiLineStringMTxt = empty | '('>> lineStringMTxt >> *(',' >> lineStringMTxt) >> ')';
323  // MultiLineString ZM
324  multiLineStringZMTxt = empty | '('>> lineStringZMTxt >> *(',' >> lineStringZMTxt) >> ')';
325  }
326 
327  /*!
328  \brief Initializes multi polygon rules.
329  */
331  {
332  // MultiPolygon Tagged Text
333  multiPolygonTagged = (no_case["multipolygon"] >> multiPolygonTxt)[boost::bind(&WKTActions::createMultiPolygon, &m_a)];
334  // MultiPolygon Z Tagged Text
335  multiPolygonZTagged = (no_case["multipolygon z"] >> multiPolygonZTxt)[boost::bind(&WKTActions::createMultiPolygonZ, &m_a)];
336  // MultiPolygon M Tagged Text
337  multiPolygonMTagged = (no_case["multipolygon m"] >> multiPolygonMTxt)[boost::bind(&WKTActions::createMultiPolygonM, &m_a)];
338  // MultiPolygon ZM Tagged Text
339  multiPolygonZMTagged = (no_case["multipolygon zm"] >> multiPolygonZMTxt)[boost::bind(&WKTActions::createMultiPolygonZM, &m_a)];
340 
341  // MultiPolygon
342  multiPolygonTxt = empty |'(' >> polygonTxt >> *(',' >> polygonTxt) >> ')';
343  // MultiPolygon Z
344  multiPolygonZTxt = empty |'(' >> polygonZTxt >> *(',' >> polygonZTxt) >> ')';
345  // MultiPolygon M
346  multiPolygonMTxt = empty |'(' >> polygonMTxt >> *(',' >> polygonMTxt) >> ')';
347  // MultiPolygon ZM
348  multiPolygonZMTxt = empty |'(' >> polygonZMTxt >> *(',' >> polygonZMTxt) >> ')';
349  }
350 
351  /*!
352  \brief Initializes polyhedral surface rules.
353  */
355  {
356  // Polyhedral Surface Tagged Text
357  polyhedralSurfaceTagged = no_case["polyhedralsurface"] >> polyhedralSurfaceTxt;
358  // Polyhedral Z Surface Tagged Text
359  polyhedralSurfaceZTagged = no_case["polyhedralsurface z"] >> polyhedralSurfaceZTxt;
360  // Polyhedral M Surface Tagged Text
361  polyhedralSurfaceMTagged = no_case["polyhedralsurface m"] >> polyhedralSurfaceMTxt;
362  // Polyhedral ZM Surface Tagged Text
363  polyhedralSurfaceZMTagged = no_case["polyhedralsurface zm"] >> polyhedralSurfaceZMTxt;
364 
365  // Polyhedral Surface
366  polyhedralSurfaceTxt = (empty | '(' >> polygonTxt >> *(',' >> polygonTxt) >> ')')[boost::bind(&WKTActions::createPolyhedralSurface, &m_a)];
367  // Polyhedral Surface Z
368  polyhedralSurfaceZTxt = (empty | '(' >> polygonZTxt >> *(',' >> polygonZTxt) >> ')')[boost::bind(&WKTActions::createPolyhedralSurfaceZ, &m_a)];
369  // Polyhedral Surface M
370  polyhedralSurfaceMTxt = (empty | '(' >> polygonMTxt >> *(',' >> polygonMTxt) >> ')')[boost::bind(&WKTActions::createPolyhedralSurfaceM, &m_a)];
371  // Polyhedral Surface ZM
372  polyhedralSurfaceZMTxt = (empty | '(' >> polygonZMTxt >> *(',' >> polygonZMTxt) >> ')')[boost::bind(&WKTActions::createPolyhedralSurfaceZM, &m_a)];
373  }
374 
375  /*!
376  \brief Initializes TIN rules.
377  */
378  void initTIN()
379  {
380  // TIN Tagged Text
381  tinTagged = (no_case["tin"] >> tinTxt)[boost::bind(&WKTActions::createTIN, &m_a)];
382  // TIN Z Tagged Text
383  tinZTagged = (no_case["tin z"] >> tinZTxt)[boost::bind(&WKTActions::createTINZ, &m_a)];
384  // TIN M Tagged Text
385  tinMTagged = (no_case["tin m"] >> tinMTxt)[boost::bind(&WKTActions::createTINM, &m_a)];
386  // TIN ZM Tagged Text
387  tinZMTagged = (no_case["tin zm"] >> tinZMTxt)[boost::bind(&WKTActions::createTINZM, &m_a)];
388 
389  // TIN
390  tinTxt = empty | '(' >> polygonTxt >> *(',' >> polygonTxt) >> ')';
391  // TIN Z
392  tinZTxt = empty | '(' >> polygonZTxt >> *(',' >> polygonZTxt) >> ')';
393  // TIN M
394  tinMTxt = empty | '(' >> polygonMTxt >> *(',' >> polygonMTxt) >> ')';
395  // TIN ZM
396  tinZMTxt = empty | '(' >> polygonZMTxt >> *(',' >> polygonZMTxt) >> ')';
397  }
398 
399  /*!
400  \brief Initializes triangle rules.
401  */
403  {
404  // Triangle Tagged Text
405  triangleTagged = (no_case["triangle"] >> triangleTxt)[boost::bind(&WKTActions::createTriangle, &m_a)];
406  // Triangle Z Tagged Text
407  triangleZTagged = (no_case["triangle z"] >> triangleZTxt)[boost::bind(&WKTActions::createTriangleZ, &m_a)];
408  // Triangle M Tagged Text
409  triangleMTagged = (no_case["triangle m"] >> triangleMTxt)[boost::bind(&WKTActions::createTriangleM, &m_a)];
410  // Triangle ZM Tagged Text
411  triangleZMTagged = (no_case["triangle zm"] >> triangleZMTxt)[boost::bind(&WKTActions::createTriangleZM, &m_a)];
412 
413  // Polygon
414  triangleTxt = empty | '(' >> linearRingTxt >> *(',' >> linearRingTxt) >> ')';
415  // Polygon Z
416  triangleZTxt = empty | '(' >> linearRingZTxt >> *(',' >> linearRingZTxt) >> ')';
417  // Polygon M
418  triangleMTxt = empty | '(' >> linearRingMTxt >> *(',' >> linearRingMTxt) >> ')';
419  // Polygon ZM
420  triangleZMTxt = empty | '(' >> linearRingZMTxt >> *(',' >> linearRingZMTxt) >> ')';
421  }
422 
423  /*!
424  \brief Initializes geometry collection rules.
425  */
427  {
428  // GeometryCollection Tagged Text
429  geometryCollectionTagged = (no_case["geometrycollection"] >> geometryCollectionTxt)[boost::bind(&WKTActions::createGeometryCollection, &m_a)];
430  // GeometryCollection Z Tagged Text
431  geometryCollectionZTagged = (no_case["geometrycollection z"] >> geometryCollectionZTxt)[boost::bind(&WKTActions::createGeometryCollectionZ, &m_a)];
432  // GeometryCollection M Tagged Text
433  geometryCollectionMTagged = (no_case["geometrycollection m"] >> geometryCollectionMTxt)[boost::bind(&WKTActions::createGeometryCollectionM, &m_a)];
434  // GeometryCollection ZM Tagged Text
435  geometryCollectionZMTagged = (no_case["geometrycollection zm"] >> geometryCollectionZMTxt)[boost::bind(&WKTActions::createGeometryCollectionZM, &m_a)];
436 
437  // Geometry Collection
438  geometryCollectionTxt = empty | '(' >> geometryTagged >> *(',' >> geometryTagged) >> ')';
439  // GeometryCollection Z
440  geometryCollectionZTxt = empty | '(' >> geometryZTagged >> *(',' >> geometryZTagged) >> ')';
441  // GeometryCollection M
442  geometryCollectionMTxt = empty | '(' >> geometryMTagged >> *(',' >> geometryMTagged) >> ')';
443  // GeometryCollection ZM
444  geometryCollectionZMTxt = empty | '(' >> geometryZMTagged >> *(',' >> geometryZMTagged) >> ')';
445  }
446 
447  //@}
448 
449  public:
450 
451  /** @name Access method.
452  * Method to access the geometry generated.
453  */
454  //@{
455 
456  /*!
457  \brief It returns the geometry generated by the parser process.
458 
459  \note The caller of this method will take the ownership of the geometry.
460  */
462 
463  //@}
464 
465  /*!
466  \brief This method resets the Parser to original state.
467 
468  \note Should be called case the parser processing faill.
469  \note Basically, it is responsable to free the memory.
470  */
471  void reset() { m_a.reset(); }
472 
473  private:
474 
475  WKTActions m_a; //<! Semanthic actions to grammar rules.
476 
477  /** @name Rules of WKT Grammar.
478  */
479  //@{
480 
481  //<! Geometry type (root)
482  qi::rule<Iterator, ascii::space_type> geometry;
483 
484  //<! Geometries
485  qi::rule<Iterator, ascii::space_type> geometryTagged, geometryZTagged, geometryMTagged, geometryZMTagged;
486 
487  //<! Coordinates
488  qi::rule<Iterator, ascii::space_type> coordinate, coordinateZ, coordinateM, coordinateZM;
489 
490  //<! Points
491  qi::rule<Iterator, ascii::space_type> pointTagged, pointZTagged, pointMTagged, pointZMTagged;
492 
493  //<! Lines
494  qi::rule<Iterator, ascii::space_type> lineStringTagged, lineStringZTagged, lineStringMTagged, lineStringZMTagged;
495 
496  //<! Polygons
497  qi::rule<Iterator, ascii::space_type> polygonTagged, polygonZTagged, polygonMTagged, polygonZMTagged;
498 
499  //<! Polyhedral Surfaces
501 
502  //<! MultiPoints
503  qi::rule<Iterator, ascii::space_type> multiPointTagged, multiPointZTagged, multiPointMTagged, multiPointZMTagged;
504 
505  //<! MultiLines
507 
508  //<! MultiPolygons
510 
511  //<! Triangle
512  qi::rule<Iterator, ascii::space_type> triangleTagged, triangleZTagged, triangleMTagged, triangleZMTagged;
513 
514  //<! TIN
515  qi::rule<Iterator, ascii::space_type> tinTagged, tinZTagged, tinMTagged, tinZMTagged;
516 
517  //<! Geometry Collection
519 
520  //<! Text format for Points
521  qi::rule<Iterator, ascii::space_type> pointTxt, pointZTxt, pointMTxt, pointZMTxt;
522 
523  //<! Text format for Lines
524  qi::rule<Iterator, ascii::space_type> lineStringTxt, lineStringZTxt, lineStringMTxt, lineStringZMTxt;
525 
526  //<! Text format for LinearRing
527  qi::rule<Iterator, ascii::space_type> linearRingTxt, linearRingZTxt, linearRingMTxt, linearRingZMTxt;
528 
529  //<! Text format for Polygons
530  qi::rule<Iterator, ascii::space_type> polygonTxt, polygonZTxt, polygonMTxt, polygonZMTxt;
531 
532  //<! Text format for Polyhedral Surfaces
534 
535  //<! Text format for MultiPoints
536  qi::rule<Iterator, ascii::space_type> multiPointTxt, multiPointZTxt, multiPointMTxt, multiPointZMTxt;
537 
538  //<! Text format for MultiLines
540 
541  //<! Text format for MultiPolygons
542  qi::rule<Iterator, ascii::space_type> multiPolygonTxt, multiPolygonZTxt, multiPolygonMTxt, multiPolygonZMTxt;
543 
544  //<! Text format for TIN
545  qi::rule<Iterator, ascii::space_type> tinTxt, tinZTxt, tinMTxt, tinZMTxt;
546 
547  //<! Text format for Triangles
548  qi::rule<Iterator, ascii::space_type> triangleTxt, triangleZTxt, triangleMTxt, triangleZMTxt;
549 
550  //<! Text format for GeometryCollections
552 
553  //<! Empty keyword rule
554  qi::rule<Iterator, ascii::space_type> empty;
555 
556  //@}
557 
558  }; // WKTParser
559 
560  } // namespace gm
561 } // namespace te
562 
563 #endif // __TERRALIB_GEOMETRY_INTERNAL_WKTPARSER_H
564 
qi::rule< Iterator, ascii::space_type > multiLineStringZMTagged
Definition: WKTParser.h:506
qi::rule< Iterator, ascii::space_type > lineStringZMTxt
Definition: WKTParser.h:524
qi::rule< Iterator, ascii::space_type > multiPointZTagged
Definition: WKTParser.h:503
qi::rule< Iterator, ascii::space_type > multiPolygonTagged
Definition: WKTParser.h:509
qi::rule< Iterator, ascii::space_type > lineStringZMTagged
Definition: WKTParser.h:494
qi::rule< Iterator, ascii::space_type > polygonTagged
Definition: WKTParser.h:497
void initLine()
Initializes line rules.
Definition: WKTParser.h:225
qi::rule< Iterator, ascii::space_type > tinTxt
Definition: WKTParser.h:545
qi::rule< Iterator, ascii::space_type > tinZTxt
Definition: WKTParser.h:545
void initGeometriesZM()
Initializes geometries zm tagged rules.
Definition: WKTParser.h:167
void initTriangle()
Initializes triangle rules.
Definition: WKTParser.h:402
qi::rule< Iterator, ascii::space_type > multiPolygonZTxt
Definition: WKTParser.h:542
qi::rule< Iterator, ascii::space_type > multiPolygonTxt
Definition: WKTParser.h:542
qi::rule< Iterator, ascii::space_type > polyhedralSurfaceZMTagged
Definition: WKTParser.h:500
qi::rule< Iterator, ascii::space_type > geometryCollectionZMTxt
Definition: WKTParser.h:551
qi::rule< Iterator, ascii::space_type > multiPointZTxt
Definition: WKTParser.h:536
qi::rule< Iterator, ascii::space_type > multiPolygonMTxt
Definition: WKTParser.h:542
qi::rule< Iterator, ascii::space_type > geometryCollectionMTagged
Definition: WKTParser.h:518
qi::rule< Iterator, ascii::space_type > geometryCollectionMTxt
Definition: WKTParser.h:551
qi::rule< Iterator, ascii::space_type > polyhedralSurfaceTagged
Definition: WKTParser.h:500
qi::rule< Iterator, ascii::space_type > geometryTagged
Definition: WKTParser.h:485
qi::rule< Iterator, ascii::space_type > geometryCollectionTxt
Definition: WKTParser.h:551
qi::rule< Iterator, ascii::space_type > multiPolygonZTagged
Definition: WKTParser.h:509
void createGeometryCollection()
Definition: WKTActions.cpp:330
qi::rule< Iterator, ascii::space_type > pointTxt
Definition: WKTParser.h:521
qi::rule< Iterator, ascii::space_type > tinMTagged
Definition: WKTParser.h:515
void reset()
This method resets the Parser to original state.
Definition: WKTParser.h:471
WKTParser()
Default constructor.
Definition: WKTParser.h:72
void initMultiLine()
Initializes multi line rules.
Definition: WKTParser.h:306
void initGeometriesZ()
Initializes geometries z tagged rules.
Definition: WKTParser.h:129
qi::rule< Iterator, ascii::space_type > geometryZMTagged
Definition: WKTParser.h:485
qi::rule< Iterator, ascii::space_type > polygonMTagged
Definition: WKTParser.h:497
qi::rule< Iterator, ascii::space_type > polygonZTxt
Definition: WKTParser.h:530
qi::rule< Iterator, ascii::space_type > pointMTxt
Definition: WKTParser.h:521
void createGeometryCollectionZ()
Definition: WKTActions.cpp:335
void initGeometryCollection()
Initializes geometry collection rules.
Definition: WKTParser.h:426
qi::rule< Iterator, ascii::space_type > lineStringMTxt
Definition: WKTParser.h:524
void initGeometriesM()
Initializes geometries m tagged rules.
Definition: WKTParser.h:148
qi::rule< Iterator, ascii::space_type > multiPointZMTxt
Definition: WKTParser.h:536
void createPolyhedralSurfaceM()
Definition: WKTActions.cpp:270
qi::rule< Iterator, ascii::space_type > polygonTxt
Definition: WKTParser.h:530
qi::rule< Iterator, ascii::space_type > tinMTxt
Definition: WKTParser.h:545
qi::rule< Iterator, ascii::space_type > polyhedralSurfaceZTagged
Definition: WKTParser.h:500
qi::rule< Iterator, ascii::space_type > multiLineStringTxt
Definition: WKTParser.h:539
qi::rule< Iterator, ascii::space_type > tinZMTxt
Definition: WKTParser.h:545
qi::rule< Iterator, ascii::space_type > linearRingZTxt
Definition: WKTParser.h:527
qi::rule< Iterator, ascii::space_type > triangleZTagged
Definition: WKTParser.h:512
qi::rule< Iterator, ascii::space_type > pointZTagged
Definition: WKTParser.h:491
qi::rule< Iterator, ascii::space_type > polygonZMTagged
Definition: WKTParser.h:497
void initPolyhedralSurface()
Initializes polyhedral surface rules.
Definition: WKTParser.h:354
qi::rule< Iterator, ascii::space_type > geometryZTagged
Definition: WKTParser.h:485
qi::rule< Iterator, ascii::space_type > multiPointTxt
Definition: WKTParser.h:536
qi::rule< Iterator, ascii::space_type > triangleMTagged
Definition: WKTParser.h:512
qi::rule< Iterator, ascii::space_type > tinZTagged
Definition: WKTParser.h:515
qi::rule< Iterator, ascii::space_type > pointZTxt
Definition: WKTParser.h:521
Geometry * getGeometry()
It returns the geometry generated by the parser process.
Definition: WKTActions.cpp:466
qi::rule< Iterator, ascii::space_type > multiPolygonMTagged
Definition: WKTParser.h:509
void createMultiLineStringZ()
Definition: WKTActions.cpp:223
qi::rule< Iterator, ascii::space_type > triangleTxt
Definition: WKTParser.h:548
qi::rule< Iterator, ascii::space_type > geometryCollectionTagged
Definition: WKTParser.h:518
WKTActions m_a
Definition: WKTParser.h:475
void initCoordinates()
Initializes coordinates rules.
Definition: WKTParser.h:186
qi::rule< Iterator, ascii::space_type > multiLineStringZTagged
Definition: WKTParser.h:506
qi::rule< Iterator, ascii::space_type > triangleZMTxt
Definition: WKTParser.h:548
void initGeometries()
Initializes geometry tagged rules.
Definition: WKTParser.h:110
qi::rule< Iterator, ascii::space_type > pointZMTxt
Definition: WKTParser.h:521
Geometry * getGeometry()
It returns the geometry generated by the parser process.
Definition: WKTParser.h:461
qi::rule< Iterator, ascii::space_type > coordinateM
Definition: WKTParser.h:488
qi::rule< Iterator, ascii::space_type > multiPolygonZMTxt
Definition: WKTParser.h:542
qi::rule< Iterator, ascii::space_type > lineStringMTagged
Definition: WKTParser.h:494
qi::rule< Iterator, ascii::space_type > multiLineStringZMTxt
Definition: WKTParser.h:539
qi::rule< Iterator, ascii::space_type > multiPolygonZMTagged
Definition: WKTParser.h:509
qi::rule< Iterator, ascii::space_type > triangleZTxt
Definition: WKTParser.h:548
qi::rule< Iterator, ascii::space_type > linearRingMTxt
Definition: WKTParser.h:527
qi::rule< Iterator, ascii::space_type > lineStringZTxt
Definition: WKTParser.h:524
void initPolygon()
Initializes polygon rules.
Definition: WKTParser.h:258
qi::rule< Iterator, ascii::space_type > coordinateZM
Definition: WKTParser.h:488
void initTIN()
Initializes TIN rules.
Definition: WKTParser.h:378
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
Definition: Geometry.h:73
qi::rule< Iterator, ascii::space_type > polyhedralSurfaceMTagged
Definition: WKTParser.h:500
qi::rule< Iterator, ascii::space_type > tinTagged
Definition: WKTParser.h:515
void createPolyhedralSurfaceZM()
Definition: WKTActions.cpp:276
qi::rule< Iterator, ascii::space_type > triangleTagged
Definition: WKTParser.h:512
qi::rule< Iterator, ascii::space_type > multiLineStringMTagged
Definition: WKTParser.h:506
qi::rule< Iterator, ascii::space_type > lineStringTxt
Definition: WKTParser.h:524
qi::rule< Iterator, ascii::space_type > polygonZTagged
Definition: WKTParser.h:497
qi::rule< Iterator, ascii::space_type > pointMTagged
Definition: WKTParser.h:491
qi::rule< Iterator, ascii::space_type > multiLineStringMTxt
Definition: WKTParser.h:539
qi::rule< Iterator, ascii::space_type > polygonMTxt
Definition: WKTParser.h:530
void initMultiPolygon()
Initializes multi polygon rules.
Definition: WKTParser.h:330
void createMultiLineString()
Definition: WKTActions.cpp:218
void createGeometryCollectionZM()
Definition: WKTActions.cpp:345
qi::rule< Iterator, ascii::space_type > multiPointZMTagged
Definition: WKTParser.h:503
void createMultiLineStringM()
Definition: WKTActions.cpp:228
void createMultiPolygonM()
Definition: WKTActions.cpp:248
qi::rule< Iterator, ascii::space_type > geometry
Definition: WKTParser.h:482
qi::rule< Iterator, ascii::space_type > linearRingZMTxt
Definition: WKTParser.h:527
qi::rule< Iterator, ascii::space_type > polygonZMTxt
Definition: WKTParser.h:530
qi::rule< Iterator, ascii::space_type > triangleZMTagged
Definition: WKTParser.h:512
void createMultiPolygonZ()
Definition: WKTActions.cpp:243
A class that implements the Grammar Rules for well known text (WKT) format for Geometry.
Definition: WKTActions.h:54
void createPolyhedralSurfaceZ()
Definition: WKTActions.cpp:264
qi::rule< Iterator, ascii::space_type > empty
Definition: WKTParser.h:554
qi::rule< Iterator, ascii::space_type > polyhedralSurfaceZTxt
Definition: WKTParser.h:533
void initPoint()
Initializes point rules.
Definition: WKTParser.h:201
qi::rule< Iterator, ascii::space_type > lineStringZTagged
Definition: WKTParser.h:494
qi::rule< Iterator, ascii::space_type > polyhedralSurfaceTxt
Definition: WKTParser.h:533
qi::rule< Iterator, ascii::space_type > geometryCollectionZTagged
Definition: WKTParser.h:518
qi::rule< Iterator, ascii::space_type > multiPointTagged
Definition: WKTParser.h:503
void createMultiLineStringZM()
Definition: WKTActions.cpp:233
qi::rule< Iterator, ascii::space_type > multiLineStringZTxt
Definition: WKTParser.h:539
qi::rule< Iterator, ascii::space_type > pointTagged
Definition: WKTParser.h:491
qi::rule< Iterator, ascii::space_type > polyhedralSurfaceMTxt
Definition: WKTParser.h:533
qi::rule< Iterator, ascii::space_type > linearRingTxt
Definition: WKTParser.h:527
qi::rule< Iterator, ascii::space_type > multiPointMTxt
Definition: WKTParser.h:536
qi::rule< Iterator, ascii::space_type > triangleMTxt
Definition: WKTParser.h:548
qi::rule< Iterator, ascii::space_type > coordinateZ
Definition: WKTParser.h:488
qi::rule< Iterator, ascii::space_type > tinZMTagged
Definition: WKTParser.h:515
qi::rule< Iterator, ascii::space_type > lineStringTagged
Definition: WKTParser.h:494
qi::rule< Iterator, ascii::space_type > coordinate
Definition: WKTParser.h:488
qi::rule< Iterator, ascii::space_type > pointZMTagged
Definition: WKTParser.h:491
void initMultiPoint()
Initializes multi point rules.
Definition: WKTParser.h:282
qi::rule< Iterator, ascii::space_type > geometryCollectionZTxt
Definition: WKTParser.h:551
qi::rule< Iterator, ascii::space_type > geometryCollectionZMTagged
Definition: WKTParser.h:518
void reset()
This method resets the Action class to original state.
Definition: WKTActions.cpp:53
qi::rule< Iterator, ascii::space_type > multiLineStringTagged
Definition: WKTParser.h:506
qi::rule< Iterator, ascii::space_type > geometryMTagged
Definition: WKTParser.h:485
qi::rule< Iterator, ascii::space_type > polyhedralSurfaceZMTxt
Definition: WKTParser.h:533
void createPolyhedralSurface()
Definition: WKTActions.cpp:258
void createMultiPolygonZM()
Definition: WKTActions.cpp:253
void createGeometryCollectionM()
Definition: WKTActions.cpp:340
A class that implements the semanthic actions to grammar rules for well known text (WKT) format for G...
qi::rule< Iterator, ascii::space_type > multiPointMTagged
Definition: WKTParser.h:503