GDAL
ogr_featurestyle.h
Go to the documentation of this file.
1/******************************************************************************
2 *
3 * Project: OpenGIS Simple Features Reference Implementation
4 * Purpose: Define of Feature Representation
5 * Author: Stephane Villeneuve, stephane.v@videtron.ca
6 *
7 ******************************************************************************
8 * Copyright (c) 1999, Frank Warmerdam
9 *
10 * SPDX-License-Identifier: MIT
11 ****************************************************************************/
12
13#ifndef OGR_FEATURESTYLE_INCLUDE
14#define OGR_FEATURESTYLE_INCLUDE
15
16#include "cpl_conv.h"
17#include "cpl_string.h"
18#include "ogr_core.h"
19
20class OGRFeature;
21
28/*
29 * All OGRStyleTool param lists are defined in ogr_core.h.
30 */
31
33typedef enum ogr_style_type
34{
35 OGRSTypeUnused = -1,
36 OGRSTypeString,
37 OGRSTypeDouble,
38 OGRSTypeInteger,
39 OGRSTypeBoolean
41
43typedef struct ogr_style_param
44{
45 int eParam;
46 const char *pszToken;
47 GBool bGeoref;
48 OGRSType eType;
49} OGRStyleParamId;
50
51typedef struct ogr_style_value
52{
53 char *pszValue;
54 double dfValue;
55 int nValue; // Used for both integer and boolean types
56 GBool bValid;
57 OGRSTUnitId eUnit;
58} OGRStyleValue;
59
61
62// Every time a pszStyleString given in parameter is NULL,
63// the StyleString defined in the Mgr will be use.
64
68class CPL_DLL OGRStyleTable
69{
70 private:
71 char **m_papszStyleTable = nullptr;
72
73 CPLString osLastRequestedStyleName{};
74 int iNextStyle = 0;
75
77
78 public:
81 GBool AddStyle(const char *pszName, const char *pszStyleString);
82 GBool RemoveStyle(const char *pszName);
83 GBool ModifyStyle(const char *pszName, const char *pszStyleString);
84
85 GBool SaveStyleTable(const char *pszFilename);
86 GBool LoadStyleTable(const char *pszFilename);
87 const char *Find(const char *pszStyleString);
88 GBool IsExist(const char *pszName);
89 const char *GetStyleName(const char *pszName);
90 void Print(FILE *fpOut);
91 void Clear();
92 OGRStyleTable *Clone();
93 void ResetStyleStringReading();
94 const char *GetNextStyle();
95 const char *GetLastStyleName();
96};
97
98class OGRStyleTool;
99
103class CPL_DLL OGRStyleMgr
104{
105 private:
106 OGRStyleTable *m_poDataSetStyleTable = nullptr;
107 char *m_pszStyleString = nullptr;
108
110
111 public:
112 explicit OGRStyleMgr(OGRStyleTable *poDataSetStyleTable = nullptr);
113 ~OGRStyleMgr();
114
115 GBool SetFeatureStyleString(OGRFeature *,
116 const char *pszStyleString = nullptr,
117 GBool bNoMatching = FALSE);
118 /* It will set in the given feature the pszStyleString with
119 the style or will set the style name found in
120 dataset StyleTable (if bNoMatching == FALSE). */
121
122 const char *InitFromFeature(OGRFeature *);
123 GBool InitStyleString(const char *pszStyleString = nullptr);
124
125 const char *GetStyleName(const char *pszStyleString = nullptr);
126 const char *GetStyleByName(const char *pszStyleName);
127
128 GBool AddStyle(const char *pszStyleName,
129 const char *pszStyleString = nullptr);
130
131 const char *GetStyleString(OGRFeature * = nullptr);
132
133 GBool AddPart(OGRStyleTool *);
134 GBool AddPart(const char *);
135
136 int GetPartCount(const char *pszStyleString = nullptr);
137 OGRStyleTool *GetPart(int hPartId, const char *pszStyleString = nullptr);
138
139 /* It could have a reference counting process us for the OGRStyleTable, if
140 needed. */
142 OGRStyleTable *GetDataSetStyleTable()
143 {
144 return m_poDataSetStyleTable;
145 }
146
147 static OGRStyleTool *
148 CreateStyleToolFromStyleString(const char *pszStyleString);
150};
151
155class CPL_DLL OGRStyleTool
156{
157 private:
158 GBool m_bModified = false;
159 GBool m_bParsed = false;
160 double m_dfScale = 1.0;
161 OGRSTUnitId m_eUnit = OGRSTUMM;
162 OGRSTClassId m_eClassId = OGRSTCNone;
163 char *m_pszStyleString = nullptr;
164
165 virtual GBool Parse() = 0;
166
168
169 protected:
170#ifndef DOXYGEN_SKIP
171 GBool Parse(const OGRStyleParamId *pasStyle, OGRStyleValue *pasValue,
172 int nCount);
173#endif
174
175 public:
177 : m_bModified(FALSE), m_bParsed(FALSE), m_dfScale(0.0),
178 m_eUnit(OGRSTUGround), m_eClassId(OGRSTCNone),
179 m_pszStyleString(nullptr)
180 {
181 }
182
183 explicit OGRStyleTool(OGRSTClassId eClassId);
184 virtual ~OGRStyleTool();
185
186 static GBool GetRGBFromString(const char *pszColor, int &nRed, int &nGreen,
187 int &nBlue, int &nTransparence);
188 static int GetSpecificId(const char *pszId, const char *pszWanted);
189
190#ifndef DOXYGEN_SKIP
191 GBool IsStyleModified()
192 {
193 return m_bModified;
194 }
195
196 void StyleModified()
197 {
198 m_bModified = TRUE;
199 }
200
201 GBool IsStyleParsed()
202 {
203 return m_bParsed;
204 }
205
206 void StyleParsed()
207 {
208 m_bParsed = TRUE;
209 }
210#endif
211
212 OGRSTClassId GetType();
213
214#ifndef DOXYGEN_SKIP
215 void SetInternalInputUnitFromParam(char *pszString);
216#endif
217
218 void SetUnit(OGRSTUnitId,
219 double dfScale = 1.0); // the dfScale will be
220
221 // used if we are working with Ground
222 // Unit ( ground = paper * scale);
223
225 {
226 return m_eUnit;
227 }
228
229 // There are two way to set the parameters in the Style, with generic
230 // methods (using a defined enumeration) or with the reel method specific
231 // for Each style tools.
232
233 virtual const char *GetStyleString() = 0;
234 void SetStyleString(const char *pszStyleString);
235 const char *GetStyleString(const OGRStyleParamId *pasStyleParam,
236 OGRStyleValue *pasStyleValue, int nSize);
237
238 const char *GetParamStr(const OGRStyleParamId &sStyleParam,
239 const OGRStyleValue &sStyleValue,
240 GBool &bValueIsNull);
241
242 int GetParamNum(const OGRStyleParamId &sStyleParam,
243 const OGRStyleValue &sStyleValue, GBool &bValueIsNull);
244
245 double GetParamDbl(const OGRStyleParamId &sStyleParam,
246 const OGRStyleValue &sStyleValue, GBool &bValueIsNull);
247
248 double GetRawParamDbl(const OGRStyleParamId &sStyleParam,
249 const OGRStyleValue &sStyleValue,
250 OGRSTUnitId &eRawUnit, GBool &bValueIsNull);
251
252 void SetParamStr(const OGRStyleParamId &sStyleParam,
253 OGRStyleValue &sStyleValue, const char *pszParamString);
254
255 void SetParamNum(const OGRStyleParamId &sStyleParam,
256 OGRStyleValue &sStyleValue, int nParam);
257
258 void SetParamDbl(const OGRStyleParamId &sStyleParam,
259 OGRStyleValue &sStyleValue, double dfParam);
260#ifndef DOXYGEN_SKIP
261 double ComputeWithUnit(double, OGRSTUnitId);
262 int ComputeWithUnit(int, OGRSTUnitId);
263#endif
264};
265
267
271class CPL_DLL OGRStylePen : public OGRStyleTool
272{
273 private:
274 OGRStyleValue *m_pasStyleValue;
275
276 GBool Parse() override;
277
278 CPL_DISALLOW_COPY_ASSIGN(OGRStylePen)
279
280 public:
281 OGRStylePen();
282 ~OGRStylePen() override;
283
284 /**********************************************************************/
285 /* Explicit fct for all parameters defined in the Drawing tools Pen */
286 /**********************************************************************/
287
288 const char *Color(GBool &bDefault)
289 {
290 return GetParamStr(OGRSTPenColor, bDefault);
291 }
292
293 void SetColor(const char *pszColor)
294 {
295 SetParamStr(OGRSTPenColor, pszColor);
296 }
297
298 double Width(GBool &bDefault)
299 {
300 return GetParamDbl(OGRSTPenWidth, bDefault);
301 }
302
303 double RawWidth(OGRSTUnitId &eRawUnit, GBool &bDefault)
304 {
305 return GetRawParamDbl(OGRSTPenWidth, eRawUnit, bDefault);
306 }
307
308 void SetWidth(double dfWidth)
309 {
310 SetParamDbl(OGRSTPenWidth, dfWidth);
311 }
312
313 const char *Pattern(GBool &bDefault)
314 {
315 return GetParamStr(OGRSTPenPattern, bDefault);
316 }
317
318 void SetPattern(const char *pszPattern)
319 {
320 SetParamStr(OGRSTPenPattern, pszPattern);
321 }
322
323 const char *Id(GBool &bDefault)
324 {
325 return GetParamStr(OGRSTPenId, bDefault);
326 }
327
328 void SetId(const char *pszId)
329 {
330 SetParamStr(OGRSTPenId, pszId);
331 }
332
333 double PerpendicularOffset(GBool &bDefault)
334 {
335 return GetParamDbl(OGRSTPenPerOffset, bDefault);
336 }
337
338 void SetPerpendicularOffset(double dfPerp)
339 {
340 SetParamDbl(OGRSTPenPerOffset, dfPerp);
341 }
342
343 const char *Cap(GBool &bDefault)
344 {
345 return GetParamStr(OGRSTPenCap, bDefault);
346 }
347
348 void SetCap(const char *pszCap)
349 {
350 SetParamStr(OGRSTPenCap, pszCap);
351 }
352
353 const char *Join(GBool &bDefault)
354 {
355 return GetParamStr(OGRSTPenJoin, bDefault);
356 }
357
358 void SetJoin(const char *pszJoin)
359 {
360 SetParamStr(OGRSTPenJoin, pszJoin);
361 }
362
363 int Priority(GBool &bDefault)
364 {
365 return GetParamNum(OGRSTPenPriority, bDefault);
366 }
367
368 void SetPriority(int nPriority)
369 {
370 SetParamNum(OGRSTPenPriority, nPriority);
371 }
372
373 /*****************************************************************/
374
375 const char *GetParamStr(OGRSTPenParam eParam, GBool &bValueIsNull);
376 int GetParamNum(OGRSTPenParam eParam, GBool &bValueIsNull);
377 double GetParamDbl(OGRSTPenParam eParam, GBool &bValueIsNull);
378 double GetRawParamDbl(OGRSTPenParam eParam, OGRSTUnitId &eRawUnit,
379 GBool &bValueIsNull);
380 void SetParamStr(OGRSTPenParam eParam, const char *pszParamString);
381 void SetParamNum(OGRSTPenParam eParam, int nParam);
382 void SetParamDbl(OGRSTPenParam eParam, double dfParam);
383 const char *GetStyleString() override;
384};
385
389class CPL_DLL OGRStyleBrush : public OGRStyleTool
390{
391 private:
392 OGRStyleValue *m_pasStyleValue;
393
394 GBool Parse() override;
395
396 CPL_DISALLOW_COPY_ASSIGN(OGRStyleBrush)
397
398 public:
399 OGRStyleBrush();
400 ~OGRStyleBrush() override;
401
402 /* Explicit fct for all parameters defined in the Drawing tools Brush */
403
404 const char *ForeColor(GBool &bDefault)
405 {
406 return GetParamStr(OGRSTBrushFColor, bDefault);
407 }
408
409 void SetForeColor(const char *pszColor)
410 {
411 SetParamStr(OGRSTBrushFColor, pszColor);
412 }
413
414 const char *BackColor(GBool &bDefault)
415 {
416 return GetParamStr(OGRSTBrushBColor, bDefault);
417 }
418
419 void SetBackColor(const char *pszColor)
420 {
421 SetParamStr(OGRSTBrushBColor, pszColor);
422 }
423
424 const char *Id(GBool &bDefault)
425 {
426 return GetParamStr(OGRSTBrushId, bDefault);
427 }
428
429 void SetId(const char *pszId)
430 {
431 SetParamStr(OGRSTBrushId, pszId);
432 }
433
434 double Angle(GBool &bDefault)
435 {
436 return GetParamDbl(OGRSTBrushAngle, bDefault);
437 }
438
439 void SetAngle(double dfAngle)
440 {
441 SetParamDbl(OGRSTBrushAngle, dfAngle);
442 }
443
444 double Size(GBool &bDefault)
445 {
446 return GetParamDbl(OGRSTBrushSize, bDefault);
447 }
448
449 void SetSize(double dfSize)
450 {
451 SetParamDbl(OGRSTBrushSize, dfSize);
452 }
453
454 double SpacingX(GBool &bDefault)
455 {
456 return GetParamDbl(OGRSTBrushDx, bDefault);
457 }
458
459 void SetSpacingX(double dfX)
460 {
461 SetParamDbl(OGRSTBrushDx, dfX);
462 }
463
464 double SpacingY(GBool &bDefault)
465 {
466 return GetParamDbl(OGRSTBrushDy, bDefault);
467 }
468
469 void SetSpacingY(double dfY)
470 {
471 SetParamDbl(OGRSTBrushDy, dfY);
472 }
473
474 int Priority(GBool &bDefault)
475 {
476 return GetParamNum(OGRSTBrushPriority, bDefault);
477 }
478
479 void SetPriority(int nPriority)
480 {
481 SetParamNum(OGRSTBrushPriority, nPriority);
482 }
483
484 /*****************************************************************/
485
486 const char *GetParamStr(OGRSTBrushParam eParam, GBool &bValueIsNull);
487 int GetParamNum(OGRSTBrushParam eParam, GBool &bValueIsNull);
488 double GetParamDbl(OGRSTBrushParam eParam, GBool &bValueIsNull);
489 void SetParamStr(OGRSTBrushParam eParam, const char *pszParamString);
490 void SetParamNum(OGRSTBrushParam eParam, int nParam);
491 void SetParamDbl(OGRSTBrushParam eParam, double dfParam);
492 const char *GetStyleString() override;
493};
494
498class CPL_DLL OGRStyleSymbol : public OGRStyleTool
499{
500 private:
501 OGRStyleValue *m_pasStyleValue;
502
503 GBool Parse() override;
504
505 CPL_DISALLOW_COPY_ASSIGN(OGRStyleSymbol)
506
507 public:
508 OGRStyleSymbol();
509 ~OGRStyleSymbol() override;
510
511 /*****************************************************************/
512 /* Explicit fct for all parameters defined in the Drawing tools */
513 /*****************************************************************/
514
515 const char *Id(GBool &bDefault)
516 {
517 return GetParamStr(OGRSTSymbolId, bDefault);
518 }
519
520 void SetId(const char *pszId)
521 {
522 SetParamStr(OGRSTSymbolId, pszId);
523 }
524
525 double Angle(GBool &bDefault)
526 {
527 return GetParamDbl(OGRSTSymbolAngle, bDefault);
528 }
529
530 void SetAngle(double dfAngle)
531 {
532 SetParamDbl(OGRSTSymbolAngle, dfAngle);
533 }
534
535 const char *Color(GBool &bDefault)
536 {
537 return GetParamStr(OGRSTSymbolColor, bDefault);
538 }
539
540 void SetColor(const char *pszColor)
541 {
542 SetParamStr(OGRSTSymbolColor, pszColor);
543 }
544
545 double Size(GBool &bDefault)
546 {
547 return GetParamDbl(OGRSTSymbolSize, bDefault);
548 }
549
550 void SetSize(double dfSize)
551 {
552 SetParamDbl(OGRSTSymbolSize, dfSize);
553 }
554
555 double SpacingX(GBool &bDefault)
556 {
557 return GetParamDbl(OGRSTSymbolDx, bDefault);
558 }
559
560 void SetSpacingX(double dfX)
561 {
562 SetParamDbl(OGRSTSymbolDx, dfX);
563 }
564
565 double SpacingY(GBool &bDefault)
566 {
567 return GetParamDbl(OGRSTSymbolDy, bDefault);
568 }
569
570 void SetSpacingY(double dfY)
571 {
572 SetParamDbl(OGRSTSymbolDy, dfY);
573 }
574
575 double Step(GBool &bDefault)
576 {
577 return GetParamDbl(OGRSTSymbolStep, bDefault);
578 }
579
580 void SetStep(double dfStep)
581 {
582 SetParamDbl(OGRSTSymbolStep, dfStep);
583 }
584
585 double Offset(GBool &bDefault)
586 {
587 return GetParamDbl(OGRSTSymbolOffset, bDefault);
588 }
589
590 void SetOffset(double dfOffset)
591 {
592 SetParamDbl(OGRSTSymbolOffset, dfOffset);
593 }
594
595 double Perp(GBool &bDefault)
596 {
597 return GetParamDbl(OGRSTSymbolPerp, bDefault);
598 }
599
600 void SetPerp(double dfPerp)
601 {
602 SetParamDbl(OGRSTSymbolPerp, dfPerp);
603 }
604
605 int Priority(GBool &bDefault)
606 {
607 return GetParamNum(OGRSTSymbolPriority, bDefault);
608 }
609
610 void SetPriority(int nPriority)
611 {
612 SetParamNum(OGRSTSymbolPriority, nPriority);
613 }
614
615 const char *FontName(GBool &bDefault)
616 {
617 return GetParamStr(OGRSTSymbolFontName, bDefault);
618 }
619
620 void SetFontName(const char *pszFontName)
621 {
622 SetParamStr(OGRSTSymbolFontName, pszFontName);
623 }
624
625 const char *OColor(GBool &bDefault)
626 {
627 return GetParamStr(OGRSTSymbolOColor, bDefault);
628 }
629
630 void SetOColor(const char *pszColor)
631 {
632 SetParamStr(OGRSTSymbolOColor, pszColor);
633 }
634
635 /*****************************************************************/
636
637 const char *GetParamStr(OGRSTSymbolParam eParam, GBool &bValueIsNull);
638 int GetParamNum(OGRSTSymbolParam eParam, GBool &bValueIsNull);
639 double GetParamDbl(OGRSTSymbolParam eParam, GBool &bValueIsNull);
640 void SetParamStr(OGRSTSymbolParam eParam, const char *pszParamString);
641 void SetParamNum(OGRSTSymbolParam eParam, int nParam);
642 void SetParamDbl(OGRSTSymbolParam eParam, double dfParam);
643 const char *GetStyleString() override;
644};
645
649class CPL_DLL OGRStyleLabel : public OGRStyleTool
650{
651 private:
652 OGRStyleValue *m_pasStyleValue;
653
654 GBool Parse() override;
655
656 CPL_DISALLOW_COPY_ASSIGN(OGRStyleLabel)
657
658 public:
659 OGRStyleLabel();
660 ~OGRStyleLabel() override;
661
662 /*****************************************************************/
663 /* Explicit fct for all parameters defined in the Drawing tools */
664 /*****************************************************************/
665
666 const char *FontName(GBool &bDefault)
667 {
668 return GetParamStr(OGRSTLabelFontName, bDefault);
669 }
670
671 void SetFontName(const char *pszFontName)
672 {
673 SetParamStr(OGRSTLabelFontName, pszFontName);
674 }
675
676 double Size(GBool &bDefault)
677 {
678 return GetParamDbl(OGRSTLabelSize, bDefault);
679 }
680
681 void SetSize(double dfSize)
682 {
683 SetParamDbl(OGRSTLabelSize, dfSize);
684 }
685
686 const char *TextString(GBool &bDefault)
687 {
688 return GetParamStr(OGRSTLabelTextString, bDefault);
689 }
690
691 void SetTextString(const char *pszTextString)
692 {
693 SetParamStr(OGRSTLabelTextString, pszTextString);
694 }
695
696 double Angle(GBool &bDefault)
697 {
698 return GetParamDbl(OGRSTLabelAngle, bDefault);
699 }
700
701 void SetAngle(double dfAngle)
702 {
703 SetParamDbl(OGRSTLabelAngle, dfAngle);
704 }
705
706 const char *ForeColor(GBool &bDefault)
707 {
708 return GetParamStr(OGRSTLabelFColor, bDefault);
709 }
710
711 void SetForColor(const char *pszForColor)
712 {
713 SetParamStr(OGRSTLabelFColor, pszForColor);
714 }
715
716 const char *BackColor(GBool &bDefault)
717 {
718 return GetParamStr(OGRSTLabelBColor, bDefault);
719 }
720
721 void SetBackColor(const char *pszBackColor)
722 {
723 SetParamStr(OGRSTLabelBColor, pszBackColor);
724 }
725
726 const char *Placement(GBool &bDefault)
727 {
728 return GetParamStr(OGRSTLabelPlacement, bDefault);
729 }
730
731 void SetPlacement(const char *pszPlacement)
732 {
733 SetParamStr(OGRSTLabelPlacement, pszPlacement);
734 }
735
736 int Anchor(GBool &bDefault)
737 {
738 return GetParamNum(OGRSTLabelAnchor, bDefault);
739 }
740
741 void SetAnchor(int nAnchor)
742 {
743 SetParamNum(OGRSTLabelAnchor, nAnchor);
744 }
745
746 double SpacingX(GBool &bDefault)
747 {
748 return GetParamDbl(OGRSTLabelDx, bDefault);
749 }
750
751 void SetSpacingX(double dfX)
752 {
753 SetParamDbl(OGRSTLabelDx, dfX);
754 }
755
756 double SpacingY(GBool &bDefault)
757 {
758 return GetParamDbl(OGRSTLabelDy, bDefault);
759 }
760
761 void SetSpacingY(double dfY)
762 {
763 SetParamDbl(OGRSTLabelDy, dfY);
764 }
765
766 double Perp(GBool &bDefault)
767 {
768 return GetParamDbl(OGRSTLabelPerp, bDefault);
769 }
770
771 void SetPerp(double dfPerp)
772 {
773 SetParamDbl(OGRSTLabelPerp, dfPerp);
774 }
775
776 GBool Bold(GBool &bDefault)
777 {
778 return GetParamNum(OGRSTLabelBold, bDefault);
779 }
780
781 void SetBold(GBool bBold)
782 {
783 SetParamNum(OGRSTLabelBold, bBold);
784 }
785
786 GBool Italic(GBool &bDefault)
787 {
788 return GetParamNum(OGRSTLabelItalic, bDefault);
789 }
790
791 void SetItalic(GBool bItalic)
792 {
793 SetParamNum(OGRSTLabelItalic, bItalic);
794 }
795
796 GBool Underline(GBool &bDefault)
797 {
798 return GetParamNum(OGRSTLabelUnderline, bDefault);
799 }
800
801 void SetUnderline(GBool bUnderline)
802 {
803 SetParamNum(OGRSTLabelUnderline, bUnderline);
804 }
805
806 int Priority(GBool &bDefault)
807 {
808 return GetParamNum(OGRSTLabelPriority, bDefault);
809 }
810
811 void SetPriority(int nPriority)
812 {
813 SetParamNum(OGRSTLabelPriority, nPriority);
814 }
815
816 GBool Strikeout(GBool &bDefault)
817 {
818 return GetParamNum(OGRSTLabelStrikeout, bDefault);
819 }
820
821 void SetStrikeout(GBool bStrikeout)
822 {
823 SetParamNum(OGRSTLabelStrikeout, bStrikeout);
824 }
825
826 double Stretch(GBool &bDefault)
827 {
828 return GetParamDbl(OGRSTLabelStretch, bDefault);
829 }
830
831 void SetStretch(double dfStretch)
832 {
833 SetParamDbl(OGRSTLabelStretch, dfStretch);
834 }
835
836 const char *ShadowColor(GBool &bDefault)
837 {
838 return GetParamStr(OGRSTLabelHColor, bDefault);
839 }
840
841 void SetShadowColor(const char *pszShadowColor)
842 {
843 SetParamStr(OGRSTLabelHColor, pszShadowColor);
844 }
845
846 const char *OutlineColor(GBool &bDefault)
847 {
848 return GetParamStr(OGRSTLabelOColor, bDefault);
849 }
850
851 void SetOutlineColor(const char *pszOutlineColor)
852 {
853 SetParamStr(OGRSTLabelOColor, pszOutlineColor);
854 }
855
856 /*****************************************************************/
857
858 const char *GetParamStr(OGRSTLabelParam eParam, GBool &bValueIsNull);
859 int GetParamNum(OGRSTLabelParam eParam, GBool &bValueIsNull);
860 double GetParamDbl(OGRSTLabelParam eParam, GBool &bValueIsNull);
861 void SetParamStr(OGRSTLabelParam eParam, const char *pszParamString);
862 void SetParamNum(OGRSTLabelParam eParam, int nParam);
863 void SetParamDbl(OGRSTLabelParam eParam, double dfParam);
864 const char *GetStyleString() override;
865};
866
868
869#endif /* OGR_FEATURESTYLE_INCLUDE */
Convenient string class based on std::string.
Definition cpl_string.h:338
A simple feature, including geometry and attributes.
Definition ogr_feature.h:1041
This class represents a style manager.
Definition ogr_featurestyle.h:104
This class represents a style table.
Definition ogr_featurestyle.h:69
This class represents a style tool.
Definition ogr_featurestyle.h:156
virtual const char * GetStyleString()=0
Get the style string for this Style Tool.
OGRSTUnitId GetUnit()
Get Style Tool units.
Definition ogr_featurestyle.h:224
Various convenience functions for CPL.
int GBool
Type for boolean values (alias to int)
Definition cpl_port.h:176
#define CPL_DISALLOW_COPY_ASSIGN(ClassName)
Helper to remove the copy and assignment constructors so that the compiler will not generate the defa...
Definition cpl_port.h:1101
Various convenience functions for working with strings and string lists.
Core portability services for cross-platform OGR code.
@ OGRSTSymbolDy
Dy.
Definition ogr_core.h:1169
@ OGRSTSymbolId
Id.
Definition ogr_core.h:1164
@ OGRSTSymbolSize
Size.
Definition ogr_core.h:1167
@ OGRSTSymbolFontName
Font name.
Definition ogr_core.h:1174
@ OGRSTSymbolColor
Color.
Definition ogr_core.h:1166
@ OGRSTSymbolDx
Dx.
Definition ogr_core.h:1168
@ OGRSTSymbolPerp
Perpendicular.
Definition ogr_core.h:1171
@ OGRSTSymbolAngle
Angle.
Definition ogr_core.h:1165
@ OGRSTSymbolOColor
Outline color.
Definition ogr_core.h:1175
@ OGRSTSymbolPriority
Priority.
Definition ogr_core.h:1173
@ OGRSTSymbolStep
Step.
Definition ogr_core.h:1170
@ OGRSTSymbolOffset
Offset.
Definition ogr_core.h:1172
enum ogr_style_tool_param_symbol_id OGRSTSymbolParam
List of parameters for use with OGRStyleSymbol.
enum ogr_style_tool_param_pen_id OGRSTPenParam
List of parameters for use with OGRStylePen.
@ OGRSTLabelUnderline
Underline.
Definition ogr_core.h:1199
@ OGRSTLabelPriority
Priority.
Definition ogr_core.h:1200
@ OGRSTLabelBold
Bold.
Definition ogr_core.h:1197
@ OGRSTLabelStrikeout
Strike out.
Definition ogr_core.h:1201
@ OGRSTLabelBColor
Background color.
Definition ogr_core.h:1191
@ OGRSTLabelPlacement
Placement.
Definition ogr_core.h:1192
@ OGRSTLabelPerp
Perpendicular.
Definition ogr_core.h:1196
@ OGRSTLabelOColor
Outline color.
Definition ogr_core.h:1206
@ OGRSTLabelDx
Dx.
Definition ogr_core.h:1194
@ OGRSTLabelHColor
Highlight color.
Definition ogr_core.h:1205
@ OGRSTLabelItalic
Italic.
Definition ogr_core.h:1198
@ OGRSTLabelTextString
Text string.
Definition ogr_core.h:1188
@ OGRSTLabelSize
Size.
Definition ogr_core.h:1187
@ OGRSTLabelAngle
Angle.
Definition ogr_core.h:1189
@ OGRSTLabelFColor
Foreground color.
Definition ogr_core.h:1190
@ OGRSTLabelDy
Dy.
Definition ogr_core.h:1195
@ OGRSTLabelFontName
Font name.
Definition ogr_core.h:1186
@ OGRSTLabelStretch
Stretch.
Definition ogr_core.h:1202
@ OGRSTLabelAnchor
Anchor.
Definition ogr_core.h:1193
@ OGRSTUGround
Ground unit.
Definition ogr_core.h:1114
@ OGRSTUMM
Millimeter.
Definition ogr_core.h:1117
enum ogr_style_tool_class_id OGRSTClassId
OGRStyleTool derived class types (returned by GetType()).
enum ogr_style_tool_units_id OGRSTUnitId
List of units supported by OGRStyleTools.
enum ogr_style_tool_param_brush_id OGRSTBrushParam
List of parameters for use with OGRStyleBrush.
enum ogr_style_tool_param_label_id OGRSTLabelParam
List of parameters for use with OGRStyleLabel.
@ OGRSTBrushAngle
Angle.
Definition ogr_core.h:1148
@ OGRSTBrushId
Id.
Definition ogr_core.h:1147
@ OGRSTBrushPriority
Priority.
Definition ogr_core.h:1152
@ OGRSTBrushBColor
Background color.
Definition ogr_core.h:1146
@ OGRSTBrushSize
Size.
Definition ogr_core.h:1149
@ OGRSTBrushDy
Dy.
Definition ogr_core.h:1151
@ OGRSTBrushFColor
Foreground color.
Definition ogr_core.h:1145
@ OGRSTBrushDx
Dx.
Definition ogr_core.h:1150
@ OGRSTCNone
None.
Definition ogr_core.h:1101
@ OGRSTPenId
Id.
Definition ogr_core.h:1130
@ OGRSTPenCap
Cap.
Definition ogr_core.h:1132
@ OGRSTPenPerOffset
Perpendicular offset.
Definition ogr_core.h:1131
@ OGRSTPenWidth
Width.
Definition ogr_core.h:1128
@ OGRSTPenColor
Color.
Definition ogr_core.h:1127
@ OGRSTPenJoin
Join.
Definition ogr_core.h:1133
@ OGRSTPenPriority
Priority.
Definition ogr_core.h:1134
@ OGRSTPenPattern
Pattern.
Definition ogr_core.h:1129
ogr_style_type
OGR Style type.
Definition ogr_featurestyle.h:34
enum ogr_style_type OGRSType
OGR Style type.