GDAL

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