Loading...
Searching...
No Matches
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
44namespace qi = boost::spirit::qi;
45namespace ascii = boost::spirit::ascii;
46
47// Using the following boost::spirit definitions
48using qi::char_;
49using qi::double_;
50using ascii::no_case;
51
52namespace 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. */
73 {
74 // Geometries (root)
76
77 // Initializing all rules
83 initPoint();
84 initLine();
90 initTIN();
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
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
180 ;
181 }
182
183 /*!
184 \brief Initializes coordinates rules.
185 */
187 {
188#if BOOST_VERSION < 106000
189 // (x,y)
190 coordinate = (double_ >> double_)[boost::bind(&WKTActions::createPoint, &m_a, ::_1)]; // It is an action!
191 // (x,y,z)
192 coordinateZ = (double_ >> double_ >> double_)[boost::bind(&WKTActions::createPointZ, &m_a, ::_1)];
193 // (x,y,m)
194 coordinateM = (double_ >> double_ >> double_)[boost::bind(&WKTActions::createPointM, &m_a, ::_1)];
195 // (x,y,z,m)
196 coordinateZM = (double_ >> double_ >> double_ >> double_)[boost::bind(&WKTActions::createPointZM, &m_a, ::_1)];
197
198#else
199 // (x,y)
200 coordinate = (double_ >> double_)[boost::bind(&WKTActions::createPoint, &m_a, boost::placeholders::_1)]; // It is an action!
201 // (x,y,z)
202 coordinateZ = (double_ >> double_ >> double_)[boost::bind(&WKTActions::createPointZ, &m_a, boost::placeholders::_1)];
203 // (x,y,m)
204 coordinateM = (double_ >> double_ >> double_)[boost::bind(&WKTActions::createPointM, &m_a, boost::placeholders::_1)];
205 // (x,y,z,m)
206 coordinateZM = (double_ >> double_ >> double_ >> double_)[boost::bind(&WKTActions::createPointZM, &m_a, boost::placeholders::_1)];
207#endif
208 }
209
210 /*!
211 \brief Initializes point rules.
212 */
214 {
215 // Point Tagged Text
216 pointTagged = no_case["point"] >> pointTxt;
217 // Point Z Tagged
218 pointZTagged = no_case["point z"] >> pointZTxt;
219 // Point M Tagged
220 pointMTagged = no_case["point m"] >> pointMTxt;
221 // Point ZM Tagged
222 pointZMTagged = no_case["point zm"] >> pointZMTxt;
223
224 // Point
225 pointTxt = empty[boost::bind(&WKTActions::createPoint, &m_a)] | '(' >> coordinate >> ')';
226 // Point Z
227 pointZTxt = empty[boost::bind(&WKTActions::createPointZ, &m_a)] | '(' >> coordinateZ >> ')';
228 // Point M
229 pointMTxt = empty[boost::bind(&WKTActions::createPointM, &m_a)] | '(' >> coordinateM >> ')';
230 // Point ZM
231 pointZMTxt = empty[boost::bind(&WKTActions::createPointZM, &m_a)] | '(' >> coordinateZM >> ')';
232 }
233
234 /*!
235 \brief Initializes line rules.
236 */
237 void initLine()
238 {
239 // LineString Tagged Text
240 lineStringTagged = no_case["linestring"] >> lineStringTxt;
241 // LineString Z Tagged Text
242 lineStringZTagged = no_case["linestring z"] >> lineStringZTxt;
243 // LineString M Tagged Text
244 lineStringMTagged = no_case["linestring m"] >> lineStringMTxt;
245 // LineString ZM Tagged Text
246 lineStringZMTagged = no_case["linestring zm"] >> lineStringZMTxt;
247
248 // LineString
249 lineStringTxt = (empty | '(' >> coordinate >> *(',' >> coordinate) >> ')')[boost::bind(&WKTActions::createLine, &m_a)];
250 // LineString Z
251 lineStringZTxt = (empty | '(' >> coordinateZ >> *(',' >> coordinateZ) >> ')')[boost::bind(&WKTActions::createLineZ, &m_a)];
252 // LineString M
253 lineStringMTxt = (empty | '(' >> coordinateM >> *(',' >> coordinateM) >> ')')[boost::bind(&WKTActions::createLineM, &m_a)];
254 // LineString ZM
255 lineStringZMTxt = (empty | '(' >> coordinateZM >> *(',' >> coordinateZM) >> ')')[boost::bind(&WKTActions::createLineZM, &m_a)];
256
257 // LinearRing
258 linearRingTxt = (empty | '(' >> coordinate >> *(',' >> coordinate) >> ')')[boost::bind(&WKTActions::createLinearRing, &m_a)];
259 // LineString Z
260 linearRingZTxt = (empty | '(' >> coordinateZ >> *(',' >> coordinateZ) >> ')')[boost::bind(&WKTActions::createLinearRingZ, &m_a)];
261 // LineString M
262 linearRingMTxt = (empty | '(' >> coordinateM >> *(',' >> coordinateM) >> ')')[boost::bind(&WKTActions::createLinearRingM, &m_a)];
263 // LineString ZM
264 linearRingZMTxt = (empty | '(' >> coordinateZM >> *(',' >> coordinateZM) >> ')')[boost::bind(&WKTActions::createLinearRingZM, &m_a)];
265 }
266
267 /*!
268 \brief Initializes polygon rules.
269 */
271 {
272 // Polygon Tagged Text
273 polygonTagged = no_case["polygon"] >> polygonTxt;
274 // Polygon Z Tagged Text
275 polygonZTagged = no_case["polygon z"] >> polygonZTxt;
276 // Polygon M Tagged Text
277 polygonMTagged = no_case["polygon m"] >> polygonMTxt;
278 // Polygon ZM Tagged Text
279 polygonZMTagged = no_case["polygon zm"] >> polygonZMTxt;
280
281 // Polygon
282 polygonTxt = (empty | '(' >> linearRingTxt >> *(',' >> linearRingTxt) >> ')')[boost::bind(&WKTActions::createPolygon, &m_a)];
283 // Polygon Z
284 polygonZTxt = (empty | '(' >> linearRingZTxt >> *(',' >> linearRingZTxt) >> ')')[boost::bind(&WKTActions::createPolygonZ, &m_a)];
285 // Polygon M
286 polygonMTxt = (empty | '(' >> linearRingMTxt >> *(',' >> linearRingMTxt) >> ')')[boost::bind(&WKTActions::createPolygonM, &m_a)];
287 // Polygon ZM
288 polygonZMTxt = (empty | '(' >> linearRingZMTxt >> *(',' >> linearRingZMTxt) >> ')')[boost::bind(&WKTActions::createPolygonZM, &m_a)];
289 }
290
291 /*!
292 \brief Initializes multi point rules.
293 */
295 {
296 // MultiPoint Tagged Text
297 multiPointTagged = (no_case["multipoint"] >> multiPointTxt)[boost::bind(&WKTActions::createMultiPoint, &m_a)];
298 // MultiPoint Z Tagged Text
299 multiPointZTagged = (no_case["multipoint z"] >> multiPointZTxt)[boost::bind(&WKTActions::createMultiPointZ, &m_a)];
300 // MultiPoint M Tagged Text
301 multiPointMTagged = (no_case["multipoint m"] >> multiPointMTxt)[boost::bind(&WKTActions::createMultiPointM, &m_a)];
302 // MultiPoint ZM Tagged Text
303 multiPointZMTagged = (no_case["multipoint zm"] >> multiPointZMTxt)[boost::bind(&WKTActions::createMultiPointZM, &m_a)];
304
305 // MultiPoint
306 multiPointTxt = empty | '(' >> pointTxt >> *(',' >> pointTxt) >> ')';
307 // MultiPoint Z
308 multiPointZTxt = empty | '(' >> pointZTxt >> *(',' >> pointZTxt) >> ')';
309 // MultiPoint M
310 multiPointMTxt = empty | '(' >> pointMTxt >> *(',' >> pointMTxt) >> ')';
311 // MultiPoint ZM
312 multiPointZMTxt = empty | '(' >> pointZMTxt >> *(',' >> pointZMTxt) >> ')';
313 }
314
315 /*!
316 \brief Initializes multi line rules.
317 */
319 {
320 // MultiLineString Tagged Text
321 multiLineStringTagged = (no_case["multilinestring"] >> multiLineStringTxt)[boost::bind(&WKTActions::createMultiLineString, &m_a)];
322 // MultiLineString Z Tagged Text
323 multiLineStringZTagged = (no_case["multilinestring z"] >> multiLineStringZTxt)[boost::bind(&WKTActions::createMultiLineStringZ, &m_a)];
324 // MultiLineString M Tagged Text
325 multiLineStringMTagged = (no_case["multilinestring m"] >> multiLineStringMTxt)[boost::bind(&WKTActions::createMultiLineStringM, &m_a)];
326 // MultiLineString ZM Tagged Text
327 multiLineStringZMTagged = (no_case["multilinestring zm"] >> multiLineStringZMTxt)[boost::bind(&WKTActions::createMultiLineStringZM, &m_a)];
328
329 // MultiLineString
330 multiLineStringTxt = empty | '('>> lineStringTxt >> *(',' >> lineStringTxt) >> ')';
331 // MultiLineString Z
332 multiLineStringZTxt = empty | '('>> lineStringZTxt >> *(',' >> lineStringZTxt) >> ')';
333 // MultiLineString M
334 multiLineStringMTxt = empty | '('>> lineStringMTxt >> *(',' >> lineStringMTxt) >> ')';
335 // MultiLineString ZM
336 multiLineStringZMTxt = empty | '('>> lineStringZMTxt >> *(',' >> lineStringZMTxt) >> ')';
337 }
338
339 /*!
340 \brief Initializes multi polygon rules.
341 */
343 {
344 // MultiPolygon Tagged Text
345 multiPolygonTagged = (no_case["multipolygon"] >> multiPolygonTxt)[boost::bind(&WKTActions::createMultiPolygon, &m_a)];
346 // MultiPolygon Z Tagged Text
347 multiPolygonZTagged = (no_case["multipolygon z"] >> multiPolygonZTxt)[boost::bind(&WKTActions::createMultiPolygonZ, &m_a)];
348 // MultiPolygon M Tagged Text
349 multiPolygonMTagged = (no_case["multipolygon m"] >> multiPolygonMTxt)[boost::bind(&WKTActions::createMultiPolygonM, &m_a)];
350 // MultiPolygon ZM Tagged Text
351 multiPolygonZMTagged = (no_case["multipolygon zm"] >> multiPolygonZMTxt)[boost::bind(&WKTActions::createMultiPolygonZM, &m_a)];
352
353 // MultiPolygon
354 multiPolygonTxt = empty |'(' >> polygonTxt >> *(',' >> polygonTxt) >> ')';
355 // MultiPolygon Z
356 multiPolygonZTxt = empty |'(' >> polygonZTxt >> *(',' >> polygonZTxt) >> ')';
357 // MultiPolygon M
358 multiPolygonMTxt = empty |'(' >> polygonMTxt >> *(',' >> polygonMTxt) >> ')';
359 // MultiPolygon ZM
360 multiPolygonZMTxt = empty |'(' >> polygonZMTxt >> *(',' >> polygonZMTxt) >> ')';
361 }
362
363 /*!
364 \brief Initializes polyhedral surface rules.
365 */
367 {
368 // Polyhedral Surface Tagged Text
369 polyhedralSurfaceTagged = no_case["polyhedralsurface"] >> polyhedralSurfaceTxt;
370 // Polyhedral Z Surface Tagged Text
371 polyhedralSurfaceZTagged = no_case["polyhedralsurface z"] >> polyhedralSurfaceZTxt;
372 // Polyhedral M Surface Tagged Text
373 polyhedralSurfaceMTagged = no_case["polyhedralsurface m"] >> polyhedralSurfaceMTxt;
374 // Polyhedral ZM Surface Tagged Text
375 polyhedralSurfaceZMTagged = no_case["polyhedralsurface zm"] >> polyhedralSurfaceZMTxt;
376
377 // Polyhedral Surface
378 polyhedralSurfaceTxt = (empty | '(' >> polygonTxt >> *(',' >> polygonTxt) >> ')')[boost::bind(&WKTActions::createPolyhedralSurface, &m_a)];
379 // Polyhedral Surface Z
380 polyhedralSurfaceZTxt = (empty | '(' >> polygonZTxt >> *(',' >> polygonZTxt) >> ')')[boost::bind(&WKTActions::createPolyhedralSurfaceZ, &m_a)];
381 // Polyhedral Surface M
382 polyhedralSurfaceMTxt = (empty | '(' >> polygonMTxt >> *(',' >> polygonMTxt) >> ')')[boost::bind(&WKTActions::createPolyhedralSurfaceM, &m_a)];
383 // Polyhedral Surface ZM
384 polyhedralSurfaceZMTxt = (empty | '(' >> polygonZMTxt >> *(',' >> polygonZMTxt) >> ')')[boost::bind(&WKTActions::createPolyhedralSurfaceZM, &m_a)];
385 }
386
387 /*!
388 \brief Initializes TIN rules.
389 */
390 void initTIN()
391 {
392 // TIN Tagged Text
393 tinTagged = (no_case["tin"] >> tinTxt)[boost::bind(&WKTActions::createTIN, &m_a)];
394 // TIN Z Tagged Text
395 tinZTagged = (no_case["tin z"] >> tinZTxt)[boost::bind(&WKTActions::createTINZ, &m_a)];
396 // TIN M Tagged Text
397 tinMTagged = (no_case["tin m"] >> tinMTxt)[boost::bind(&WKTActions::createTINM, &m_a)];
398 // TIN ZM Tagged Text
399 tinZMTagged = (no_case["tin zm"] >> tinZMTxt)[boost::bind(&WKTActions::createTINZM, &m_a)];
400
401 // TIN
402 tinTxt = empty | '(' >> polygonTxt >> *(',' >> polygonTxt) >> ')';
403 // TIN Z
404 tinZTxt = empty | '(' >> polygonZTxt >> *(',' >> polygonZTxt) >> ')';
405 // TIN M
406 tinMTxt = empty | '(' >> polygonMTxt >> *(',' >> polygonMTxt) >> ')';
407 // TIN ZM
408 tinZMTxt = empty | '(' >> polygonZMTxt >> *(',' >> polygonZMTxt) >> ')';
409 }
410
411 /*!
412 \brief Initializes triangle rules.
413 */
415 {
416 // Triangle Tagged Text
417 triangleTagged = (no_case["triangle"] >> triangleTxt)[boost::bind(&WKTActions::createTriangle, &m_a)];
418 // Triangle Z Tagged Text
419 triangleZTagged = (no_case["triangle z"] >> triangleZTxt)[boost::bind(&WKTActions::createTriangleZ, &m_a)];
420 // Triangle M Tagged Text
421 triangleMTagged = (no_case["triangle m"] >> triangleMTxt)[boost::bind(&WKTActions::createTriangleM, &m_a)];
422 // Triangle ZM Tagged Text
423 triangleZMTagged = (no_case["triangle zm"] >> triangleZMTxt)[boost::bind(&WKTActions::createTriangleZM, &m_a)];
424
425 // Polygon
426 triangleTxt = empty | '(' >> linearRingTxt >> *(',' >> linearRingTxt) >> ')';
427 // Polygon Z
428 triangleZTxt = empty | '(' >> linearRingZTxt >> *(',' >> linearRingZTxt) >> ')';
429 // Polygon M
430 triangleMTxt = empty | '(' >> linearRingMTxt >> *(',' >> linearRingMTxt) >> ')';
431 // Polygon ZM
432 triangleZMTxt = empty | '(' >> linearRingZMTxt >> *(',' >> linearRingZMTxt) >> ')';
433 }
434
435 /*!
436 \brief Initializes geometry collection rules.
437 */
439 {
440 // GeometryCollection Tagged Text
441 geometryCollectionTagged = (no_case["geometrycollection"] >> geometryCollectionTxt)[boost::bind(&WKTActions::createGeometryCollection, &m_a)];
442 // GeometryCollection Z Tagged Text
443 geometryCollectionZTagged = (no_case["geometrycollection z"] >> geometryCollectionZTxt)[boost::bind(&WKTActions::createGeometryCollectionZ, &m_a)];
444 // GeometryCollection M Tagged Text
445 geometryCollectionMTagged = (no_case["geometrycollection m"] >> geometryCollectionMTxt)[boost::bind(&WKTActions::createGeometryCollectionM, &m_a)];
446 // GeometryCollection ZM Tagged Text
447 geometryCollectionZMTagged = (no_case["geometrycollection zm"] >> geometryCollectionZMTxt)[boost::bind(&WKTActions::createGeometryCollectionZM, &m_a)];
448
449 // Geometry Collection
450 geometryCollectionTxt = empty | '(' >> geometryTagged >> *(',' >> geometryTagged) >> ')';
451 // GeometryCollection Z
452 geometryCollectionZTxt = empty | '(' >> geometryZTagged >> *(',' >> geometryZTagged) >> ')';
453 // GeometryCollection M
454 geometryCollectionMTxt = empty | '(' >> geometryMTagged >> *(',' >> geometryMTagged) >> ')';
455 // GeometryCollection ZM
456 geometryCollectionZMTxt = empty | '(' >> geometryZMTagged >> *(',' >> geometryZMTagged) >> ')';
457 }
458
459 //@}
460
461 public:
462
463 /** @name Access method.
464 * Method to access the geometry generated.
465 */
466 //@{
467
468 /*!
469 \brief It returns the geometry generated by the parser process.
470
471 \note The caller of this method will take the ownership of the geometry.
472 */
474
475 //@}
476
477 /*!
478 \brief This method resets the Parser to original state.
479
480 \note Should be called case the parser processing faill.
481 \note Basically, it is responsable to free the memory.
482 */
483 void reset() { m_a.reset(); }
484
485 private:
486
487 WKTActions m_a; //<! Semanthic actions to grammar rules.
488
489 /** @name Rules of WKT Grammar.
490 */
491 //@{
492
493 //<! Geometry type (root)
494 qi::rule<Iterator, ascii::space_type> geometry;
495
496 //<! Geometries
497 qi::rule<Iterator, ascii::space_type> geometryTagged, geometryZTagged, geometryMTagged, geometryZMTagged;
498
499 //<! Coordinates
500 qi::rule<Iterator, ascii::space_type> coordinate, coordinateZ, coordinateM, coordinateZM;
501
502 //<! Points
503 qi::rule<Iterator, ascii::space_type> pointTagged, pointZTagged, pointMTagged, pointZMTagged;
504
505 //<! Lines
507
508 //<! Polygons
509 qi::rule<Iterator, ascii::space_type> polygonTagged, polygonZTagged, polygonMTagged, polygonZMTagged;
510
511 //<! Polyhedral Surfaces
513
514 //<! MultiPoints
516
517 //<! MultiLines
519
520 //<! MultiPolygons
522
523 //<! Triangle
524 qi::rule<Iterator, ascii::space_type> triangleTagged, triangleZTagged, triangleMTagged, triangleZMTagged;
525
526 //<! TIN
527 qi::rule<Iterator, ascii::space_type> tinTagged, tinZTagged, tinMTagged, tinZMTagged;
528
529 //<! Geometry Collection
531
532 //<! Text format for Points
533 qi::rule<Iterator, ascii::space_type> pointTxt, pointZTxt, pointMTxt, pointZMTxt;
534
535 //<! Text format for Lines
536 qi::rule<Iterator, ascii::space_type> lineStringTxt, lineStringZTxt, lineStringMTxt, lineStringZMTxt;
537
538 //<! Text format for LinearRing
539 qi::rule<Iterator, ascii::space_type> linearRingTxt, linearRingZTxt, linearRingMTxt, linearRingZMTxt;
540
541 //<! Text format for Polygons
542 qi::rule<Iterator, ascii::space_type> polygonTxt, polygonZTxt, polygonMTxt, polygonZMTxt;
543
544 //<! Text format for Polyhedral Surfaces
546
547 //<! Text format for MultiPoints
548 qi::rule<Iterator, ascii::space_type> multiPointTxt, multiPointZTxt, multiPointMTxt, multiPointZMTxt;
549
550 //<! Text format for MultiLines
552
553 //<! Text format for MultiPolygons
554 qi::rule<Iterator, ascii::space_type> multiPolygonTxt, multiPolygonZTxt, multiPolygonMTxt, multiPolygonZMTxt;
555
556 //<! Text format for TIN
557 qi::rule<Iterator, ascii::space_type> tinTxt, tinZTxt, tinMTxt, tinZMTxt;
558
559 //<! Text format for Triangles
560 qi::rule<Iterator, ascii::space_type> triangleTxt, triangleZTxt, triangleMTxt, triangleZMTxt;
561
562 //<! Text format for GeometryCollections
564
565 //<! Empty keyword rule
566 qi::rule<Iterator, ascii::space_type> empty;
567
568 //@}
569
570 }; // WKTParser
571
572 } // namespace gm
573} // namespace te
574
575#endif // __TERRALIB_GEOMETRY_INTERNAL_WKTPARSER_H
576
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
Definition: Geometry.h:78
A class that implements the Grammar Rules for well known text (WKT) format for Geometry.
Definition: WKTActions.h:55
void createMultiPolygonM()
void createMultiPolygonZM()
void createPolyhedralSurfaceM()
void createMultiLineStringZ()
void createPolyhedralSurface()
void createMultiLineString()
Geometry * getGeometry()
It returns the geometry generated by the parser process.
void createGeometryCollectionZM()
void createGeometryCollectionZ()
void reset()
This method resets the Action class to original state.
void createGeometryCollection()
void createMultiLineStringZM()
void createMultiLineStringM()
void createPolyhedralSurfaceZM()
void createMultiPolygonZ()
void createGeometryCollectionM()
void createPolyhedralSurfaceZ()
qi::rule< Iterator, ascii::space_type > multiLineStringZTxt
Definition: WKTParser.h:551
qi::rule< Iterator, ascii::space_type > polyhedralSurfaceTxt
Definition: WKTParser.h:545
void initCoordinates()
Initializes coordinates rules.
Definition: WKTParser.h:186
qi::rule< Iterator, ascii::space_type > geometryCollectionTxt
Definition: WKTParser.h:563
qi::rule< Iterator, ascii::space_type > multiPolygonTagged
Definition: WKTParser.h:521
qi::rule< Iterator, ascii::space_type > polygonMTxt
Definition: WKTParser.h:542
qi::rule< Iterator, ascii::space_type > triangleZTagged
Definition: WKTParser.h:524
qi::rule< Iterator, ascii::space_type > multiPolygonZMTagged
Definition: WKTParser.h:521
qi::rule< Iterator, ascii::space_type > lineStringZMTagged
Definition: WKTParser.h:506
qi::rule< Iterator, ascii::space_type > tinZTagged
Definition: WKTParser.h:527
qi::rule< Iterator, ascii::space_type > multiLineStringZMTagged
Definition: WKTParser.h:518
qi::rule< Iterator, ascii::space_type > tinZMTagged
Definition: WKTParser.h:527
qi::rule< Iterator, ascii::space_type > triangleZMTagged
Definition: WKTParser.h:524
void initTriangle()
Initializes triangle rules.
Definition: WKTParser.h:414
qi::rule< Iterator, ascii::space_type > tinMTagged
Definition: WKTParser.h:527
void initTIN()
Initializes TIN rules.
Definition: WKTParser.h:390
void initGeometryCollection()
Initializes geometry collection rules.
Definition: WKTParser.h:438
qi::rule< Iterator, ascii::space_type > multiPointTagged
Definition: WKTParser.h:515
void initMultiLine()
Initializes multi line rules.
Definition: WKTParser.h:318
void initGeometriesZ()
Initializes geometries z tagged rules.
Definition: WKTParser.h:129
qi::rule< Iterator, ascii::space_type > geometryCollectionMTagged
Definition: WKTParser.h:530
qi::rule< Iterator, ascii::space_type > linearRingZTxt
Definition: WKTParser.h:539
qi::rule< Iterator, ascii::space_type > linearRingTxt
Definition: WKTParser.h:539
qi::rule< Iterator, ascii::space_type > tinMTxt
Definition: WKTParser.h:557
qi::rule< Iterator, ascii::space_type > multiPointZTagged
Definition: WKTParser.h:515
qi::rule< Iterator, ascii::space_type > pointZMTxt
Definition: WKTParser.h:533
qi::rule< Iterator, ascii::space_type > polyhedralSurfaceZMTxt
Definition: WKTParser.h:545
qi::rule< Iterator, ascii::space_type > geometryCollectionZMTagged
Definition: WKTParser.h:530
qi::rule< Iterator, ascii::space_type > polyhedralSurfaceMTagged
Definition: WKTParser.h:512
qi::rule< Iterator, ascii::space_type > pointMTxt
Definition: WKTParser.h:533
void initMultiPolygon()
Initializes multi polygon rules.
Definition: WKTParser.h:342
void initPolygon()
Initializes polygon rules.
Definition: WKTParser.h:270
void initPolyhedralSurface()
Initializes polyhedral surface rules.
Definition: WKTParser.h:366
qi::rule< Iterator, ascii::space_type > lineStringTagged
Definition: WKTParser.h:506
qi::rule< Iterator, ascii::space_type > multiPolygonZTagged
Definition: WKTParser.h:521
qi::rule< Iterator, ascii::space_type > geometryTagged
Definition: WKTParser.h:497
qi::rule< Iterator, ascii::space_type > triangleZTxt
Definition: WKTParser.h:560
qi::rule< Iterator, ascii::space_type > pointMTagged
Definition: WKTParser.h:503
qi::rule< Iterator, ascii::space_type > polygonZTxt
Definition: WKTParser.h:542
qi::rule< Iterator, ascii::space_type > multiPolygonZMTxt
Definition: WKTParser.h:554
qi::rule< Iterator, ascii::space_type > polygonZMTagged
Definition: WKTParser.h:509
qi::rule< Iterator, ascii::space_type > polygonZTagged
Definition: WKTParser.h:509
qi::rule< Iterator, ascii::space_type > tinTagged
Definition: WKTParser.h:527
qi::rule< Iterator, ascii::space_type > multiPointTxt
Definition: WKTParser.h:548
qi::rule< Iterator, ascii::space_type > polyhedralSurfaceTagged
Definition: WKTParser.h:512
qi::rule< Iterator, ascii::space_type > triangleZMTxt
Definition: WKTParser.h:560
qi::rule< Iterator, ascii::space_type > polyhedralSurfaceMTxt
Definition: WKTParser.h:545
qi::rule< Iterator, ascii::space_type > pointZMTagged
Definition: WKTParser.h:503
qi::rule< Iterator, ascii::space_type > multiPolygonTxt
Definition: WKTParser.h:554
qi::rule< Iterator, ascii::space_type > multiLineStringZMTxt
Definition: WKTParser.h:551
qi::rule< Iterator, ascii::space_type > tinTxt
Definition: WKTParser.h:557
qi::rule< Iterator, ascii::space_type > tinZTxt
Definition: WKTParser.h:557
qi::rule< Iterator, ascii::space_type > geometry
Definition: WKTParser.h:494
qi::rule< Iterator, ascii::space_type > lineStringZTagged
Definition: WKTParser.h:506
qi::rule< Iterator, ascii::space_type > lineStringZTxt
Definition: WKTParser.h:536
qi::rule< Iterator, ascii::space_type > multiPointZTxt
Definition: WKTParser.h:548
qi::rule< Iterator, ascii::space_type > geometryCollectionZTagged
Definition: WKTParser.h:530
qi::rule< Iterator, ascii::space_type > polygonZMTxt
Definition: WKTParser.h:542
qi::rule< Iterator, ascii::space_type > polygonMTagged
Definition: WKTParser.h:509
qi::rule< Iterator, ascii::space_type > pointZTagged
Definition: WKTParser.h:503
WKTParser()
Default constructor.
Definition: WKTParser.h:72
qi::rule< Iterator, ascii::space_type > geometryZTagged
Definition: WKTParser.h:497
qi::rule< Iterator, ascii::space_type > linearRingMTxt
Definition: WKTParser.h:539
qi::rule< Iterator, ascii::space_type > coordinateZM
Definition: WKTParser.h:500
WKTActions m_a
Definition: WKTParser.h:487
qi::rule< Iterator, ascii::space_type > multiLineStringZTagged
Definition: WKTParser.h:518
qi::rule< Iterator, ascii::space_type > lineStringZMTxt
Definition: WKTParser.h:536
qi::rule< Iterator, ascii::space_type > polyhedralSurfaceZTagged
Definition: WKTParser.h:512
qi::rule< Iterator, ascii::space_type > polyhedralSurfaceZTxt
Definition: WKTParser.h:545
qi::rule< Iterator, ascii::space_type > geometryZMTagged
Definition: WKTParser.h:497
qi::rule< Iterator, ascii::space_type > empty
Definition: WKTParser.h:566
qi::rule< Iterator, ascii::space_type > coordinateM
Definition: WKTParser.h:500
qi::rule< Iterator, ascii::space_type > pointTagged
Definition: WKTParser.h:503
qi::rule< Iterator, ascii::space_type > polygonTxt
Definition: WKTParser.h:542
qi::rule< Iterator, ascii::space_type > multiPolygonMTagged
Definition: WKTParser.h:521
qi::rule< Iterator, ascii::space_type > lineStringMTxt
Definition: WKTParser.h:536
Geometry * getGeometry()
It returns the geometry generated by the parser process.
Definition: WKTParser.h:473
qi::rule< Iterator, ascii::space_type > triangleTagged
Definition: WKTParser.h:524
qi::rule< Iterator, ascii::space_type > multiPolygonMTxt
Definition: WKTParser.h:554
qi::rule< Iterator, ascii::space_type > multiPolygonZTxt
Definition: WKTParser.h:554
qi::rule< Iterator, ascii::space_type > tinZMTxt
Definition: WKTParser.h:557
qi::rule< Iterator, ascii::space_type > triangleMTxt
Definition: WKTParser.h:560
qi::rule< Iterator, ascii::space_type > lineStringTxt
Definition: WKTParser.h:536
qi::rule< Iterator, ascii::space_type > multiLineStringMTagged
Definition: WKTParser.h:518
qi::rule< Iterator, ascii::space_type > multiPointZMTagged
Definition: WKTParser.h:515
qi::rule< Iterator, ascii::space_type > linearRingZMTxt
Definition: WKTParser.h:539
qi::rule< Iterator, ascii::space_type > pointZTxt
Definition: WKTParser.h:533
void initGeometriesZM()
Initializes geometries zm tagged rules.
Definition: WKTParser.h:167
void reset()
This method resets the Parser to original state.
Definition: WKTParser.h:483
qi::rule< Iterator, ascii::space_type > coordinateZ
Definition: WKTParser.h:500
qi::rule< Iterator, ascii::space_type > geometryMTagged
Definition: WKTParser.h:497
qi::rule< Iterator, ascii::space_type > geometryCollectionTagged
Definition: WKTParser.h:530
qi::rule< Iterator, ascii::space_type > triangleTxt
Definition: WKTParser.h:560
void initPoint()
Initializes point rules.
Definition: WKTParser.h:213
void initMultiPoint()
Initializes multi point rules.
Definition: WKTParser.h:294
void initGeometriesM()
Initializes geometries m tagged rules.
Definition: WKTParser.h:148
qi::rule< Iterator, ascii::space_type > triangleMTagged
Definition: WKTParser.h:524
qi::rule< Iterator, ascii::space_type > multiLineStringTxt
Definition: WKTParser.h:551
qi::rule< Iterator, ascii::space_type > geometryCollectionZMTxt
Definition: WKTParser.h:563
qi::rule< Iterator, ascii::space_type > geometryCollectionZTxt
Definition: WKTParser.h:563
qi::rule< Iterator, ascii::space_type > multiPointMTxt
Definition: WKTParser.h:548
qi::rule< Iterator, ascii::space_type > coordinate
Definition: WKTParser.h:500
qi::rule< Iterator, ascii::space_type > pointTxt
Definition: WKTParser.h:533
void initGeometries()
Initializes geometry tagged rules.
Definition: WKTParser.h:110
qi::rule< Iterator, ascii::space_type > multiPointZMTxt
Definition: WKTParser.h:548
qi::rule< Iterator, ascii::space_type > multiLineStringTagged
Definition: WKTParser.h:518
qi::rule< Iterator, ascii::space_type > lineStringMTagged
Definition: WKTParser.h:506
qi::rule< Iterator, ascii::space_type > geometryCollectionMTxt
Definition: WKTParser.h:563
qi::rule< Iterator, ascii::space_type > multiPointMTagged
Definition: WKTParser.h:515
void initLine()
Initializes line rules.
Definition: WKTParser.h:237
qi::rule< Iterator, ascii::space_type > polyhedralSurfaceZMTagged
Definition: WKTParser.h:512
qi::rule< Iterator, ascii::space_type > polygonTagged
Definition: WKTParser.h:509
qi::rule< Iterator, ascii::space_type > multiLineStringMTxt
Definition: WKTParser.h:551
TerraLib.
A class that implements the semanthic actions to grammar rules for well known text (WKT) format for S...