forked from MapServer/MapServer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmapserver.h
executable file
·3291 lines (2751 loc) · 150 KB
/
mapserver.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/******************************************************************************
* $Id$
*
* Project: MapServer
* Purpose: Primary MapServer include file.
* Author: Steve Lime and the MapServer team.
*
******************************************************************************
* Copyright (c) 1996-2005 Regents of the University of Minnesota.
*
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies of this Software or works derived from this Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*****************************************************************************/
#ifndef MAP_H
#define MAP_H
#include "mapserver-config.h"
/*
** Main includes. If a particular header was needed by several .c files then
** I just put it here. What the hell, it works and it's all right here. -SDL-
*/
#if defined(HAVE_STRCASESTR) && !defined(_GNU_SOURCE)
#define _GNU_SOURCE /* Required for <string.h> strcasestr() defn */
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <time.h>
#if defined(_WIN32) && !defined(__CYGWIN__)
#include <direct.h>
#include <memory.h>
#include <malloc.h>
#include <process.h>
#include <float.h>
#else
#include <unistd.h>
#endif
#if defined(_WIN32) && !defined(__CYGWIN__)
# define MS_DLL_EXPORT __declspec(dllexport)
#define USE_MSFREE
#else
#define MS_DLL_EXPORT
#endif
#if defined(__GNUC__)
#define WARN_UNUSED __attribute__((warn_unused_result))
#define MS_LIKELY(x) __builtin_expect((x),1)
#define MS_UNLIKELY(x) __builtin_expect((x),0)
#else
#define WARN_UNUSED
#define MS_LIKELY(x) (x)
#define MS_UNLIKELY(x) (x)
#endif
/* definition of ms_int32/ms_uint32 */
#include <limits.h>
#ifndef _WIN32
#include <stdint.h>
#endif
#ifdef _WIN32
#ifndef SIZE_MAX
#ifdef _WIN64
#define SIZE_MAX _UI64_MAX
#else
#define SIZE_MAX UINT_MAX
#endif
#endif
#endif
#if ULONG_MAX == 0xffffffff
typedef long ms_int32;
typedef unsigned long ms_uint32;
#elif UINT_MAX == 0xffffffff
typedef int ms_int32;
typedef unsigned int ms_uint32;
#else
typedef int32_t ms_int32;
typedef uint32_t ms_uint32;
#endif
#if defined(_WIN32) && !defined(__CYGWIN__)
/* Need to use _vsnprintf() with VS2003 */
#define vsnprintf _vsnprintf
#endif
#include "mapserver-api.h"
#ifndef SWIG
/*forward declaration of rendering object*/
typedef struct rendererVTableObj rendererVTableObj;
typedef struct tileCacheObj tileCacheObj;
typedef struct textPathObj textPathObj;
typedef struct textRunObj textRunObj;
typedef struct glyph_element glyph_element;
typedef struct face_element face_element;
#endif
/* ms_bitarray is used by the bit mask in mapbit.c */
typedef ms_uint32 * ms_bitarray;
typedef const ms_uint32 *ms_const_bitarray;
#include "maperror.h"
#include "mapprimitive.h"
#include "mapshape.h"
#include "mapsymbol.h"
#include "maptree.h" /* quadtree spatial index */
#include "maphash.h"
#include "mapio.h"
#include <assert.h>
#include "mapproject.h"
#include "cgiutil.h"
#include <sys/types.h> /* regular expression support */
/* The regex lib from the system and the regex lib from PHP needs to
* be separated here. We separate here via its directory location.
*/
#include "mapregex.h"
#define CPL_SUPRESS_CPLUSPLUS
#include "ogr_api.h"
/* EQUAL and EQUALN are defined in cpl_port.h, so add them in here if ogr was not included */
#ifndef EQUAL
#if defined(WIN32) || defined(WIN32CE)
# define EQUAL(a,b) (stricmp(a,b)==0)
#else
# define EQUAL(a,b) (strcasecmp(a,b)==0)
#endif
#endif
#ifndef EQUALN
#if defined(WIN32) || defined(WIN32CE)
# define EQUALN(a,b,n) (strnicmp(a,b,n)==0)
#else
# define EQUALN(a,b,n) (strncasecmp(a,b,n)==0)
#endif
#endif
#if defined(_WIN32) && !defined(__CYGWIN__)
#if (defined(_MSC_VER) && (_MSC_VER < 1900)) || !defined(_MSC_VER)
#define snprintf _snprintf
#endif
#endif
#ifdef __cplusplus
#include <string>
#include <vector>
extern "C" {
#endif
// hide from swig or ruby will choke on the __FUNCTION__ name
#ifndef SWIG
/* Memory allocation check utility */
#ifndef __FUNCTION__
# define __FUNCTION__ "MapServer"
#endif
#endif
#define MS_CHECK_ALLOC(var, size, retval) \
if (!var) { \
msSetError(MS_MEMERR, "%s: %d: Out of memory allocating %u bytes.\n", __FUNCTION__, \
__FILE__, __LINE__, (unsigned int)(size)); \
return retval; \
}
#define MS_CHECK_ALLOC_NO_RET(var, size) \
if (!var) { \
msSetError(MS_MEMERR, "%s: %d: Out of memory allocating %u bytes.\n", __FUNCTION__, \
__FILE__, __LINE__, (unsigned int)(size)); \
return; \
}
/* General defines, wrapable */
#define MS_TRUE 1 /* logical control variables */
#define MS_FALSE 0
#define MS_UNKNOWN -1
#define MS_ON 1
#define MS_OFF 0
#define MS_DEFAULT 2
#define MS_EMBED 3
#define MS_DELETE 4
#define MS_YES 1
#define MS_NO 0
/* Number of layer, class and style ptrs to alloc at once in the
corresponding msGrow...() functions. Replaces former MS_MAXLAYERS,
MS_MAXCLASSES and MS_MAXSTYLES with dynamic allocation (see RFC-17). */
#define MS_LAYER_ALLOCSIZE 64
#define MS_CLASS_ALLOCSIZE 8
#define MS_STYLE_ALLOCSIZE 4
#define MS_LABEL_ALLOCSIZE 2 /* not too common */
#define MS_MAX_LABEL_PRIORITY 10
#define MS_MAX_LABEL_FONTS 5
#define MS_DEFAULT_LABEL_PRIORITY 1
#define MS_LABEL_FORCE_GROUP 2 /* other values are MS_ON/MS_OFF */
/* General defines, not wrapable */
#ifndef SWIG
#ifdef USE_XMLMAPFILE
#define MS_DEFAULT_MAPFILE_PATTERN "\\.(map|xml)$"
#define MS_DEFAULT_XMLMAPFILE_PATTERN "\\.xml$"
#else
#define MS_DEFAULT_MAPFILE_PATTERN "\\.map$"
#endif
#define MS_TEMPLATE_MAGIC_STRING "MapServer Template"
#define MS_TEMPLATE_EXPR "\\.(xml|wml|html|htm|svg|kml|gml|js|tmpl)$"
#define MS_INDEX_EXTENSION ".qix"
#define MS_QUERY_RESULTS_MAGIC_STRING "MapServer Query Results"
#define MS_QUERY_PARAMS_MAGIC_STRING "MapServer Query Params"
#define MS_QUERY_EXTENSION ".qy"
#define MS_DEG_TO_RAD .0174532925199432958
#define MS_RAD_TO_DEG 57.29577951
#define MS_DEFAULT_RESOLUTION 72
#define MS_RED 0
#define MS_GREEN 1
#define MS_BLUE 2
#define MS_MAXCOLORS 256
#define MS_MISSING_DATA_IGNORE 0
#define MS_MISSING_DATA_FAIL 1
#define MS_MISSING_DATA_LOG 2
#define MS_BUFFER_LENGTH 2048 /* maximum input line length */
#define MS_URL_LENGTH 1024
#define MS_MAXPATHLEN 1024
#define MS_MAXIMAGESIZE_DEFAULT 4096
#define MS_MAXPROJARGS 20
#define MS_MAXJOINS 20
#define MS_ITEMNAMELEN 32
#define MS_NAMELEN 20
#define MS_MINSYMBOLSIZE 0 /* in pixels */
#define MS_MAXSYMBOLSIZE 500
#define MS_MINSYMBOLWIDTH 0 /* in pixels */
#define MS_MAXSYMBOLWIDTH 32
#define MS_URL 0 /* template types */
#define MS_FILE 1
#define MS_MINFONTSIZE 4
#define MS_MAXFONTSIZE 256
#define MS_LABELCACHEINITSIZE 100
#define MS_LABELCACHEINCREMENT 10
#define MS_RESULTCACHEINITSIZE 10
#define MS_RESULTCACHEINCREMENT 10
#define MS_FEATUREINITSIZE 10 /* how many points initially can a feature have */
#define MS_FEATUREINCREMENT 10
#define MS_EXPRESSION 2000 /* todo: make this an enum */
#define MS_REGEX 2001
#define MS_STRING 2002
#define MS_NUMBER 2003
#define MS_COMMENT 2004
#define MS_IREGEX 2005
#define MS_ISTRING 2006
#define MS_BINDING 2007
#define MS_LIST 2008
/* string split flags */
#define MS_HONOURSTRINGS 0x0001
#define MS_ALLOWEMPTYTOKENS 0x0002
#define MS_PRESERVEQUOTES 0x0004
#define MS_PRESERVEESCAPES 0x0008
#define MS_STRIPLEADSPACES 0x0010
#define MS_STRIPENDSPACES 0x0020
/* boolean options for the expression object. */
#define MS_EXP_INSENSITIVE 1
/* General macro definitions */
#define MS_MIN(a,b) (((a)<(b))?(a):(b))
#define MS_MAX(a,b) (((a)>(b))?(a):(b))
#define MS_ABS(a) (((a)<0) ? -(a) : (a))
#define MS_SGN(a) (((a)<0) ? -1 : 1)
#define MS_STRING_IS_NULL_OR_EMPTY(s) ((!s || s[0] == '\0') ? MS_TRUE:MS_FALSE)
#define MS_NINT_GENERIC(x) ((x) >= 0.0 ? ((long) ((x)+.5)) : ((long) ((x)-.5)))
#ifdef _MSC_VER
#define msIsNan(x) _isnan(x)
#else
#define msIsNan(x) isnan(x)
#endif
/* see http://mega-nerd.com/FPcast/ for some discussion of fast
conversion to nearest int. We avoid lrint() for now because it
would be hard to include math.h "properly". */
#if defined(HAVE_LRINT) && !defined(USE_GENERIC_MS_NINT)
# define MS_NINT(x) lrint(x)
/*# define MS_NINT(x) lround(x) */
/* note that lrint rounds .5 to the nearest *even* integer, i.e. lrint(0.5)=0,lrint(1.5)=2 */
#elif defined(_MSC_VER) && defined(_WIN32) && !defined(USE_GENERIC_MS_NINT)
static __inline long int MS_NINT (double flt)
{
int intgr;
_asm {
fld flt
fistp intgr
} ;
return intgr ;
}
#elif defined(i386) && defined(__GNUC_PREREQ) && !defined(USE_GENERIC_MS_NINT)
static __inline long int MS_NINT( double __x )
{
long int __lrintres;
__asm__ __volatile__
("fistpl %0"
: "=m" (__lrintres) : "t" (__x) : "st");
return __lrintres;
}
#else
# define MS_NINT(x) MS_NINT_GENERIC(x)
#endif
/* #define MS_VALID_EXTENT(minx, miny, maxx, maxy) (((minx<maxx) && (miny<maxy))?MS_TRUE:MS_FALSE) */
#define MS_VALID_EXTENT(rect) (((rect.minx < rect.maxx && rect.miny < rect.maxy))?MS_TRUE:MS_FALSE)
#define MS_INIT_COLOR(color,r,g,b,a) { (color).red = r; (color).green = g; (color).blue = b; (color).alpha=a; }
#define MS_VALID_COLOR(color) (((color).red==-1 || (color).green==-1 || (color).blue==-1)?MS_FALSE:MS_TRUE)
#define MS_COMPARE_COLOR(color1, color2) (((color2).red==(color1).red && (color2).green==(color1).green && (color2).blue==(color1).blue)?MS_TRUE:MS_FALSE)
#define MS_TRANSPARENT_COLOR(color) (((color).alpha==0 || (color).red==-255 || (color).green==-255 || (color).blue==-255)?MS_TRUE:MS_FALSE)
#define MS_COMPARE_COLORS(a,b) (((a).red!=(b).red || (a).green!=(b).green || (a).blue!=(b).blue)?MS_FALSE:MS_TRUE)
#define MS_COLOR_GETRGB(color) (MS_VALID_COLOR(color)?((color).red *0x10000 + (color).green *0x100 + (color).blue):-1)
#define MS_IMAGE_MIME_TYPE(format) (format->mimetype ? format->mimetype : "unknown")
#define MS_IMAGE_EXTENSION(format) (format->extension ? format->extension : "unknown")
#define MS_DRIVER_SWF(format) (strncasecmp((format)->driver,"swf",3)==0)
#define MS_DRIVER_GDAL(format) (strncasecmp((format)->driver,"gdal/",5)==0)
#define MS_DRIVER_IMAGEMAP(format) (strncasecmp((format)->driver,"imagemap",8)==0)
#define MS_DRIVER_AGG(format) (strncasecmp((format)->driver,"agg/",4)==0)
#define MS_DRIVER_MVT(format) (strncasecmp((format)->driver,"mvt",3)==0)
#define MS_DRIVER_CAIRO(format) (strncasecmp((format)->driver,"cairo/",6)==0)
#define MS_DRIVER_OGL(format) (strncasecmp((format)->driver,"ogl/",4)==0)
#define MS_DRIVER_TEMPLATE(format) (strncasecmp((format)->driver,"template",8)==0)
#endif /*SWIG*/
#define MS_RENDER_WITH_SWF 2
#define MS_RENDER_WITH_RAWDATA 3
#define MS_RENDER_WITH_IMAGEMAP 5
#define MS_RENDER_WITH_TEMPLATE 8 /* query results only */
#define MS_RENDER_WITH_OGR 16
#define MS_RENDER_WITH_PLUGIN 100
#define MS_RENDER_WITH_CAIRO_RASTER 101
#define MS_RENDER_WITH_CAIRO_PDF 102
#define MS_RENDER_WITH_CAIRO_SVG 103
#define MS_RENDER_WITH_OGL 104
#define MS_RENDER_WITH_AGG 105
#define MS_RENDER_WITH_KML 106
#define MS_RENDER_WITH_UTFGRID 107
#define MS_RENDER_WITH_MVT 108
#ifndef SWIG
#define MS_RENDERER_SWF(format) ((format)->renderer == MS_RENDER_WITH_SWF)
#define MS_RENDERER_RAWDATA(format) ((format)->renderer == MS_RENDER_WITH_RAWDATA)
#define MS_RENDERER_IMAGEMAP(format) ((format)->renderer == MS_RENDER_WITH_IMAGEMAP)
#define MS_RENDERER_TEMPLATE(format) ((format)->renderer == MS_RENDER_WITH_TEMPLATE)
#define MS_RENDERER_KML(format) ((format)->renderer == MS_RENDER_WITH_KML)
#define MS_RENDERER_OGR(format) ((format)->renderer == MS_RENDER_WITH_OGR)
#define MS_RENDERER_MVT(format) ((format)->renderer == MS_RENDER_WITH_MVT)
#define MS_RENDERER_PLUGIN(format) ((format)->renderer > MS_RENDER_WITH_PLUGIN)
#define MS_CELLSIZE(min,max,d) (((max) - (min))/((d)-1)) /* where min/max are from an MapServer pixel center-to-pixel center extent */
#define MS_OWS_CELLSIZE(min,max,d) (((max) - (min))/(d)) /* where min/max are from an OGC pixel outside edge-to-pixel outside edge extent */
#define MS_MAP2IMAGE_X(x,minx,cx) (MS_NINT(((x) - (minx))/(cx)))
#define MS_MAP2IMAGE_Y(y,maxy,cy) (MS_NINT(((maxy) - (y))/(cy)))
#define MS_IMAGE2MAP_X(x,minx,cx) ((minx) + (cx)*(x))
#define MS_IMAGE2MAP_Y(y,maxy,cy) ((maxy) - (cy)*(y))
/* these versions of MS_MAP2IMAGE takes 1/cellsize and is much faster */
#define MS_MAP2IMAGE_X_IC(x,minx,icx) (MS_NINT(((x) - (minx))*(icx)))
#define MS_MAP2IMAGE_Y_IC(y,maxy,icy) (MS_NINT(((maxy) - (y))*(icy)))
#define MS_MAP2IMAGE_XCELL_IC(x,minx,icx) ((int)(((x) - (minx))*(icx)))
#define MS_MAP2IMAGE_YCELL_IC(y,maxy,icy) ((int)(((maxy) - (y))*(icy)))
#define MS_MAP2IMAGE_X_IC_DBL(x,minx,icx) (((x) - (minx))*(icx))
#define MS_MAP2IMAGE_Y_IC_DBL(y,maxy,icy) (((maxy) - (y))*(icy))
#define MS_MAP2IMAGE_X_IC_SNAP(x,minx,icx,res) ((MS_NINT(((x) - (minx))*(icx)*(res)))/(res))
#define MS_MAP2IMAGE_Y_IC_SNAP(y,maxy,icy,res) ((MS_NINT(((maxy) - (y))*(icy)*(res)))/(res))
/* For CARTO symbols */
#define MS_PI 3.14159265358979323846
#define MS_PI2 1.57079632679489661923 /* (MS_PI / 2) */
#define MS_3PI2 4.71238898038468985769 /* (3 * MS_PI2) */
#define MS_2PI 6.28318530717958647693 /* (2 * MS_PI) */
#define MS_ENCRYPTION_KEY_SIZE 16 /* Key size: 128 bits = 16 bytes */
#define GET_LAYER(map, pos) map->layers[pos]
#define GET_CLASS(map, lid, cid) map->layers[lid]->class[cid]
#ifdef USE_THREAD
#if defined(HAVE_SYNC_FETCH_AND_ADD)
#define MS_REFCNT_INCR(obj) __sync_fetch_and_add(&obj->refcount, +1)
#define MS_REFCNT_DECR(obj) __sync_sub_and_fetch(&obj->refcount, +1)
#define MS_REFCNT_INIT(obj) obj->refcount=1, __sync_synchronize()
#elif defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64))
#include <intrin.h>
#pragma intrinsic (_InterlockedExchangeAdd)
#if defined(_MSC_VER) && (_MSC_VER <= 1200)
#define MS_REFCNT_INCR(obj) ( _InterlockedExchangeAdd((long*)(&obj->refcount), (long)(+1)) +1 )
#define MS_REFCNT_DECR(obj) ( _InterlockedExchangeAdd((long*)(&obj->refcount), (long)(-1)) -1 )
#define MS_REFCNT_INIT(obj) obj->refcount=1
#else
#define MS_REFCNT_INCR(obj) ( _InterlockedExchangeAdd((volatile long*)(&obj->refcount), (long)(+1)) +1 )
#define MS_REFCNT_DECR(obj) ( _InterlockedExchangeAdd((volatile long*)(&obj->refcount), (long)(-1)) -1 )
#define MS_REFCNT_INIT(obj) obj->refcount=1
#endif
#elif defined(__MINGW32__) && defined(__i386__)
#define MS_REFCNT_INCR(obj) ( InterlockedExchangeAdd((long*)(&obj->refcount), (long)(+1)) +1 )
#define MS_REFCNT_DECR(obj) ( InterlockedExchangeAdd((long*)(&obj->refcount), (long)(-1)) -1 )
#define MS_REFCNT_INIT(obj) obj->refcount=1
#else
// unsafe fallback
#define MS_REFCNT_INCR(obj) obj->refcount++
#define MS_REFCNT_DECR(obj) (--(obj->refcount))
#define MS_REFCNT_INIT(obj) obj->refcount=1
#endif // close if defined(_MSC..
#else /*USE_THREAD*/
#define MS_REFCNT_INCR(obj) obj->refcount++
#define MS_REFCNT_DECR(obj) (--(obj->refcount))
#define MS_REFCNT_INIT(obj) obj->refcount=1
#endif /*USE_THREAD*/
#define MS_REFCNT_DECR_IS_NOT_ZERO(obj) (MS_REFCNT_DECR(obj))>0
#define MS_REFCNT_DECR_IS_ZERO(obj) (MS_REFCNT_DECR(obj))<=0
#define MS_IS_VALID_ARRAY_INDEX(index, size) ((index<0 || index>=size)?MS_FALSE:MS_TRUE)
#define MS_CONVERT_UNIT(src_unit, dst_unit, value) (value * msInchesPerUnit(src_unit,0) / msInchesPerUnit(dst_unit,0))
#define MS_INIT_INVALID_RECT { -1e300, -1e300, 1e300, 1e300 }
#endif
/* General enumerated types - needed by scripts */
enum MS_FILE_TYPE {MS_FILE_MAP, MS_FILE_SYMBOL};
enum MS_UNITS {MS_INCHES, MS_FEET, MS_MILES, MS_METERS, MS_KILOMETERS, MS_DD, MS_PIXELS, MS_PERCENTAGES, MS_NAUTICALMILES, MS_INHERIT = -1};
enum MS_SHAPE_TYPE {MS_SHAPE_POINT, MS_SHAPE_LINE, MS_SHAPE_POLYGON, MS_SHAPE_NULL};
enum MS_LAYER_TYPE {MS_LAYER_POINT, MS_LAYER_LINE, MS_LAYER_POLYGON, MS_LAYER_RASTER, MS_LAYER_ANNOTATION /* only used for parser backwards compatibility */, MS_LAYER_QUERY, MS_LAYER_CIRCLE, MS_LAYER_TILEINDEX, MS_LAYER_CHART};
enum MS_FONT_TYPE {MS_TRUETYPE, MS_BITMAP};
enum MS_RENDER_MODE {MS_FIRST_MATCHING_CLASS, MS_ALL_MATCHING_CLASSES};
#define MS_POSITIONS_LENGTH 14
enum MS_POSITIONS_ENUM {MS_UL=101, MS_LR, MS_UR, MS_LL, MS_CR, MS_CL, MS_UC, MS_LC, MS_CC, MS_AUTO, MS_XY, MS_NONE, MS_AUTO2,MS_FOLLOW};
#define MS_TINY 5
#define MS_SMALL 7
#define MS_MEDIUM 10
#define MS_LARGE 13
#define MS_GIANT 16
enum MS_QUERYMAP_STYLES {MS_NORMAL, MS_HILITE, MS_SELECTED};
enum MS_CONNECTION_TYPE {MS_INLINE, MS_SHAPEFILE, MS_TILED_SHAPEFILE, MS_UNUSED_2, MS_OGR, MS_UNUSED_1, MS_POSTGIS, MS_WMS, MS_ORACLESPATIAL, MS_WFS, MS_GRATICULE, MS_MYSQL, MS_RASTER, MS_PLUGIN, MS_UNION, MS_UVRASTER, MS_CONTOUR, MS_KERNELDENSITY, MS_IDW };
#define IS_THIRDPARTY_LAYER_CONNECTIONTYPE(type) ((type) == MS_UNION || (type) == MS_KERNELDENSITY || (type) == MS_IDW)
enum MS_JOIN_CONNECTION_TYPE {MS_DB_XBASE, MS_DB_CSV, MS_DB_MYSQL, MS_DB_ORACLE, MS_DB_POSTGRES};
enum MS_JOIN_TYPE {MS_JOIN_ONE_TO_ONE, MS_JOIN_ONE_TO_MANY};
#define MS_SINGLE 0 /* modes for searching (spatial/database) */
#define MS_MULTIPLE 1
enum MS_QUERY_MODE {MS_QUERY_SINGLE, MS_QUERY_MULTIPLE};
enum MS_QUERY_TYPE {MS_QUERY_IS_NULL, MS_QUERY_BY_POINT, MS_QUERY_BY_RECT, MS_QUERY_BY_SHAPE, MS_QUERY_BY_ATTRIBUTE, MS_QUERY_BY_INDEX, MS_QUERY_BY_FILTER};
enum MS_ALIGN_VALUE {MS_ALIGN_DEFAULT, MS_ALIGN_LEFT, MS_ALIGN_CENTER, MS_ALIGN_RIGHT};
enum MS_CAPS_JOINS_AND_CORNERS {MS_CJC_NONE, MS_CJC_BEVEL, MS_CJC_BUTT, MS_CJC_MITER, MS_CJC_ROUND, MS_CJC_SQUARE, MS_CJC_TRIANGLE};
#define MS_CJC_DEFAULT_CAPS MS_CJC_ROUND
#define MS_CJC_DEFAULT_JOINS MS_CJC_NONE
#define MS_CJC_DEFAULT_JOIN_MAXSIZE 3
enum MS_RETURN_VALUE {MS_SUCCESS, MS_FAILURE, MS_DONE};
enum MS_IMAGEMODE { MS_IMAGEMODE_PC256, MS_IMAGEMODE_RGB, MS_IMAGEMODE_RGBA, MS_IMAGEMODE_INT16, MS_IMAGEMODE_FLOAT32, MS_IMAGEMODE_BYTE, MS_IMAGEMODE_FEATURE, MS_IMAGEMODE_NULL };
enum MS_GEOS_OPERATOR {MS_GEOS_EQUALS, MS_GEOS_DISJOINT, MS_GEOS_TOUCHES, MS_GEOS_OVERLAPS, MS_GEOS_CROSSES, MS_GEOS_INTERSECTS, MS_GEOS_WITHIN, MS_GEOS_CONTAINS, MS_GEOS_BEYOND, MS_GEOS_DWITHIN};
#define MS_FILE_DEFAULT MS_FILE_MAP
#if defined(_MSC_VER) && (_MSC_VER <= 1310)
#define MS_DEBUG msDebug2
#else
#ifdef USE_EXTENDED_DEBUG
#define MS_DEBUG(level,elt,fmt, ...) if((elt)->debug >= (level)) msDebug(fmt,##__VA_ARGS__)
#else
#define MS_DEBUG(level,elt,fmt, ...) /* no-op */
#endif
#endif
/* coordinate to pixel simplification modes, used in msTransformShape */
enum MS_TRANSFORM_MODE {
MS_TRANSFORM_NONE, /* no geographic to pixel transformation */
MS_TRANSFORM_ROUND, /* round to integer, might create degenerate geometries (used for GD)*/
MS_TRANSFORM_SNAPTOGRID, /* snap to a grid, should be user configurable in the future*/
MS_TRANSFORM_FULLRESOLUTION, /* keep full resolution */
MS_TRANSFORM_SIMPLIFY /* keep full resolution */
};
typedef enum {
MS_COMPOP_CLEAR,
MS_COMPOP_SRC,
MS_COMPOP_DST,
MS_COMPOP_SRC_OVER,
MS_COMPOP_DST_OVER,
MS_COMPOP_SRC_IN,
MS_COMPOP_DST_IN,
MS_COMPOP_SRC_OUT,
MS_COMPOP_DST_OUT,
MS_COMPOP_SRC_ATOP,
MS_COMPOP_DST_ATOP,
MS_COMPOP_XOR,
MS_COMPOP_PLUS,
MS_COMPOP_MINUS,
MS_COMPOP_MULTIPLY,
MS_COMPOP_SCREEN,
MS_COMPOP_OVERLAY,
MS_COMPOP_DARKEN,
MS_COMPOP_LIGHTEN,
MS_COMPOP_COLOR_DODGE,
MS_COMPOP_COLOR_BURN,
MS_COMPOP_HARD_LIGHT,
MS_COMPOP_SOFT_LIGHT,
MS_COMPOP_DIFFERENCE,
MS_COMPOP_EXCLUSION,
MS_COMPOP_CONTRAST,
MS_COMPOP_INVERT,
MS_COMPOP_INVERT_RGB
} CompositingOperation;
typedef struct _CompositingFilter{
char *filter;
struct _CompositingFilter *next;
} CompositingFilter;
typedef struct _LayerCompositer{
CompositingOperation comp_op;
int opacity;
CompositingFilter *filter;
struct _LayerCompositer *next;
} LayerCompositer;
#ifndef SWIG
/* Filter object */
typedef enum {
FILTER_NODE_TYPE_UNDEFINED = -1,
FILTER_NODE_TYPE_LOGICAL = 0,
FILTER_NODE_TYPE_SPATIAL = 1,
FILTER_NODE_TYPE_COMPARISON = 2,
FILTER_NODE_TYPE_PROPERTYNAME = 3,
FILTER_NODE_TYPE_BBOX = 4,
FILTER_NODE_TYPE_LITERAL = 5,
FILTER_NODE_TYPE_BOUNDARY = 6,
FILTER_NODE_TYPE_GEOMETRY_POINT = 7,
FILTER_NODE_TYPE_GEOMETRY_LINE = 8,
FILTER_NODE_TYPE_GEOMETRY_POLYGON = 9,
FILTER_NODE_TYPE_FEATUREID = 10,
FILTER_NODE_TYPE_TEMPORAL = 11,
FILTER_NODE_TYPE_TIME_PERIOD = 12
} FilterNodeType;
/************************************************************************/
/* FilterEncodingNode */
/************************************************************************/
typedef struct _FilterNode {
FilterNodeType eType;
char *pszValue;
void *pOther;
char *pszSRS;
struct _FilterNode *psLeftNode;
struct _FilterNode *psRightNode;
} FilterEncodingNode;
#endif /*SWIG*/
/* Define supported bindings here (only covers existing bindings at first). Not accessible directly using MapScript. */
#define MS_STYLE_BINDING_LENGTH 12
enum MS_STYLE_BINDING_ENUM { MS_STYLE_BINDING_SIZE, MS_STYLE_BINDING_WIDTH, MS_STYLE_BINDING_ANGLE, MS_STYLE_BINDING_COLOR, MS_STYLE_BINDING_OUTLINECOLOR, MS_STYLE_BINDING_SYMBOL, MS_STYLE_BINDING_OUTLINEWIDTH, MS_STYLE_BINDING_OPACITY, MS_STYLE_BINDING_OFFSET_X, MS_STYLE_BINDING_OFFSET_Y, MS_STYLE_BINDING_POLAROFFSET_PIXEL, MS_STYLE_BINDING_POLAROFFSET_ANGLE };
#define MS_LABEL_BINDING_LENGTH 12
enum MS_LABEL_BINDING_ENUM { MS_LABEL_BINDING_SIZE, MS_LABEL_BINDING_ANGLE, MS_LABEL_BINDING_COLOR, MS_LABEL_BINDING_OUTLINECOLOR, MS_LABEL_BINDING_FONT, MS_LABEL_BINDING_PRIORITY, MS_LABEL_BINDING_POSITION, MS_LABEL_BINDING_SHADOWSIZEX, MS_LABEL_BINDING_SHADOWSIZEY, MS_LABEL_BINDING_OFFSET_X, MS_LABEL_BINDING_OFFSET_Y,MS_LABEL_BINDING_ALIGN };
/************************************************************************/
/* attributeBindingObj */
/************************************************************************/
#ifndef SWIG
typedef struct {
char *item;
int index;
} attributeBindingObj;
#endif /*SWIG*/
/************************************************************************/
/* labelPathObj */
/* */
/* Label path object - used to hold path and bounds of curved */
/* labels - Bug #1620 implementation. */
/************************************************************************/
#ifndef SWIG
typedef struct {
multipointObj path;
shapeObj bounds;
double *angles;
} labelPathObj;
#endif /*SWIG*/
/************************************************************************/
/* fontSetObj */
/* */
/* used to hold aliases for TRUETYPE fonts */
/************************************************************************/
/**
The :ref:`FONTSET <fontset>` object
*/
typedef struct {
#ifdef SWIG
%immutable;
#endif
char *filename; ///< The filename of the fonset
int numfonts; ///< The number of fonts in the fontset
hashTableObj fonts; ///< Key, value pairs of font name and font file
#ifdef SWIG
%mutable;
#endif
#ifndef SWIG
struct mapObj *map;
#endif
} fontSetObj;
/************************************************************************/
/* featureListNodeObj */
/* */
/* for inline features, shape caches and queries */
/************************************************************************/
#ifndef SWIG
typedef struct listNode {
shapeObj shape;
struct listNode *next;
struct listNode *tailifhead; /* this is the tail node in the list, if this is the head element, otherwise NULL */
} featureListNodeObj;
typedef featureListNodeObj * featureListNodeObjPtr;
#endif
/************************************************************************/
/* paletteObj */
/* */
/* used to hold colors while a map file is read */
/************************************************************************/
#ifndef SWIG
typedef struct {
colorObj colors[MS_MAXCOLORS-1];
int colorvalue[MS_MAXCOLORS-1];
int numcolors;
} paletteObj;
#endif
/************************************************************************/
/* expressionObj & tokenObj */
/************************************************************************/
enum MS_TOKEN_LOGICAL_ENUM { MS_TOKEN_LOGICAL_AND=300, MS_TOKEN_LOGICAL_OR, MS_TOKEN_LOGICAL_NOT };
enum MS_TOKEN_LITERAL_ENUM { MS_TOKEN_LITERAL_NUMBER=310, MS_TOKEN_LITERAL_STRING, MS_TOKEN_LITERAL_TIME, MS_TOKEN_LITERAL_SHAPE, MS_TOKEN_LITERAL_BOOLEAN };
enum MS_TOKEN_COMPARISON_ENUM {
MS_TOKEN_COMPARISON_EQ=320, MS_TOKEN_COMPARISON_NE, MS_TOKEN_COMPARISON_GT, MS_TOKEN_COMPARISON_LT, MS_TOKEN_COMPARISON_LE, MS_TOKEN_COMPARISON_GE, MS_TOKEN_COMPARISON_IEQ,
MS_TOKEN_COMPARISON_RE, MS_TOKEN_COMPARISON_IRE,
MS_TOKEN_COMPARISON_IN, MS_TOKEN_COMPARISON_LIKE,
MS_TOKEN_COMPARISON_INTERSECTS, MS_TOKEN_COMPARISON_DISJOINT, MS_TOKEN_COMPARISON_TOUCHES, MS_TOKEN_COMPARISON_OVERLAPS, MS_TOKEN_COMPARISON_CROSSES, MS_TOKEN_COMPARISON_WITHIN, MS_TOKEN_COMPARISON_CONTAINS, MS_TOKEN_COMPARISON_EQUALS, MS_TOKEN_COMPARISON_BEYOND, MS_TOKEN_COMPARISON_DWITHIN
};
enum MS_TOKEN_FUNCTION_ENUM {
MS_TOKEN_FUNCTION_LENGTH=350, MS_TOKEN_FUNCTION_TOSTRING, MS_TOKEN_FUNCTION_COMMIFY, MS_TOKEN_FUNCTION_AREA, MS_TOKEN_FUNCTION_ROUND, MS_TOKEN_FUNCTION_FROMTEXT,
MS_TOKEN_FUNCTION_BUFFER, MS_TOKEN_FUNCTION_DIFFERENCE, MS_TOKEN_FUNCTION_SIMPLIFY, MS_TOKEN_FUNCTION_SIMPLIFYPT, MS_TOKEN_FUNCTION_GENERALIZE, MS_TOKEN_FUNCTION_SMOOTHSIA, MS_TOKEN_FUNCTION_JAVASCRIPT,
MS_TOKEN_FUNCTION_UPPER, MS_TOKEN_FUNCTION_LOWER, MS_TOKEN_FUNCTION_INITCAP, MS_TOKEN_FUNCTION_FIRSTCAP
};
enum MS_TOKEN_BINDING_ENUM { MS_TOKEN_BINDING_DOUBLE=370, MS_TOKEN_BINDING_INTEGER, MS_TOKEN_BINDING_STRING, MS_TOKEN_BINDING_TIME, MS_TOKEN_BINDING_SHAPE, MS_TOKEN_BINDING_MAP_CELLSIZE, MS_TOKEN_BINDING_DATA_CELLSIZE };
enum MS_PARSE_TYPE_ENUM { MS_PARSE_TYPE_BOOLEAN, MS_PARSE_TYPE_STRING, MS_PARSE_TYPE_SHAPE, MS_PARSE_TYPE_SLD };
#ifndef SWIG
typedef union {
int intval;
char *strval;
shapeObj *shpval;
} parseResultObj;
typedef union {
double dblval;
int intval;
char *strval;
struct tm tmval;
shapeObj *shpval;
attributeBindingObj bindval;
} tokenValueObj;
typedef struct tokenListNode {
int token;
tokenValueObj tokenval;
char *tokensrc; /* on occassion we may want to access to the original source string (e.g. date/time) */
struct tokenListNode *next;
struct tokenListNode *tailifhead; /* this is the tail node in the list if this is the head element, otherwise NULL */
} tokenListNodeObj;
typedef tokenListNodeObj * tokenListNodeObjPtr;
typedef struct {
char *string;
int type;
/* container for expression options such as case-insensitiveness */
/* This is a boolean container. */
int flags;
/* logical expression options */
tokenListNodeObjPtr tokens;
tokenListNodeObjPtr curtoken;
/* regular expression options */
ms_regex_t regex; /* compiled regular expression to be matched */
int compiled;
char *native_string; /* RFC 91 */
} expressionObj;
typedef struct {
colorObj *pixel; /* for raster layers */
shapeObj *shape; /* for vector layers */
double dblval; /* for map cellsize used by simplify */
double dblval2; /* for data cellsize */
expressionObj *expr; /* expression to be evaluated (contains tokens) */
int type; /* type of parse: boolean, string/text or shape/geometry */
parseResultObj result; /* parse result */
} parseObj;
#endif
/************************************************************************/
/* clusterObj */
/************************************************************************/
/**
The :ref:`CLUSTER <cluster>` object. See :ref:`RFC 69 <rfc69>`.
*/
typedef struct {
double maxdistance; ///< Maximum distance between clusters - see :ref:`MAXDISTANCE <mapfile-cluster-maxdistance>`
double buffer; ///< The buffer size around the selection area - see :ref:`BUFFER <mapfile-cluster-buffer>`
char* region; ///< The type of the cluster region (rectangle or ellipse) - see :ref:`REGION <mapfile-cluster-region>`
#ifndef SWIG
expressionObj group; /* expression to identify the groups */
expressionObj filter; /* expression for filtering the shapes */
#endif
} clusterObj;
/************************************************************************/
/* processingParams */
/************************************************************************/
#ifndef SWIG
/* Used by idw.c and kerneldensity.c */
typedef struct {
float normalization_scale;
int expand_searchrect;
int radius;
float power;
} interpolationProcessingParams;
#endif
/************************************************************************/
/* joinObj */
/* */
/* simple way to access other XBase files, one-to-one or */
/* one-to-many supported */
/************************************************************************/
#ifndef SWIG
typedef struct {
char *name;
char **items, **values; /* items/values (process 1 record at a time) */
int numitems;
char *table;
char *from, *to; /* item names */
void *joininfo; /* vendor specific (i.e. XBase, MySQL, etc.) stuff to allow for persistent access */
char *header, *footer;
#ifndef __cplusplus
char *template;
#else
char *_template;
#endif
enum MS_JOIN_TYPE type;
char *connection;
enum MS_JOIN_CONNECTION_TYPE connectiontype;
} joinObj;
#endif
/************************************************************************/
/* outputFormatObj */
/* */
/* see mapoutput.c for most related code. */
/************************************************************************/
/**
The :ref:`OUTPUTFORMAT <outputformat>` object
*/
typedef struct {
#ifndef SWIG
int refcount;
char **formatoptions;
rendererVTableObj *vtable;
void *device; /* for supporting direct rendering onto a device context */
#endif /* SWIG */
#ifdef SWIG
%immutable;
#endif /* SWIG */
/**
The number of option values set on this format - can be used to
iterate over the options array in conjunction with :func:`outputFormatObj.getOptionAt`
*/
int numformatoptions;
#ifdef SWIG
%mutable;
#endif /* SWIG */
char *name; ///< See :ref:`NAME <mapfile-outputformat-name>`
char *mimetype; ///< See :ref:`MIMETYPE <mapfile-outputformat-mimetype>`
char *driver; ///< See :ref:`DRIVER <mapfile-outputformat-driver>`
char *extension; ///< See :ref:`EXTENSION <mapfile-outputformat-extension>`
int renderer; ///< A :ref:`render mode constant<mapfile-constants-render>` - normally set internally based on the driver and some other setting in the constructor.
int imagemode; ///< An :ref:`Image mode constant<mapfile-constants-imagemode>` - see :ref:`IMAGEMODE <mapfile-outputformat-imagemode>`
int transparent; ///< See :ref:`TRANSPARENT <mapfile-outputformat-transparent>`
int bands; ///< The number of bands in the raster, normally set via the BAND_COUNT formatoption - this field should be considered read-only
///< Only used for the "raw" modes, MS_IMAGEMODE_BYTE, MS_IMAGEMODE_INT16, and MS_IMAGEMODE_FLOAT32
int inmapfile; ///< Boolean value indicating if the format is in the Mapfile
} outputFormatObj;
/* The following is used for "don't care" values in transparent, interlace and
imagequality values. */
#define MS_NOOVERRIDE -1111
/************************************************************************/
/* queryObj */
/* */
/* encapsulates the information necessary to perform a query */
/************************************************************************/
#ifndef SWIG
typedef struct {
int type; /* MS_QUERY_TYPE */
int mode; /* MS_QUERY_MODE */
int layer;
pointObj point; /* by point */
double buffer;
int maxresults;
rectObj rect; /* by rect */
shapeObj *shape; /* by shape & operator (OGC filter) */
long shapeindex; /* by index */
long tileindex;
int clear_resultcache;
int maxfeatures; /* global maxfeatures */
int startindex;
int only_cache_result_count; /* set to 1 sometimes by WFS 2.0 GetFeature request */
expressionObj filter; /* by filter */
char *filteritem;
int slayer; /* selection layer, used for msQueryByFeatures() (note this is not a query mode per se) */
int cache_shapes; /* whether to cache shapes in resultCacheObj */
int max_cached_shape_count; /* maximum number of shapes cached in the total number of resultCacheObj */
int max_cached_shape_ram_amount; /* maximum number of bytes taken by shapes cached in the total number of resultCacheObj */
} queryObj;
#endif
/************************************************************************/
/* queryMapObj */
/* */
/* used to visualize query results */
/************************************************************************/
/**
The :ref:`QUERYMAP <querymap>` object.
Instances of querymapObj are always are always embedded inside the :class:`mapObj`.
*/
typedef struct {
int height; ///< See :ref:`SIZE <mapfile-querymap-size>`
int width; ///< See :ref:`SIZE <mapfile-querymap-size>`
int status; ///< See :ref:`STATUS <mapfile-querymap-status>`
int style; ///< ``HILITE``, ``SELECTED`` or ``NORMAL`` - see :ref:`STYLE <mapfile-querymap-style>`
colorObj color; ///< See :ref:`COLOR <mapfile-querymap-color>`
} queryMapObj;
/************************************************************************/
/* webObj */
/* */
/* holds parameters for a mapserver/mapscript interface */
/************************************************************************/
/**
The :ref:`WEB <web>` object.
Has no other existence than as an attribute of a :class:`mapObj`.
Serves as a container for various run-time web application definitions like temporary file paths, template paths, etc.
*/
typedef struct {
#ifdef SWIG
%immutable;
#endif /* SWIG */
hashTableObj metadata; ///< Metadata hash table - see :ref:`METADATA <mapfile-web-metadata>`
hashTableObj validation; ///< See :ref:`VALIDATION <mapfile-web-validation>`
struct mapObj *map; ///< Reference to parent :class:`mapObj`
#ifdef SWIG
%mutable;
#endif /* SWIG */
char *imagepath; ///< Filesystem path to temporary image location - see :ref:`IMAGEPATH <mapfile-web-imagepath>`
char *imageurl; ///< URL to temporary image location - see :ref:`IMAGEURL <mapfile-web-imageurl>`
char *temppath; ///< See :ref:`TEMPPATH <mapfile-web-temppath>`
char *header; ///< Path to header document - see :ref:`HEADER <mapfile-web-header>`
char *footer; ///< Path to footer document - see :ref:`FOOTER <mapfile-web-footer>`
char *empty; ///< See :ref:`EMPTY <mapfile-web-empty>`
char *error; ///< Error handling - see :ref:`ERROR <mapfile-web-error>`
double minscaledenom; ///< Maximum map scale - see :ref:`MINSCALEDENOM <mapfile-web-minscaledenom>`
double maxscaledenom; ///< Minimum map scale - see :ref:`MAXSCALEDENOM <mapfile-web-maxscaledenom>`
char *mintemplate; ///< See :ref:`MINTEMPLATE <mapfile-web-mintemplate>`
char *maxtemplate; ///< See :ref:`MAXTEMPLATE <mapfile-web-maxtemplate>`
char *queryformat; ///< See :ref:`QUERYFORMAT <mapfile-web-queryformat>` /* what format is the query to be returned, given as a MIME type */
char *legendformat; ///< See :ref:`LEGENDFORMAT <mapfile-web-legendformat>`
char *browseformat; ///< See :ref:`BROWSEFORMAT <mapfile-web-browseformat>`
#ifndef __cplusplus
char *template; ///< Path to template document - see :ref:`TEMPLATE <mapfile-web-template>`
#else
char *_template;
#endif
} webObj;
/************************************************************************/
/* styleObj */
/* */
/* holds parameters for symbolization, multiple styles may be */
/* applied within a classObj */
/************************************************************************/