File: mapscript.txt

package info (click to toggle)
mapserver 5.0.3-3%2Blenny7
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 13,556 kB
  • ctags: 12,645
  • sloc: ansic: 168,024; cs: 8,534; python: 4,618; sh: 4,213; cpp: 4,059; perl: 2,781; makefile: 787; lex: 564; java: 415; yacc: 334; tcl: 158; ruby: 53
file content (3252 lines) | stat: -rw-r--r-- 105,434 bytes parent folder | download
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
..  $Id: mapscript.txt 7249 2008-01-07 15:43:27Z tamas $
    
    This is the new unified mapscript documentation prepared using
    reStructured Text.

    ***************************************************************
    RULE #1: No tabs in this document!
    RULE #2: Indent is 4 characters.
    RULE #3: There is no rule 3.

    Thank you.
    ***************************************************************
    
    reStructured Text is part of the Python docutils module
    
        http://docutils.sourceforge.net/
    
    Documentation on reStructured Text is found at

        http://docutils.sourceforge.net/rst.html

    First reST note is about comments: a double period begins a comment
    block (like a /* in C) and a double period on a line all by itself
    closes the comment block.
..

..  Below is our main heading (becomes H1).  Note that we require empty
    lines between every different reST element such as the empty line
    between the end of this comment and the begining of the heading.
..

*****************************************************************************
 Mapscript API Reference, MapServer version 5.0 
*****************************************************************************

:Author: Sean Gillies
:Contact: sgillies@frii.com
:Revision: $Revision: 7249 $
:Date: $Date: 2008-01-07 07:43:27 -0800 (Mon, 07 Jan 2008) $

..  The next heading encountered becomes our H2
..

.. sectnum::

.. contents::
    :depth: 2
    :backlinks: top


=============================================================================
 Introduction
=============================================================================

This is language agnostic documentation for the mapscript interface to 
MapServer generated by SWIG.  This document is intended for developers
and to serve as a reference for writers of more extensive, language
specific documentation in DocBook format for the MDP.

-----------------------------------------------------------------------------
 Appendices
-----------------------------------------------------------------------------

Language-specific extensions are described in the following appendices

Python Appendix [`Text <python.txt>`__, `HTML <python.html>`__] 

-----------------------------------------------------------------------------
 Documentation Elements
-----------------------------------------------------------------------------

Classes will be documented in alphabetical order in the manner outlined below.
Attributes and methods will be formatted as definition lists with the
attribute or method as item, the type or return type as classifier, and a
concise description. To make the document as agnostic as possible, we refer to
the following types: int, float, and string.  There are yet no mapscript
methods that return arrays or sequences or accept array or sequence arguments.

We will use the SWIG term *immutable* to indicate that an attribute's value
is read-only.

------
fooObj
------

A paragraph or two about class fooObj.

fooObj Attributes
-----------------

attribute : type [access]
    Concise description of the attribute.

Attribute name are completely lower case.  Multiple words are
packed together like *outlinecolor*.

Note that because of the way that mapscript is generated many confusing,
meaningless, and even dangerous attributes are creeping into objects.  See
outputFormatObj.refcount for example.  Until we get a grip on the structure
members we are exposing to SWIG this problem will continue to grow.

fooObj Methods
--------------

method(type mandatory_parameter [, type optional_parameter=default]) : type
    Description of the method including elaboration on the method
    arguments, the method's actions, and returned values.  Optional
    parameters and their default values are enclosed in brackets.

Class method names are camel case with a leading lower case character
like *getExpressionString*.

-----------------------------------------------------------------------------
 Additional Documentation
-----------------------------------------------------------------------------

There's no point in duplicating the MapServer Mapfile Reference, which
remains the primary reference for mapscript class attributes.


=============================================================================
 Mapscript Variables
=============================================================================

-----------------------------------------------------------------------------
 Version
-----------------------------------------------------------------------------

=====================  ============  ===========
 Name                     Type         Value   
---------------------  ------------  -----------
  MS_VERSION            character       4.8
=====================  ============  ===========

-----------------------------------------------------------------------------
 Logical Control - Boolean Values
-----------------------------------------------------------------------------

=====================  ============  ===========
   Name                   Type         Value   
---------------------  ------------  -----------
  MS_TRUE              integer           1         
  MS_ON                integer           1         
  MS_YES               integer           1         
  MS_FALSE             integer           0         
  MS_OFF               integer           0         
  MS_NO                integer           0         
=====================  ============  ===========

-----------------------------------------------------------------------------
 Logical Control - Status Values
-----------------------------------------------------------------------------
=====================  ============  ===========
   Name                   Type         Value   
---------------------  ------------  -----------
  MS_DEFAULT           integer           2         
  MS_EMBED             integer           3         
  MS_DELETE            integer           4         
=====================  ============  ===========

-----------------------------------------------------------------------------
 Map Units
-----------------------------------------------------------------------------

=====================  ============  ===========
   Name                   Type         Value   
---------------------  ------------  -----------
   MS_DD               integer                
   MS_FEET             integer                
   MS_INCHES           integer                
   MS_METERS           integer                
   MS_MILES            integer                
   MS_PIXELS           integer                
=====================  ============  ===========

-----------------------------------------------------------------------------
 Layer Types
-----------------------------------------------------------------------------

=====================  ============  ===========
   Name                   Type         Value   
---------------------  ------------  -----------
 MS_LAYER_POINT        integer                
 MS_LAYER_LINE         integer                
 MS_LAYER_POLYGON      integer                
 MS_LAYER_RASTER       integer                
 MS_LAYER_ANNOTATION   integer                
 MS_LAYER_QUERY        integer                
 MS_LAYER_CIRCLE       integer                
 MS_LAYER_TILEINDEX    integer                
=====================  ============  ===========

-----------------------------------------------------------------------------
 Font Types
-----------------------------------------------------------------------------

=====================  ============  ===========
   Name                   Type         Value   
---------------------  ------------  -----------
 MS_TRUETYPE           integer                
 MS_BITMAP             integer                
=====================  ============  ===========

-----------------------------------------------------------------------------
 Label Positions
-----------------------------------------------------------------------------

=====================  ============  ===========
   Name                   Type         Value   
---------------------  ------------  -----------
 MS_UL                 integer                
 MS_LL                 integer                
 MS_UR                 integer                
 MS_LR                 integer                
 MS_CL                 integer                
 MS_CR                 integer                
 MS_UC                 integer                
 MS_LC                 integer                
 MS_CC                 integer                
 MS_AUTO               integer                
=====================  ============  ===========

-----------------------------------------------------------------------------
 Label Size (Bitmap only)
-----------------------------------------------------------------------------

=====================  ============  ===========
   Name                   Type         Value   
---------------------  ------------  -----------
 MS_TINY               integer                
 MS_SMALL              integer                
 MS_MEDIUM             integer                
 MS_LARGE              integer                
 MS_GIANT              integer                
=====================  ============  ===========

-----------------------------------------------------------------------------
 Shape Types
-----------------------------------------------------------------------------

=====================  ============  ===========
   Name                   Type         Value   
---------------------  ------------  -----------
 MS_SHAPE_POINT        integer                
 MS_SHAPE_LINE         integer                
 MS_SHAPE_POLYGON      integer                
 MS_SHAPE_NULL         integer                
=====================  ============  ===========

-----------------------------------------------------------------------------
 Measured Shape Types
-----------------------------------------------------------------------------

=====================  ============  ===========
   Name                   Type         Value   
---------------------  ------------  -----------
 MS_SHP_POINTM         integer        21      
 MS_SHP_ARCM           integer        23      
 MS_SHP_POLYGONM       integer        25      
 MS_SHP_MULTIPOINTM    integer        28      
=====================  ============  ===========

-----------------------------------------------------------------------------
 Shapefile Types
-----------------------------------------------------------------------------

==========================  ============  ===========
   Name                         Type         Value   
--------------------------  ------------  -----------
 MS_SHAPEFILE_POINT         integer        1       
 MS_SHAPEFILE_ARC           integer        3       
 MS_SHAPEFILE_POLYGON       integer        5       
 MS_SHAPEFILE_MULTIPOINT    integer        8       
==========================  ============  ===========

-----------------------------------------------------------------------------
 Query Types
-----------------------------------------------------------------------------

=====================  ============  ===========
   Name                   Type         Value   
---------------------  ------------  -----------
 MS_SINGLE             integer          0     
 MS_MULTIPLE           integer          1     
=====================  ============  ===========

-----------------------------------------------------------------------------
 File Types
-----------------------------------------------------------------------------

=====================  ============  ===========
   Name                   Type         Value   
---------------------  ------------  -----------
 MS_FILE_MAP           integer                
 MS_FILE_SYMBOL        integer                
=====================  ============  ===========

-----------------------------------------------------------------------------
 Querymap Styles
-----------------------------------------------------------------------------

=====================  ============  ===========
   Name                   Type         Value   
---------------------  ------------  -----------
 MS_NORMAL             integer                
 MS_HILITE             integer                
 MS_SELECTED           integer                
=====================  ============  ===========

-----------------------------------------------------------------------------
 Connection Types
-----------------------------------------------------------------------------

==========================  ============  ===========
   Name                         Type         Value   
--------------------------  ------------  -----------
 MS_INLINE                  integer                
 MS_SHAPEFILE               integer                
 MS_TILED_SHAPEFILE         integer                
 MS_SDE                     integer                
 MS_OGR                     integer                
 MS_POSTGIS                 integer               
 MS_WMS                     integer                
 MS_ORACLESPATIAL           integer                
 MS_WFS                     integer                
 MS_GRATICULE               integer                
 MS_MYGIS                   integer                
 MS_RASTER                  integer                
==========================  ============  ===========

-----------------------------------------------------------------------------
 DB Connection Types
-----------------------------------------------------------------------------

=====================  ============  ===========
   Name                   Type         Value   
---------------------  ------------  -----------
 MS_DB_XBASE            integer                
 MS_DB_CSV              integer                
 MS_DB_MYSQL            integer                
 MS_DB_ORACLE           integer                
 MS_DB_POSTGRES         integer                
=====================  ============  ===========

-----------------------------------------------------------------------------
 Join Types
-----------------------------------------------------------------------------

==========================  ============  ===========
   Name                         Type         Value   
--------------------------  ------------  -----------
 MS_JOIN_ONE_TO_ONE         integer                
 MS_JOIN_ONE_TO_MANY        integer                
==========================  ============  ===========

-----------------------------------------------------------------------------
 Line Join Types (for rendering)
-----------------------------------------------------------------------------

==========================  ============  ===========
   Name                         Type         Value   
--------------------------  ------------  -----------
 MS_CJC_NONE                integer                
 MS_CJC_BEVEL               integer                
 MS_CJC_BUTT                integer                
 MS_CJC_MITER               integer                
 MS_CJC_ROUND               integer                
 MS_CJC_SQUARE              integer                
 MS_CJC_TRIANGLE            integer                
==========================  ============  ===========

-----------------------------------------------------------------------------
 Image Types
-----------------------------------------------------------------------------

==========================  ============  ===========
   Name                         Type         Value   
--------------------------  ------------  -----------
 GD/GIF                     integer                
 GD/PNG                     integer                
 GD/PNG24                   integer                
 GD/JPEG                    integer                
 GD/WBMP                    integer                
 swf                        integer                
 imagemap                   integer                
 pdf                        integer                
 GDAL/GTiff                 integer                
==========================  ============  ===========

-----------------------------------------------------------------------------
 Image Modes
-----------------------------------------------------------------------------

==========================  ============  ===========
   Name                         Type         Value   
--------------------------  ------------  -----------
 MS_IMAGEMODE_PC256         integer                
 MS_IMAGEMODE_RGB           integer                
 MS_IMAGEMODE_RGBA          integer                
 MS_IMAGEMODE_INT16         integer                
 MS_IMAGEMODE_FLOAT32       integer                
 MS_IMAGEMODE_BYTE          integer                
 MS_IMAGEMODE_NULL          integer                
 MS_NOOVERRIDE              integer                
 MS_GD_ALPHA                integer       1000     
==========================  ============  ===========

-----------------------------------------------------------------------------
 Symbol Types
-----------------------------------------------------------------------------

==========================  ============  ===========
   Name                         Type         Value   
--------------------------  ------------  -----------
 MS_SYMBOL_SIMPLE           integer                
 MS_SYMBOL_VECTOR           integer                
 MS_SYMBOL_ELLIPSE          integer                
 MS_SYMBOL_PIXMAP           integer                
 MS_SYMBOL_TRUETYPE         integer                
 MS_SYMBOL_CARTOLINE        integer                
==========================  ============  ===========

-----------------------------------------------------------------------------
 Return Codes
-----------------------------------------------------------------------------

==========================  ============  ===========
   Name                         Type         Value   
--------------------------  ------------  -----------
 MS_SUCCESS                  integer           0
 MS_FAILURE                  integer           1    
 MS_DONE                     integer           2    
==========================  ============  ===========

-----------------------------------------------------------------------------
 Limiters
-----------------------------------------------------------------------------

==========================  ============  ===========
   Name                         Type         Value   
--------------------------  ------------  -----------
 MS_MAXSYMBOLS              long                   
 MS_MAXVECTORPOINTS         long                   
 MS_MAXSTYLELENGTH          long                   
 MS_IMAGECACHESIZE          long                   
==========================  ============  ===========

-----------------------------------------------------------------------------
 Error Return Codes
-----------------------------------------------------------------------------

==========================  ============  ===========
   Name                         Type         Value   
--------------------------  ------------  -----------
 MS_NOERR                   long            0      
 MS_IOERR                   long            1      
 MS_MEMERR                  long            2      
 MS_TYPEERR                 long            3      
 MS_SYMERR                  long            4      
 MS_REGEXERR                long            5      
 MS_TTFERR                  long            6      
 MS_DBFERR                  long            7      
 MS_GDERR                   long            8      
 MS_IDENTERR                long            9      
 MS_EOFERR                  long           10      
 MS_PROJERR                 long           11      
 MS_MISCERR                 long           12      
 MS_CGIERR                  long           13      
 MS_WEBERR                  long           14      
 MS_IMGERR                  long           15      
 MS_HASHERR                 long           16      
 MS_JOINERR                 long           17      
 MS_NOTFOUND                long           18      
 MS_SHPERR                  long           19      
 MS_PARSEERR                long           20      
 MS_SDEERR                  long           21      
 MS_OGRERR                  long           22      
 MS_QUERYERR                long           23      
 MS_WMSERR                  long           24      
 MS_WMSCONNERR              long           25      
 MS_ORACLESPATIALERR        long           26      
 MS_WFSERR                  long           27      
 MS_WFSCONNERR              long           28      
 MS_MAPCONTEXTERR           long           29      
 MS_HTTPERR                 long           30      
 MS_CHILDERR                long           31      
 MS_WCSERR                  long           32      
 MS_NUMERRORCODES           long           33      
 MESSAGELENGTH              long           33      
 ROUTINELENGTH              long           33      
==========================  ============  ===========


=============================================================================
 Mapscript Functions
=============================================================================

msCleanup() : void
  msCleanup() attempts to recover all dynamically allocated resources allocated
  by MapServer code and dependent libraries.  It it used primarily for final
  cleanup in scripts that need to do memory leak testing to get rid of "noise"
  one-time allocations.  It should not normally be used by production code. 

msGetVersion() : string
  Returns a string containing MapServer version information, and details on 
  what optional components are built in.  The same report as produced by 
  "mapserv -v".

msGetVersionInt() :  int
  Returns the MapServer version number (x.y.z) as an integer 
  (x*10000 + y*100 + z). (New in v5.0) e.g. V5.4.3 would return 50403.

msIO_installStdoutToBuffer() : void
  Installs a mapserver IO handler directing future stdout output to a memory
  buffer. 

msIO_installStdinFromBuffer() : void
  Installs a mapserver IO handler directing future stdin reading (ie. post 
  request capture) to come from a buffer. 

msIO_resetHandlers() : void
  Resets the default stdin and stdout handlers in place of "buffer" based
  handlers. 

msIO_getStdoutBufferString() : string
  Fetch the current stdout buffer contents as a string.  This method does
  not clear the buffer.

msIO_getStdoutBufferBytes() : binary data
  Fetch the current stdout buffer contents as a binary buffer.  The exact
  form of this buffer will vary by mapscript language (eg. string in Python,
  byte[] array in Java and C#, unhandled in perl)

msIO_stripStdoutBufferContentType() : string
  Strip the Content-type header off the stdout buffer if it has one, and
  if a content type is found it is return (otherwise NULL/None/etc). 

  
=============================================================================
 Mapscript Classes
=============================================================================

-----------------------------------------------------------------------------
 classObj
-----------------------------------------------------------------------------

An instance of classObj is associated with with one instance of layerObj_.

::

    +-------+ 0..*     1 +-------+
    | Class | <--------> | Layer |
    +-------+            +-------+

The other important associations for classObj are with styleObj_, 
labelObj_, and hashTableObj_.

::

    +-------+ 1     0..* +-------+
    | Class | ---------> | Style |
    +-------+            +-------+

    +-------+ 1     0..1 +-------+
    | Class | ---------> | Label |
    +-------+            +-------+

    +-------+ 1        1 +-----------+
    | Class | ---------> | HashTable |
    +-------+            |    --     |
                         | metadata  |
                         +-----------+


Multiple class styles are now supported in 4.1.  See the styleObj_ section
for details on use of multiple class styles.

classObj Attributes
-------------------

debug : int
    MS_TRUE or MS_FALSE

keyimage : string
    **TODO** Not sure what this attribute is for

label : labelObj_ immutable
    Definition of class labeling

layer : layerObj_ immutable
    Reference to the parent layer

maxscale : float
    The maximum scale at which class is drawn
   
metadata : hashTableObj_ immutable
    class metadata hash table.

minscale : float
    The minimum scale at which class is drawn

name : string
    Unique within a layer

numstyles : int
    Number of styles for class.  In the future, probably the 4.4 release,
    this attribute will be made *immutable*.
    
status : int
    MS_ON or MS_OFF.  Draw features of this class or do not.
    
template : string
    Template for queries

title : string
    Text used for legend labeling

type : int
    The layer type of its parent layer

classObj Methods
----------------

new classObj( [ layerObj_ parent_layer=NULL ] ) : classObj
    Create a new child classObj instance at the tail (highest index) of 
    the class array of the *parent_layer*.  A class can be created outside
    the context of a parent layer by omitting the single constructor
    argument.

clone( ) : classObj
    Return an independent copy of the class without a parent layer.

createLegendIcon( mapObj_ map, layerObj_ layer, int width, int height ) : imageObj_
    Draw and return a new legend icon.

drawLegendIcon( mapObj_ map, layerObj_ layer, int width, int height, imageObj_ image, int dstx, int dsty ) : int
    Draw the legend icon onto *image* at *dstx*, *dsty*.  Returns 
    MS_SUCCESS or MS_FAILURE.

getExpressionString() : string
    Return a string representation of the expression enclosed in the quote
    characters appropriate to the expression type.

getFirstMetaDataKey() : string
    Returns the first key in the metadata hash table.  With
    getNextMetaDataKey(), provides an opaque iterator over keys.
    
getMetaData( string key ) : string
    Return the value of the classObj metadata at *key*.

getNextMetaDataKey( string lastkey ) : string
    Returns the next key in the metadata hash table or NULL if
    *lastkey* is the last valid key.  If *lastkey* is NULL, returns the
    first key of the metadata hash table.
   
.. note:: getFirstMetaDataKey(), getMetaData(), and getNextMetaDataKey()
          are deprecated and will be removed in a future version.  Replaced
          by direct metadata access, see hashTableObj_.

getStyle( int index ) : styleObj_
    Return a reference to the styleObj at *index* in the styles array.

    See the styleObj_ section for more details on multiple class styles.

getTextString() : string
    Return a string representation of the text enclosed in the quote
    characters appropriate to the text expression type (logical or 
    simple string).

insertStyle( styleObj_ style [, int index=-1 ] ) : int
    Insert a **copy** of *style* into the styles array at index *index*.
    Default is -1, or the end of the array.  Returns the index at which the 
    style was inserted.

moveStyleDown( int index ) : int
    Swap the styleObj at *index* with the styleObj *index* + 1.
    
moveStyleUp( int index ) : int
    Swap the styleObj at *index* with the styleObj *index* - 1.

removeStyle( int index ) : styleObj_
    Remove the styleObj at *index* from the styles array and return a
    copy.

setExpression( string expression ) : int
    Set expression string where *expression* is a MapServer regular, logical
    or string expression.  Returns MS_SUCCESS or MS_FAILUIRE.
  
setMetaData( string key, string value ) : int
    Insert *value* into the classObj metadata at *key*.  Returns MS_SUCCESS
    or MS_FAILURE.

.. note:: setMetaData() is deprecated and will be removed in a future
          version.  Replaced by direct metadata access, see hashTableObj_.

setText( string text ) : int
    Set text string where *text* is a MapServer text expression. Returns 
    MS_SUCCESS or MS_FAILUIRE.

.. note:: Older versions of MapScript (pre-4.8) featured the an undocumented
          setText() method that required a layerObj be passed as the first 
          argument. That argument was completely bogus and has been removed.    

-----------------------------------------------------------------------------
 colorObj
-----------------------------------------------------------------------------

Since the 4.0 release, MapServer colors are instances of colorObj.  A colorObj
may be a lone object or an attribute of other objects and have no other
associations.

colorObj Attributes
-------------------

blue : int
    Blue component of color in range [0-255]

green : int
    Green component of color in range [0-255]

red : int
    Red component of color in range [0-255]

pen : int
    Don't mess with this unless you know what you are doing! 
    
.. note:: Because of the issue with *pen*, setting colors by individual
   components is unreliable.  Best practice is to use setRGB(), setHex(),
   or assign to a new instance of colorObj().

colorObj Methods
----------------

new colorObj( [ int red=0, int green=0, int blue=0, int pens=-4 ] ) : colorObj_ 
    Create a new instance.  The color arguments are optional.
    
setRGB( int red, int green, int blue ) : int 
    Set all three RGB components.  Returns MS_SUCCESS or MS_FAILURE.
    
setHex( string hexcolor ) : int 
    Set the color to values specified in case-independent hexadecimal
    notation.  Calling setHex('#ffffff') assigns values of 255 to each
    color component.  Returns MS_SUCCESS or MS_FAILURE.
    
toHex() : string 
    Complement to setHex, returning a hexadecimal representation of the
    color components.


-----------------------------------------------------------------------------
 errorObj
-----------------------------------------------------------------------------

This class allows inspection of the MapServer error stack.  Only needed for
the Perl module as the other language modules expose the error stack through
exceptions.

errorObj Attributes
-------------------

code : int
    MapServer error code such as MS_IMGERR (1).

message : string
    Context-dependent error message.

routine : string
    MapServer function in which the error was set.

errorObj Methods
----------------

next : errorObj
    Returns the next error in the stack or NULL if the end has been reached.


-----------------------------------------------------------------------------
 fontSetObj
-----------------------------------------------------------------------------

A fontSetObj is always a 'fontset' attribute of a mapObj_.

fontSetObj Attributes
---------------------

filename : string immutable
    Path to the fontset file on disk.

fonts : hashTableObj_ immutable
    Mapping of fonts.

numfonts : int immutable
    Number of fonts in set.

fontSetObj Methods
------------------

None


-----------------------------------------------------------------------------
 hashTableObj
-----------------------------------------------------------------------------

A hashTableObj is a very simple mapping of case-insensitive string keys to
single string values.  Map, Layer, and Class *metadata* have always been
hash hables and now these are exposed directly.  This is a limited hash
that can contain no more than 41 values.

hashTableObj Attributes
-----------------------

numitems : int immutable
    Number of hash items.

hashTableObj Methods
--------------------

clear( ) : void
    Empties the table of all items.
    
get( string key [, string default=NULL ] ) : string
    Returns the value of the item by its *key*, or *default* if the key
    does not exist.

nextKey( [string key=NULL] ) : string
    Returns the name of the next key or NULL if there is no valid next key.
    If the input *key* is NULL, returns the first key.

remove( string key ) : int
    Removes the hash item by its *key*.  Returns MS_SUCCESS or MS_FAILURE.
    
set( string key, string value ) : int
    Sets a hash item.  Returns MS_SUCCESS or MS_FAILURE.


-----------------------------------------------------------------------------
 imageObj
-----------------------------------------------------------------------------

An image object is a wrapper for GD and GDAL images.

imageObj Attributes
-------------------

format : outputFormatObj_ immutable
    Image format.

height : int immutable
    Image height in pixels.
    
imagepath : string immutable
    If image is drawn by mapObj.draw(), this is the mapObj's web.imagepath.

imageurl : string immutable
    If image is drawn by mapObj.draw(), this is the mapObj's web.imageurl.

renderer : int 
    MS_RENDER_WITH_GD, MS_RENDER_WITH_SWF, MS_RENDER_WITH_RAWDATA,
    MS_RENDER_WITH_PDF, or MS_RENDER_WITH_IMAGEMAP.  Don't mess with this!

size : int
    I don't see where this is used.  Anyone?  --SG

width : int immutable
    Image width in pixels.


imageObj Methods
----------------

new imageObj( int width, int height [, outputFormatObj_ format=NULL [, string filename=NULL ] ] ) : imageObj
    Create new instance of imageObj.  If *filename* is specified, an imageObj
    is created from the file and any specified *width*, *height*, and
    *format* parameters will be overridden by values of the image in 
    *filename*.  Otherwise, if *format* is specified an imageObj is created
    using that format.  See the *format* attribute above for details.  If
    *filename* is not specified, then *width* and *height* should be specified.
    
getBytes() : binary data
    Returns the image contents as a binary buffer.  The exact
    form of this buffer will vary by mapscript language (eg. string in Python,
    byte[] array in Java and C#, unhandled in perl)

save( string filename [, mapObj_ parent_map=NULL ] ) : int
    Save image to *filename*.  The optional *parent_map* parameter must be
    specified if saving GeoTIFF images.

write( [ FILE file=NULL ] ) : int
    Write image data to an open file descriptor or, by default, to *stdout*.
    Returns MS_SUCCESS or MS_FAILURE.
    
.. note:: This method is current enabled for Python and C# only. C# supports writing onto a
   Stream object. User-contributed typemaps are needed for Perl, Ruby, and Java.

.. note:: The free() method of imageObj has been deprecated.  In MapServer
   revisions 4+ all instances of imageObj will be properly disposed of by
   the interpreter's garabage collector.  If the application can't wait 
   for garabage collection, then the instance can simply be deleted or
   undef'd.


-----------------------------------------------------------------------------
 intarray
-----------------------------------------------------------------------------

An intarray is a utility class generated by SWIG useful for manipulating
map layer drawing order.  See mapObj::getLayersDrawingOrder for discussion
of mapscript use and see http://www.swig.org/Doc1.3/Library.html#Library_nn5
for a complete reference.

intarray Attributes
-------------------

None

intarray Methods
----------------

new intarray( int numitems ) : intarray
    Returns a new instance of the specified length.

    
-----------------------------------------------------------------------------
 labelCacheMemberObj
-----------------------------------------------------------------------------

An individual feature label.  The labelCacheMemberObj class is associated
with labelCacheObj.

::

    +------------------+ 0..*     1 +------------+
    | LabelCacheMember | <--------- | LabelCache |
    +------------------+            +------------+
    

labelCacheMemberObj Attributes
------------------------------

classindex : int immutable
    Index of the class of the labeled feature.
    
featuresize : float immutable
    **TODO**

label : labelObj_ immutable
    Copied from the class of the labeled feature.
 
layerindex : int immutable
    The index of the layer of the labeled feature.
    
numstyles : int immutable
    Number of styles as for the class of the labeled feature.

point : pointObj_ immutable
    Label point.

poly : shapeObj_ immutable
    Label bounding box.
    
shapeindex : int immutable
    Index within shapefile of the labeled feature.
 
status : int immutable
    Has the label been drawn or not?

styles : styleObj_ immutable
    **TODO** this should be protected from SWIG.
    
text : string immutable
    Label text.

tileindex : int immutable
    Tileindex of the layer of the labeled feature.
    
labelCacheMemberObj Methods
---------------------------

None.

.. note::
   No real scripting control over labeling currently, but there may be
   some interesting new possibilities if users have control over labeling
   text, position, and status.


-----------------------------------------------------------------------------
 labelCacheObj
-----------------------------------------------------------------------------

Set of a map's cached labels.  Has no other existence other than as a
'labelcache' attribute of a mapObj.  Associated with labelCacheMemberObj and
markerCacheMemberObj.

::

    +------------+ 1     0..* +-------------------+
    | LabelCache | ---------> | LabelCacheMember  |
    +------------+            + ----------------- +
                              | MarkerCacheMember |
                              +-------------------+

labelCacheObj Attributes
------------------------

cachesize : int immutable
    **TODO**

markercachesize : int immutable
    **TODO**
    
numlabels : int immutable
    Number of label members.

nummarkers : int immutable
    Number of marker members.

labelCacheObj Methods
---------------------

freeCache( ) : void
    Free the labelcache.


-----------------------------------------------------------------------------
 labelObj
-----------------------------------------------------------------------------

A labelObj is associated with a classObj, a scalebarObj, or a legendObj.

::

    +-------+ 0..1     1 +----------+
    | Label | <--------- | Class    |
    +-------+            | -------- |
                         | Scalebar |
                         | -------- |
                         | Legend   |
                         +----------+ 
                           
labelObj Attributes
-------------------

angle : float
    **TODO**

antialias : int
    MS_TRUE or MS_FALSE

autoangle : int
    MS_TRUE or MS_FALSE
    
autofollow : int
    MS_TRUE or MS_FALSE. Tells mapserver to compute a curved label
    for appropriate linear features (see RFC 11 for specifics).   

autominfeaturesize: int
    MS_TRUE or MS_FALSE

backgroundcolor : colorObj_
    Color of background rectangle or billboard.

backgroundshadowcolor : colorObj_
    Color of background rectangle or billboard shadow.

backgroundshadowsizex : int
    Horizontal offset of drop shadow in pixels.

backgroundshadowsizey : int
    Vertical offset of drop shadow in pixels.

buffer : int
    Maybe this should've been named 'padding' since that's what it is:
    padding in pixels around a label.

color : colorObj_
    Foreground color.
    
encoding : string
    Supported encoding format to be used for labels.
    If the format is not supported, the label will not be drawn.
    Requires the iconv library (present on most systems).
    The library is always detected if present on the system,
    but if not the label will not be drawn.
    Required for displaying international characters in MapServer.
    More information can be found at:
    http://www.foss4g.org/FOSS4G/MAPSERVER/mpsnf-i18n-en.html.
    
font : string
    Name of TrueType font.

force : int
    MS_TRUE or MS_FALSE.

maxsize : int
    Maximum height in pixels for scaled labels.  See symbolscale attribute
    of layerObj_.

mindistance : int
    Minimum distance in pixels between duplicate labels.
    
minfeaturesize : int
    Features of this size of greater will be labeled.
    
minsize : int
    Minimum height in pixels.

offsetx : int
    Horizontal offset of label.

offsety : int
    Vertical offset of label.

outlinecolor : colorObj_
    Color of one point outline.

partials : int
    MS_TRUE (default) or MS_FALSE.  Whether or not labels can flow past
    the map edges.
    
position : int
    MS_UL, MS_UC, MS_UR, MS_CL, MS_CC, MS_CR, MS_LL, MS_LC, MS_LR, or
    MS_AUTO.

shadowcolor : colorObj_
    Color of drop shadow.

shadowsizex : int
    Horizontal offset of drop shadow in pixels.

shadowsizey : int
    Vertical offset of drop shadow in pixels.

size : int
    Annotation height in pixels.

type : int
    MS_BITMAP or MS_TRUETYPE.

wrap : string
    Character on which legend text will be broken to make multi-line
    legends.
   
labelObj Methods
----------------

None

-----------------------------------------------------------------------------
 layerObj
-----------------------------------------------------------------------------

A layerObj is associated with mapObj.  In the most recent revision, an
intance of layerObj can exist outside of a mapObj.

::

    +-------+ 0..*  0..1 +-----+
    | Layer | <--------> | Map |
    +-------+            +-----+
   
The other important association for layerObj is with classObj_

::

    +-------+ 1     0..* +-------+
    | Layer | <--------> | Class |
    +-------+            +-------+

and hashTableObj_

::

    +-------+ 1        1 +-----------+
    | Layer | ---------> | HashTable |
    +-------+            |    --     |
                         | metadata  |
                         +-----------+


layerObj Attributes
-------------------

bandsitem : string
    The attribute from the index file used to select the source
    raster band(s) to be used.  Normally NULL for default bands processing.

classitem : string
    The attribute used to classify layer data.
   
connection : string
    Layer connection or DSN.

connectiontype : int
    See MS_CONNECTION_TYPE in mapserver.h for possible values.

data : string
    Layer data definition, values depend upon connectiontype.
  
debug : int
    Enable debugging of layer.  MS_ON or MS_OFF (default).
    
dump : int
    Switch to allow mapserver to return data in GML format.  MS_TRUE or
    MS_FALSE.  Default is MS_FALSE.

extent : rectObj_
    optional limiting extent for layer features.
    
filteritem : string
    Attribute defining filter.
    
footer : string
    **TODO**
    
group : string
    Name of a group of layers.
    
header : string
    **TODO**
    
index : int immutable
    Index of layer within parent map's layers array.
   
labelangleitem : string
    Attribute defining label angle.

labelcache : int
    MS_ON or MS_OFF.  Default is MS_ON.

labelitem : string
    Attribute defining feature label text.

labelmaxscale : float
    Maximum scale at which layer will be labeled.

labelminscale : float
    Minimum scale at which layer will be labeled.

labelrequires : string
    Logical expression.

labelsizeitem : string
    Attribute defining label size.
    
map : mapObj_ immutable
    Reference to parent map.
  
maxfeatures : int
    Maximum number of layer features that will be drawn.  For shapefile data
    this means the first N features where N = maxfeatures.
    
maxscale : float
    Maximum scale at which layer will be drawn.

metadata : hashTableObj_ immutable
    Layer metadata.
    
minscale : float
    Minimum scale at which layer will be drawn.

name : string
    Unique identifier for layer.
    
numclasses : int immutable
    Number of layer classes.

numitems : int immutable
    Number of layer feature attributes (items).

numjoins : int immutable
    Number of layer joins.
    
numprocessing : int immutable
    Number of raster processing directives.

offsite : colorObj_
    transparent pixel value for raster layers.
    
postlabelcache : int
    MS_TRUE or MS_FALSE.  Default is MS_FALSE.
   
requires : string
    Logical expression.
    
sizeunits : int
    Units of class size values. MS_INCHES, MS_FEET, MS_MILES, MS_METERS, MS_KILOMETERS, MS_DD or MS_PIXELS

status : int
    MS_ON, MS_OFF, or MS_DEFAULT.
  
styleitem : string
    Attribute defining styles.

symbolscale : float
    Scale at which symbols are default size.

template : string
    Template file.  Note that for historical reasons, the query attribute
    must be non-NULL for a layer to be queryable.
  
tileindex : string
    Layer index file for tiling support.

tileitem : string
    Attribute defining tile paths.
    
tolerance : float
    Search buffer for point and line queries.

toleranceunits : int
    MS_INCHES, MS_FEET, MS_MILES, MS_METERS, MS_KILOMETERS, MS_DD or MS_PIXELS

transform : int
    Whether or not layer data is to be transformed to image units.  
    MS_TRUE or MS_FALSE.  Default is MS_TRUE.  Case of MS_FALSE is for
    data that are in image coordinates such as annotation points.
   
transparency : int
    Layer opacity percentage in range [0, 100].  The special value of 
    MS_GD_ALPHA (1000) indicates that the alpha transparency of pixmap
    symbols should be honored, and should be used only for layers that use
    RGBA pixmap symbols. 
    
type : int
    See MS_LAYER_TYPE in mapserver.h.
    
units : int
    Units of the layer.  See MS_UNITS in mapserver.h.

layerObj Methods
----------------

new layerObj( [ mapObj_ parent_map=NULL ] ) : layerObj
    Create a new layerObj in *parent_map*.  The layer index of the new layerObj
    will be equal to the *parent_map* numlayers - 1.  The *parent_map* arg is
    now optional and Layers can exist outside of a Map.
    
addFeature( shapeObj_ shape ) : int 
    Add a new inline feature on a layer.  Returns -1 on error. 
    **TODO**: Is this similar to inline features in a mapfile?  Does it work
    for any kind of layer or connection type? 
    
addProcessing( string directive ) : void
    Adds a new processing directive line to a layer, similar to the PROCESSING
    directive in a map file.  Processing directives supported are specific to
    the layer type and underlying renderer. 

applySLD( string sld, string stylelayer ) : int 
    Apply the SLD document to the layer object. 
    The matching between the sld document and the layer will be done 
    using the layer's name.
    If a namedlayer argument is passed (argument is optional), 
    the NamedLayer in the sld that matchs it will be used to style 
    the layer. See SLD HOWTO for more information on the SLD support.

applySLDURL( string sld, string stylelayer ) : int
    Apply the SLD document pointed by the URL to the layer object. The 
    matching between the sld document and the layer will be done using 
    the layer's name.
    If a namedlayer argument is passed (argument is optional), 
    the NamedLayer in the sld that matchs it will be used to style 
    the layer.
    See SLD HOWTO for more information on the SLD support.

clearProcessing() : int
    Clears the layer's raster processing directives.  Returns the subsequent
    number of  directives, which will equal MS_SUCCESS if the directives have
    been cleared.

clone() : layerObj
    Return an independent copy of the layer with no parent map.
    
close() : void
    Close the underlying layer.

.. note:: demote() is removed in MapServer 4.4

draw( mapObj_ map, imageObj_ image ) : int
    Renders this layer into the target image, adding labels to the cache if
    required.  Returns MS_SUCCESS or MS_FAILURE. 
    **TODO**: Does the map need to be the map on which the layer is defined?  
    I suspect so.  

drawQuery( mapObj_ map, imageObj_ image ) : 
    Draw query map for a single layer into the target image.  Returns
    MS_SUCCESS or MS_FAILURE.

executeWFSGetFeature( layer ) : string
    Executes a GetFeature request on a WFS layer and returns the
    name of the temporary GML file created. Returns an empty
    string on error.

generateSLD() : void
    Returns an SLD XML string based on all the classes found in the layers.

getClass( int i ) : classObj_
    Fetch the requested class object.  Returns NULL if the class index is
    out of the legal range.   The numclasses field contains the number of
    classes available, and the first class is index 0.

getExtent() : rectObj_
    Fetches the extents of the data in the layer.  This normally requires a
    full read pass through the features of the layer and does not work for
    raster layers.  

getFeature( int shapeindex [, int tileindex=-1 ] ) : shapeObj_
    Return the layer feature at *shapeindex* and *tileindex*.

getFilterString() : string
    Returns the current filter expression. 

getFirstMetaDataKey() : string
    Returns the first key in the metadata hash table.  With
    getNextMetaDataKey(), provides an opaque iterator over keys.

getItem( int i ) : string
    Returns the requested item.  Items are attribute fields, and this method
    returns the item name (field name).   The numitems field contains the 
    number of items available, and the first item is index zero.
    
getMetaData( string key ) : string
    Return the value at *key* from the metadata hash table.

getNextMetaDataKey( string lastkey ) : string
    Returns the next key in the metadata hash table or NULL if
    *lastkey* is the last valid key.  If *lastkey* is NULL, returns the
    first key of the metadata hash table.

.. note:: getFirstMetaDataKey(), getMetaData(), and getNextMetaDataKey()
          are deprecated and will be removed in a future version.  Replaced
          by direct metadata access, see hashTableObj_.

getNumFeatures() : int
    Returns the number of inline features in a layer.  **TODO**: is this
    really only online features or will it return the number of non-inline
    features on a regular layer? 

getNumResults() : int
    Returns the number of entries in the query result cache for this layer.

getProcessing( int index) : string
    Return the raster processing directive at *index*.
    
getProjection( ) : string
    Returns the PROJ.4 definition of the layer's projection.

getResult( int i ) : resultCacheMemberObj_ 
    Fetches the requested query result cache entry, or NULL if the index is
    outside the range of available results.  This method would normally only
    be used after issuing a query operation.

.. note:: getNumResults() and getResult() are deprecated in MapServer 4.4.
          Users should instead use the new querying API described in 
          querying-HOWTO.txt.  layerObj::getResults() is the entry point for
          the new API.

getResults() : resultCacheObj_
    Returns a reference to layer's result cache.  Should be NULL prior to
    any query, or after a failed query or query with no results.

getShape( shapeObj_ shape, int tileindex, int shapeindex ) : int
    Get a shape from layer data.

.. note:: getShape() is deprecated.  Users should adopt getFeature() for new
          applications.
          
getWMSFeatureInfoURL( mapObj_ map, int click_x, int click_y, int feature_count, string info_format ) : string
    Return a WMS GetFeatureInfo URL (works only for WMS layers)
    clickX, clickY is the location of to query in pixel coordinates
    with (0,0) at the top left of the image.
    featureCount is the number of results to return.
    infoFormat is the format the format in which the result should be
    requested.  Depends on remote server's capabilities.  MapServer
    WMS servers support only "MIME" (and should support "GML.1" soon).
    Returns "" and outputs a warning if layer is not a WMS layer 
    or if it is not queriable.
    
insertClass( classObj_ class [, int index=-1 ] ) : int
    Insert a *copy* of the class into the layer at the requested *index*.
    Default index of -1 means insertion at the end of the array of classes.
    Returns the index at which the class was inserted.

isVisible( ) : int
    Returns MS_TRUE or MS_FALSE after considering the layer status, minscale,
    and maxscale within the context of the parent map.

moveClassDown( int class ) : int 
    The class specified by the class index will be moved up into
    the array of layers. Returns MS_SUCCESS or MS_FAILURE.
    ex. moveClassDown(1) will have the effect of moving class 1
    down to postion 2, and the class at position 2 will be moved
    to position 1.

moveClassUp( int class ) : int 
    The class specified by the class index will be moved up into
    the array of layers. Returns MS_SUCCESS or MS_FAILURE.
    ex. moveClassUp(1) will have the effect of moving class 1
    up to postion 0, and the class at position 0 will be moved
    to position 1.

nextShape( ) : shapeObj_
    Called after msWhichShapes has been called to actually retrieve shapes 
    within a given area returns a shape object or MS_FALSE
    
    example of usage :

::

           mapObj map = new mapObj("d:/msapps/gmap-ms40/htdocs/gmap75.map");
           layerObj layer = map.getLayerByName('road');
           int status = layer.open();
           status = layer.whichShapes(map.extent);
           shapeObj shape;
           while ((shape = layer.nextShape()) != null) 
           {
             ...
           }
           layer.close();

open() : void
    Opens the underlying layer.  This is required before operations like
    getFeature() will work, but is not required before a draw or query call.

.. note:: promote() is eliminated in MapServer 4.4.

queryByAttributes( mapObj_ map, string qitem, string qstring, int mode ) : int
    Query layer for shapes that intersect current map extents.  qitem is the 
    item (attribute) on which the query is performed, and qstring is the 
    expression to match.  The query is performed on all the shapes that are 
    part of a CLASS that contains a TEMPLATE value or that match any class in a
    layer that contains a LAYER TEMPLATE value.  

    Note that the layer's FILTER/FILTERITEM are ignored by this function.
    Mode is MS_SINGLE or MS_MULTIPLE depending on number of results you want. 
    Returns MS_SUCCESS if shapes were found or MS_FAILURE if nothing
    was found or if some other error happened.

queryByFeatures( mapObj_ map, int slayer ) : int 
    Perform a query set based on a previous set of results from
    another layer. At present the results MUST be based on a polygon
    layer.
    Returns MS_SUCCESS if shapes were found or MS_FAILURE if nothing
    was found or if some other error happened

queryByIndex( mapObj_ map, int shapeindex, int tileindex [, int bAddToQuery=MS_FALSE ]) : int
    Pop a query result member into the layer's result cache.  By default
    clobbers existing cache.  Returns MS_SUCCESS or MS_FAILURE.

queryByPoint( mapObj_ map, pointObj_ point, int mode, float buffer ) : int
    Query layer at point location specified in georeferenced map 
    coordinates (i.e. not pixels).  
    The query is performed on all the shapes that are part of a CLASS 
    that contains a TEMPLATE value or that match any class in a
    layer that contains a LAYER TEMPLATE value.
    Mode is MS_SINGLE or MS_MULTIPLE depending on number of results
    you want. 
    Passing buffer <=0 defaults to tolerances set in the map file 
    (in pixels) but you can use a constant buffer (specified in 
    ground units) instead.
    Returns MS_SUCCESS if shapes were found or MS_FAILURE if nothing
    was found or if some other error happened.

queryByRect( mapObj_ map, rectObj_ rect ) : int
    Query layer using a rectangle specified in georeferenced map 
    coordinates (i.e. not pixels).
    The query is performed on all the shapes that are part of a CLASS 
    that contains a TEMPLATE value or that match any class in a
    layer that contains a LAYER TEMPLATE value.
    Returns MS_SUCCESS if shapes were found or MS_FAILURE if nothing
    was found or if some other error happened.

queryByShape( mapObj_ map, shapeObj_ shape ) : int
    Query layer based on a single shape, the shape has to be a polygon
    at this point. 
    Returns MS_SUCCESS if shapes were found or MS_FAILURE if nothing
    was found or if some other error happened 

removeClass( int index ) : classObj_
    Removes the class indicated and returns a copy, or NULL in the case
    of a failure.  Note that subsequent classes will be renumbered by this
    operation.  The numclasses field contains the number of classes available.

removeMetaData( string key ) : int
    Delete the metadata hash at *key*.  Returns MS_SUCCESS or
    MS_FAILURE.

.. note:: removeMetaData() is deprecated and will be removed in a future
          version.  Replaced by direct metadata access, see hashTableObj_.

setExtent( float minx, float miny, float maxx, float maxy ) : int
    Sets the extent of a layer.  Returns MS_SUCCESS or MS_FAILURE.
    
setFilter( string filter ) : int 
    Sets a filter expression similarly to the FILTER expression in a map 
    file.  Returns MS_SUCCESS on success or MS_FAILURE if the expression
    fails to parse. 

setMetaData( string key, string value ) : int
    Assign *value* to the metadata hash at *key*.  Return MS_SUCCESS
    or MS_FAILURE.

.. note:: setMetaData() is deprecated and will be removed in a future
          version.  Replaced by direct metadata access, see hashTableObj_.

setProcessingKey( string key, string value ) : void
    Adds or replaces a processing directive of the form "key=value".  Unlike
    the addProcessing() call, this will replace an existing processing
    directive for the given key value.  Processing directives supported are 
    specific to the layer type and underlying renderer. 

setProjection( string proj4 ) : int
    Set the layer projection using a PROJ.4 format projection definition 
    (ie. "+proj=utm +zone=11 +datum=WGS84" or "init=EPSG:26911").  Returns 
    MS_SUCCESS or MS_FAILURE. 

setWKTProjection( string wkt ) : int
    Set the layer projection using OpenGIS Well Known Text format.  Returns
    MS_SUCCESS or MS_FAILURE.

int whichShapes( rectObj_ rect ) : int
    Performs a spatial, and optionally an attribute based feature search. 
    The function basically prepares things so that candidate features can be 
    accessed by query or drawing functions (eg using nextShape function).
    Returns MS_SUCCESS or MS_FAILURE.

-----------------------------------------------------------------------------
 legendObj
-----------------------------------------------------------------------------

legendObj is associated with mapObj_

::

     +--------+ 0..1     1 +-----+
     | Legend | <--------> | Map |
     +--------+            +-----+

and with labelObj_.

::

     +--------+ 1        1 +-------+
     | Legend | ---------> | Label |
     +--------+            +-------+

legendObj Attributes
--------------------

height : int
    Legend height.
    
imagecolor : colorObj_
    Legend background color.

keysizex : int
    Width in pixels of legend keys.

keysizey : int
    Pixels.

keyspacingx : int
    Horizontal padding around keys in pixels.

keyspacingy : int
    Vertical padding.

label : labelObj_ immutable
    legend label.

map : mapObj_ immutable
    Reference to parent mapObj.
    
outlinecolor : colorObj_
    key outline color.

position : int
    MS_UL, MS_UC, MS_UR, MS_LL, MS_LC, or MS_LR.

postlabelcache : int
    MS_TRUE or MS_FALSE.

status : int
    MS_ON, MS_OFF, or MS_EMBED.

template : string
    Path to template file.

width : int
    Label width.

legendObj Methods
-----------------

None


-----------------------------------------------------------------------------
 lineObj
-----------------------------------------------------------------------------

A lineObj is composed of one or more pointObj_ instances.

::

    +------+ 0..1  1..* +-------+
    | Line | ---------> | Point |
    +------+            +-------+

lineObj Attributes
------------------

numpoints : int immutable
    Number of points in the line.

lineObj Methods
---------------

add(pointObj_ point) : int
    Add *point* to the line.  Returns MS_SUCCESS or MS_FAILURE.

get(int index) : pointObj_
    Return reference to point at *index*.

project(projectionObj_ proj_in, projectionObj_ proj_out) : int
    Transform line in place from *proj_in* to *proj_out*.  Returns
    MS_SUCCESS or MS_FAILURE.

set(int index, pointObj_ point) : int
    Set the point at *index* to *point*.  Returns MS_SUCCESS or MS_FAILURE.

-----------------------------------------------------------------------------
 mapObj
-----------------------------------------------------------------------------

A mapObj is primarily associated with instances of layerObj_.

::

     +-----+ 0..1  0..* +-------+
     | Map | <--------> | Layer |
     +-----+            +-------+

Secondary associations are with legendObj_, scalebarObj_, referenceMapObj_,

::

     +-----+ 1     0..1 +--------------+
     | Map | ---------> | Legend       |
     +-----+            | ------------ |
                        | Scalebar     |
                        | ------------ |
                        | ReferenceMap |
                        +--------------+ 

outputFormatObj_.

::

     +-----+ 1     1..* +--------------+
     | Map | ---------> | OutputFormat |
     +-----+            +------------- + 
                           

mapObj Attributes
-----------------

cellsize : float
    Pixel size in map units.

configoptions : hashObj immutable
    A hash table of configuration options from CONFIG keywords in the .map. 
    Direct access to config options is discouraged.  Use the setConfigOption()
    and getConfigOption() methods instead.
    
datapattern : string
    **TODO** not sure this is meaningful for mapscript. 
    
debug : int
    MS_TRUE or MS_FALSE.

extent : rectObj_
    Map's spatial extent.
    
fontset : fontSetObj_ immutable
    The map's defined fonts.

height : int
    Map's output image height in pixels.

.. note:: direct setting of *height* is deprecated in MapServer version 4.4.
   Users should set width and height simultaneously using setSize().
   
imagecolor : colorObj_
    Initial map background color.
    
imagequality : int
    JPEG image quality.

.. note:: map imagequality is deprecated in MapServer 4.4 and should
          instead be managed through map outputformats.
          
imagetype : string immutable
    Name of the current output format.
    
interlace : int
    Output image interlacing.

.. note:: map interlace is deprecated in MapServer 4.4 and should
          instead be managed through map outputformats.

lablecache : labelCacheObj_ immutable
    Map's labelcache.

legend : legendObj_ immutable
    Reference to map's legend.

mappath : string
    Filesystem path of the map's mapfile.
    
maxsize : int
    **TODO** ?
    
name : string
    Unique identifier.

numlayers : int immutable
    Number of map layers.

numoutputformats : int
    Number of output formats.

outputformat : outputFormatObj_
    The currently selected output format.

.. note:: Map outputformat should not be modified directly.  Use the
          selectOutputFormat() method to select named formats.
          
outputformatlist : outputFormatObj[]
    Array of the available output formats.

.. note:: Currently only available for C#. A proper typemaps should be
          implemented for the other languages.
   
querymap : queryMapObj immutable
    **TODO** should this be exposed to mapscript?

reference : referenceMapObj_ immutable
    Reference to reference map.
    
resolution : float
    Nominal DPI resolution.  Default is 72.
    
scale : float
    The nominal map scale.  A value of 25000 means 1:25000 scale.

scalebar : scalebarObj_ immutable
    Reference to the scale bar.
    
shapepath : string
    Base filesystem path to layer data.  
    
status : int
    MS_OFF, MS_ON, or MS_DEFAULT.

symbolset : symbolSetObj_ immutable
    The map's set of symbols.

templatepattern : string
    **TODO** not sure this is meaningful for mapscript. 

transparent : int
    MS_TRUE or MS_FALSE.

.. note:: map transparent is deprecated in MapServer 4.4 and should
          instead be managed through map outputformats.

units : int
    MS_DD, MS_METERS, etc.
   
web : webObj_ immutable
    Reference to map's web definitions.
    
width : int
    Map's output image width in pixels.

.. note:: direct setting of *width* is deprecated in MapServer version 4.4.
   Users should set width and height simultaneously using setSize().
   
mapObj Methods
--------------

new mapObj( [ string filename='' ] ) : mapObj
    Create a new instance of mapObj.  Note that the filename is now optional.
  
appendOutputFormat( outputFormatObj_ format ) : int
    Attach *format* to the map's output format list.  Returns the updated
    number of output formats.

applyConfigOptions( ) : void
    Apply the defined configuration options set by setConfigOption().

applySLD( string sldxml ) : int
    Parse the SLD XML string *sldxml* and apply to map layers.  Returns
    MS_SUCCESS or MS_FAILURE.

applySLDURL( string sldurl ) : int
    Fetch SLD XML from the URL *sldurl* and apply to map layers.  Returns
    MS_SUCCESS or MS_FAILURE.
    
clone( ) : mapObj
    Returns a independent copy of the map, less any caches.

    .. note:: In the Java module this method is named 'cloneMap'.

draw( ) : imageObj_
    Draw the map, processing layers according to their defined order and
    status.  Return an imageObj.

drawLabelCache( imageObj_ image ) : int
    Draw map's label cache on *image*.  Returns MS_SUCCESS or MS_FAILURE.

drawLegend( ) : imageObj_
    Draw map legend, returning an imageObj.
    
drawQuery( ) : imageObj_
    Draw query map, returning an imageObj.
    
drawReferenceMap( ) : imageObj_
    Draw reference map, returning an imageObj.

drawScalebar( ) : imageObj_
    Draw scale bar, returning an imageObj.

embedLegend( imageObj_ image ) : int
    Embed map's legend in *image*.  Returns MS_SUCCESS or MS_FAILURE.
    
embedScalebar( imageObj_ image ) : int
    Embed map's scalebar in *image*.  Returns MS_SUCCESS or MS_FAILURE.

freeQuery( [ int qlayer=-1 ] ) : void
    Clear layer query result caches.  Default is -1, or *all* layers.
    
generateSLD( ) : string
    Return SLD XML as a string for map layers.
    
getConfigOption( string key ) : string
    Fetches the value of the requested configuration key if set.  Returns
    NULL if the key is not set.  

getFirstMetaDataKey( ) : string
    Returns the first key in the web.metadata hash table.  With
    getNextMetaDataKey( ), provides an opaque iterator over keys.
    
getLayer( int index ) : layerObj_
    Returns a reference to the layer at *index*.

getLayerByName( string name ) : layerObj_
    Returns a reference to the named layer.
   
getLayersDrawingOrder( ) : int*
    Returns an array of layer indexes in drawing order.

.. note::
   Unless the proper typemap is implemented for the module's language
   a user is more likely to get back an unuseable SWIG pointer to the
   integer array.

getMetaData( string key ) : string
    Return the value at *key* from the web.metadata hash table.

getNextMetaDataKey( string lastkey ) : string
    Returns the next key in the web.metadata hash table or NULL if
    *lastkey* is the last valid key.  If *lastkey* is NULL, returns the
    first key of the metadata hash table.
    
getNumSymbols( ) : int
    Return the number of symbols in map.

getOutputFormatByName( string imagetype ) : outputFormatObj_
    Return the output format corresponding to driver name *imagetype* or
    to format name *imagetype*.  This works exactly the same as the
    IMAGETYPE directive in a mapfile, is case insensitive and allows 
    an output format to be found either by driver (like 'GD/PNG') or
    name (like 'PNG24').

getProjection( ) : string
    Returns the PROJ.4 definition of the map's projection.

getSymbolByName( string name ) : int
    Return the index of the named symbol in the map's symbolset.

.. note::
   This method is poorly named and too indirect.  It is preferrable to use
   the getSymbolByName method of symbolSetObj, which really does return a
   symbolObj reference, or use the index method of symbolSetObj to get a
   symbol's index number.

insertLayer( layerObj layer [, int nIndex=-1 ] ) : int
    Insert a copy of *layer* into the Map at index *nIndex*.  The default
    value of *nIndex* is -1, which means the last possible index.  Returns
    the index of the new Layer, or -1 in the case of a failure.

loadMapContext( string filename [, int useUniqueNames=MS_FALSE ] ) : int
    Load an OGC map context file to define extents and layers of a map.

loadOWSParameters( OWSRequest_ request [, string version='1.1.1' ] ) : int
    Load OWS request parameters (BBOX, LAYERS, &c.) into map.  Returns
    MS_SUCCESS or MS_FAILURE.

loadQuery( string filename ) : int
    Load a saved query.  Returns MS_SUCCESS or MS_FAILURE.
    
moveLayerDown( int layerindex ) : int
    Move the layer at *layerindex* down in the drawing order array, meaning
    that it is drawn later.  Returns MS_SUCCESS or MS_FAILURE.
    
moveLayerUp( int layerindex ) : int
    Move the layer at *layerindex* up in the drawing order array, meaning
    that it is drawn earlier.  Returns MS_SUCCESS or MS_FAILURE.
    
nextLabel( ) : labelCacheMemberObj_
    Return the next label from the map's labelcache, allowing iteration
    over labels.

.. note:: nextLabel() is deprecated and will be removed 
          in a future version. Replaced by getLabel().

getLabel( int labelindex ) : labelCacheMemberObj_
    Return label at specified index from the map's labelcache.

OWSDispatch( OWSRequest req ) : int
    Processes and executes the passed OpenGIS Web Services request on the 
    map.  Returns MS_DONE (2) if there is no valid OWS request in the req 
    object, MS_SUCCESS (0) if an OWS request was successfully processed and
    MS_FAILURE (1) if an OWS request was not successfully processed.  OWS
    requests include WMS, WFS, WCS and SOS requests supported by MapServer. 
    Results of a dispatched request are written to stdout and can be captured
    using the msIO services (ie. msIO_installStdoutToBuffer() and 
    msIO_getStdoutBufferString())

prepareImage( ) : imageObj_
    Returns an imageObj initialized to map extents and outputformat.
    
prepareQuery( ) : void
    **TODO** this function only calculates the scale or am I missing
    something?
  
processLegendTemplate( string names[], string values[], int numitems ) : string
    Process MapServer legend template and return HTML.

processQueryTemplate( string names[], string values[], int numitems ) : string
    Process MapServer query template and return HTML.

processTemplate( int generateimages, string names[], string values[], int numitems ) : string
    Process MapServer template and return HTML.

.. note::
   None of the three template processing methods will be useable unless
   the proper typemaps are implemented in the module for the target
   language.  Currently the typemaps are not implemented.
    
queryByFeatures( int layerindex ) : int
    Query map layers, result sets contain features that intersect or are
    contained within the features in the result set of the MS_LAYER_POLYGON
    type layer at *layerindex*.  Returns MS_SUCCESS or MS_FAILURE.

queryByPoint( pointObj_ point, int mode, float buffer ) : int
    Query map layers, result sets contain one or more features, depending
    on *mode*, that intersect *point* within a tolerance *buffer*.
    Returns MS_SUCCESS or MS_FAILURE.

queryByRect( rectObj_ rect ) : int
    Query map layers, result sets contain features that intersect or are
    contained within *rect*.  Returns MS_SUCCESS or MS_FAILURE.
   
queryByShape( shapeObj_ shape ) : int
    Query map layers, result sets contain features that intersect or are
    contained within *shape*.  Returns MS_SUCCESS or MS_FAILURE.

removeLayer( int index ) : int
    Remove the layer at *index*.
    
removeMetaData( string key ) : int
    Delete the web.metadata hash at *key*.  Returns MS_SUCCESS or
    MS_FAILURE.

removeOutputFormat( string name ) : int
    Removes the format named *name* from the map's output format list.
    Returns MS_SUCCESS or MS_FAILURE.

save( string filename ) : int
    Save map to disk as a new map file.  Returns MS_SUCCESS
    or MS_FAILURE.

saveMapContext( string filename ) : int
    Save map definition to disk as OGC-compliant XML.  Returns MS_SUCCESS
    or MS_FAILURE.
    
saveQuery( string filename ) : int
    Save query to disk.  Returns MS_SUCCESS or MS_FAILURE.
    
saveQueryAsGML( string filename ) : int
    Save query to disk.  Returns MS_SUCCESS or MS_FAILURE.
   
selectOutputFormat( string imagetype ) : void
    Set the map's active output format to the internal format named
    *imagetype*.  Built-in formats are "PNG", "PNG24", "JPEG", "GIF",
    "GTIFF".

setConfigOption( string key, string value ) : void
    Set the indicated key configuration option to the indicated value.  
    Equivalent to including a CONFIG keyword in a map file. 

setExtent( float minx, float miny, float miny, float maxy ) : int
    Set the map extent, returns MS_SUCCESS or MS_FAILURE.
    
setFontSet( string filename ) : int
    Load fonts defined in *filename* into map fontset.  The existing
    fontset is cleared.  Returns MS_SUCCESS or MS_FAILURE.
    
setImageType( string name ) : void
    Sets map outputformat to the named format.
  
.. note:: setImageType() remains in the module but it's use is
          deprecated in favor of selectOutputFormat().

setLayersDrawingOrder( int layerindexes[]) : int
    Set map layer drawing order.

.. note::
   Unless the proper typemap is implemented for the module's language
   users will not be able to pass arrays or lists to this method and
   it will be unusable.

setMetaData( string key, string value ) : int
    Assign *value* to the web.metadata hash at *key*.  Return MS_SUCCESS
    or MS_FAILURE.

setOutputFormat( outputFormatObj_ format ) : void
    Sets map outputformat.
    
setProjection( string proj4 ) : int
    Set map projection from PROJ.4 definition string *proj4*.

setRotation( float rotation_angle ) : int
    Set map rotation angle. The map view rectangle (specified in 
    EXTENTS) will be rotated by the indicated angle in the counter-
    clockwise direction. Note that this implies the rendered map 
    will be rotated by the angle in the clockwise direction.
    Returns MS_SUCCESS or MS_FAILURE.

setSize( int width, int height ) : int
    Set map's image width and height together and carry out the necessary
    subsequent geotransform computation.  Returns MS_SUCCESS or MS_FAILURE.
   
setSymbolSet( string filename ) : int
    Load symbols defined in *filename* into map symbolset.  The existing
    symbolset is cleared.  Returns MS_SUCCESS or MS_FAILURE.
    
setWKTProjection( string wkt ) : int
    Sets map projection from OGC definition *wkt*.
   
zoomPoint( int zoomfactor, pointObj_ imgpoint, int width, int height, rectObj_ extent, rectObj_ maxextent ) : int
    Zoom by *zoomfactor* to *imgpoint* in pixel units within the image of
    *height* and *width* dimensions and georeferenced *extent*.  Zooming
    can be constrained to a maximum *maxextent*.  Returns MS_SUCCESS or
    MS_FAILURE.

zoomRectangle( rectObj_ imgrect, int width, int height, rectObj_ extent, rectObj_ maxextent ) : int
    Zoom to a pixel coordinate rectangle in the image of *width* and *height*
    dimensions and georeferencing *extent*.  Zooming can be constrained to a
    maximum *maxextent*.  Returns MS_SUCCESS or MS_FAILURE.

zoomScale( float scale, pointObj_ imgpoint, int width, int height, rectObj_ extent, rectObj_ maxextent) : int
    Like the previous methods, but zooms to the point at a specified scale.


-----------------------------------------------------------------------------
 markerCacheMemberObj
-----------------------------------------------------------------------------

An individual marker.  The markerCacheMemberObj class is associated
with labelCacheObj.

::

    +------------------+ 0..*     1 +------------+
    | MarkerCacheMember | <--------- | LabelCache |
    +------------------+            +------------+
    

markerCacheMemberObj Attributes
--------------------------------

id : int immutable
    Id of the marker.

poly : shapeObj_ immutable
    Marker bounding box.

markerCacheMemberObj Methods
-----------------------------

None.


-----------------------------------------------------------------------------
 outputFormatObj
-----------------------------------------------------------------------------

An outputFormatObj is associated with a mapObj_ 

::

     +--------------+ 1..*     1 +-----+
     | OutputFormat | <--------- | Map |
     +--------------+            +-----+ 

and can also be an attribute of an imageObj_.

outputFormatObj Attributes
--------------------------

bands : int
    The number of bands in the raster.  Only used for the "raw" modes, 
    MS_IMAGEMODE_BYTE, MS_IMAGEMODE_INT16, and MS_IMAGEMODE_FLOAT32.  Normally
    set via the BAND_COUNT formatoption ... this field should be considered
    read-only.

driver : string
    A string such as 'GD/PNG' or 'GDAL/GTiff'.

extension : string
    Format file extension such as 'png'.

imagemode : int
    MS_IMAGEMODE_PC256, MS_IMAGEMODE_RGB, MS_IMAGEMODE_RGBA, 
    MS_IMAGEMODE_INT16, MS_IMAGEMODE_FLOAT32, MS_IMAGEMODE_BYTE, or 
    MS_IMAGEMODE_NULL.
    
mimetype : string
    Format mimetype such as 'image/png'.
    
name : string
    A unique identifier.

renderer : int
    MS_RENDER_WITH_GD, MS_RENDER_WITH_SWF, MS_RENDER_WITH_RAWDATA, 
    MS_RENDER_WITH_PDF, or MS_RENDER_WITH_IMAGEMAP.  Normally set internally
    based on the driver and some other setting in the constructor. 
   
transparent : int
    MS_ON or MS_OFF.

outputFormatObj Methods
-----------------------

new outputFormatObj( string driver [, string name=driver ] ) : outputFormatObj_
    Create new instance.  If *name* is not provided, the value of *driver*
    is used as a name.
    
getOption( string key [, string value="" ] ) : string
    Return the format option at *key* or *value* if *key* is not a valid
    hash index.

setExtension( string extension ) : void
    Set file extension for output format such as 'png' or 'jpg'.  Method 
    could probably be deprecated since the extension attribute is mutable.

setMimetype( string mimetype ) : void
    Set mimetype for output format such as 'image/png' or 'image/jpeg'.
    Method could probably be deprecated since the mimetype attribute is
    mutable.
    
setOption( string key, string value ) : void
    Set the format option at *key* to *value*.  Format options are mostly 
    driver specific.  

validate() : int
    Checks some internal consistency issues, and returns MS_TRUE if things
    are OK and MS_FALSE if there are problems.  Some problems are fixed up
    internally.  May produce debug output if issues encountered.  
    

-----------------------------------------------------------------------------
 OWSRequest
-----------------------------------------------------------------------------

Not associated with other mapscript classes.  Serves as a message
intermediary between an application and MapServer's OWS capabilities.
Using it permits creation of lightweight WMS services:

::

    wms_map = mapscript.mapObj('wms.map')
    wms_request = mapscript.OWSRequest()

    # Convert application request parameters (req.args)
    for param, value in req.args.items():
        wms_request.setParam(param, value)
    
    # Map loads parameters from OWSRequest, adjusting its SRS, extents,
    # active layers accordingly
    wms_map.loadWMSRequest('1.1.0', wms_request)

    # Render the Map
    img = wms_map.draw()


OWSRequest Attributes
---------------------

NumParams : int immutable
    Number of request parameters.  Eventually should be changed to numparams
    lowercase like other attributes.

postrequest : string
    **TODO**
    
type : int
    MS_GET_REQUEST or MS_POST_REQUEST.

    
OWSRequest Methods
------------------

new OWSRequest( ) : OWSRequest
    Create a new instance.

setParameter( string name, string value ) : void
    Set a request parameter.  For example

::
    
    request.setParameter('REQUEST', 'GetMap')
    request.setParameter('BBOX', '-107.0,40.0,-106.0,41.0')

.. note:: MapServer's OWSRequest supports only single valued parameters.

getName( int index ) : string
    Return the name of the parameter at *index* in the request's array
    of parameter names.

getValue( int index ) : string
    Return the value of the parameter at *index* in the request's array
    of parameter values.

getValueByName( string name) : string
    Return the value associated with the parameter *name*.

loadParams() : int
    Initializes the OWSRequest object from the cgi environment variables
    REQUEST_METHOD, QUERY_STRING and HTTP_COOKIE.  Returns the number of 
    name/value pairs collected.  Warning: most errors will result in a 
    process exit!


-----------------------------------------------------------------------------
 pointObj
-----------------------------------------------------------------------------

A pointObj instance may be associated with a lineObj_.

::

    +-------+ 1..*  0..1 +------+
    | Point | <--------- | Line |
    +-------+            +------+

pointObj Attributes
-------------------

m : float
    Measure.  Meaningful only for measured shapefiles.  Given value
    -2e38 if not otherwise assigned to indicate "nodata".

x : float
    Easting
    
y : float
    Northing

z : float
    Elevation
    
pointObj Methods
----------------

new pointObj( [ float x=0.0, float y=0.0, float z=0.0, float m=-2e38 ] ) : pointObj
    Create new instance.  Easting, northing, and measure arguments are
    optional.

distanceToPoint( pointObj point ) : float
    Returns the distance to *point*.
   
distanceToSegment( pointObj point1, pointObj point2 ) : float
    Returns the minimum distance to a hypothetical line segment connecting 
    *point1* and *point2*.
   
distanceToShape( shapeObj_ shape ) : float
    Returns the minimum distance to *shape*.

draw( mapObj_ map, layerObj_ layer, imageObj_ image, int classindex, string text ) : int
    Draw the point using the styles defined by the *classindex* class of
    *layer* and labeled with string *text*.  Returns MS_SUCCESS or MS_FAILURE.

project( projectionObj_ proj_in, projectionObj_ proj_out ) : int
    Reproject point from *proj_in* to *proj_out*.  Transformation
    is done in place.  Returns MS_SUCCESS or MS_FAILURE.

setXY( float x, float y [, float m=2e-38 ] ) : int
    Set spatial coordinate and, optionally, measure values simultaneously.
    The measure will be set only if the value of *m* is greater than the
    ESRI measure no-data value of 1e-38.  Returns MS_SUCCESS or MS_FAILURE.

setXYZ( float x, float y, float z [, float m=-2e38 ] ) : int
    Set spatial coordinate and, optionally, measure values simultaneously.
    The measure will be set only if the value of *m* is greater than the
    ESRI measure no-data value of -1e38.  Returns MS_SUCCESS or MS_FAILURE.

setXYZM( float x, float y, float z, float m ) : int
    Set spatial coordinate and, optionally, measure values simultaneously.
    The measure will be set only if the value of *m* is greater than the
    ESRI measure no-data value of -1e38.  Returns MS_SUCCESS or MS_FAILURE.

toString() : string
    Return a string formatted like
    ::

        { 'x': %f , 'y': %f, 'z': %f }

    
    with the coordinate values substituted appropriately.  Python users can
    get the same effect via the pointObj __str__ method
    ::

        >>> p = mapscript.pointObj(1, 1)
        >>> str(p)
        { 'x': 1.000000 , 'y': 1.000000, 'z': 1.000000 }

toShape() : shapeObj_
    Convience method to quickly turn a point into a shapeObj.

------------------------------------------------------------------------------
 projectionObj
------------------------------------------------------------------------------

This class is not really fully implemented yet.  MapServer's Maps and Layers
have Projection attributes, and these are C projectionObj structures, but are
not directly exposed by the mapscript module.  Currently we have to do 
some round-a-bout logic like this
::

    point.project(projectionObj(mapobj.getProjection(), 
                  projectionObj(layer.getProjection())

to project a point from map to layer reference system.

projectionObj Attributes
------------------------

numargs : int immutable
    Number of PROJ.4 arguments.  

projectionObj Methods
---------------------

new projectionObj( string proj4 ) : projectionObj
    Create new instance of projectionObj.  Input parameter *proj4* is a 
    PROJ.4 definition string such as "init=EPSG:4269".

------------------------------------------------------------------------------
 rectObj
------------------------------------------------------------------------------

A rectObj may be a lone object or an attribute of another object and has no
other associations.
   
rectObj Attributes
------------------

maxx : float
    Maximum easting
    
maxy : float
    Maximum northing

minx : float
    Minimum easting
    
miny : float
    Minimum northing
    
rectObj Methods
---------------

new rectObj( [ float minx=-1.0, float miny=-1.0, float maxx=-1.0, float maxy=-1.0, int imageunits=MS_FALSE ] ) : rectObj
    Create new instance.  The four easting and northing arguments
    are optional and default to -1.0.  Note the new optional fifth argument
    which allows creation of rectangles in image (pixel/line) units which
    are also tested for validity.

draw( mapObj_ map, layerObj_ layer, imageObj_ img, int classindex, string text ) : int
    Draw rectangle into *img* using style defined by the *classindex* class
    of *layer*.  The rectangle is labeled with the string *text*.  Returns 
    MS_SUCCESS or MS_FAILURE.

getCenter() : pointObj_
    Return the center point of the rectagle.

project( projectionObj_ proj_in, projectionObj_ proj_out ) : int
    Reproject rectangle from *proj_in* to *proj_out*.  Transformation
    is done in place.  Returns MS_SUCCESS or MS_FAILURE.
    
toPolygon() : shapeObj_
    Convert to a polygon of five vertices.

toString() : string
    Return a string formatted like
    ::

        { 'minx': %f , 'miny': %f , 'maxx': %f , 'maxy': %f }

    
    with the bounding values substituted appropriately.  Python users can
    get the same effect via the rectObj __str__ method
    ::

        >>> r = mapscript.rectObj(0, 0, 1, 1)
        >>> str(r)
        { 'minx': 0 , 'miny': 0 , 'maxx': 1 , 'maxy': 1 }


-----------------------------------------------------------------------------
 referenceMapObj
-----------------------------------------------------------------------------

A referenceMapObj is associated with mapObj_.

::

     +--------------+ 0..1     1 +-----+
     | ReferenceMap | <--------> | Map |
     +--------------+            +-----+

referenceMapObj Attributes
--------------------------

color : colorObj_
    Color of reference box.
    
extent : rectObj_
    Spatial extent of reference in units of parent map.

height : int
    Height of reference map in pixels.

image : string
    Filename of reference map image.

map : mapObj_ immutable
    Reference to parent mapObj.
    
marker : int
    Index of a symbol in the map symbol set to use for marker.

markername : string
    Name of a symbol.

markersize : int
    Size of marker.

maxboxsize : int
    Pixels.

minboxsize : int
    Pixels.
    
outlinecolor : colorObj_
    Outline color of reference box.

status : int
    MS_ON or MS_OFF.
    
width : int
    In pixels.

referenceMapObj Methods
-----------------------

None


-----------------------------------------------------------------------------
 resultCacheMemberObj
-----------------------------------------------------------------------------

Has no associations with other Mapscript classes and has no methods.
By using several indexes, a resultCacheMemberObj refers to a single layer
feature.

resultCacheMemberObj Attributes
-------------------------------

classindex : int immutable
    The index of the layer class into which the feature has been classified.

shapeindex : int immutable
    Index of the feature within the layer.

tileindex : int immutable
    Meaningful for tiled layers only, index of the shapefile data tile.
    

-----------------------------------------------------------------------------
 resultCacheObj
-----------------------------------------------------------------------------

See querying-HOWTO.txt for extra guidance in using the new 4.4 query API.

resultCacheObj Attributes
-------------------------

bounds : rectObj_ immutable
    Bounding box of query results.

numresults : int immutable
    Length of result set.


resultCacheObj Methods
----------------------

getResult( int i ) : resultCacheObj_
    Returns the result at index *i*, like layerObj::getResult, or NULL if
    index is outside the range of results.

-----------------------------------------------------------------------------
 scalebarObj
-----------------------------------------------------------------------------

A scalebarObj is associated with mapObj_.

::

     +----------+ 0..1     1 +-----+
     | Scalebar | <--------- | Map |
     +----------+            +-----+
     
and also with labelObj_

::

     +----------+ 1        1 +-------+
     | Scalebar | ---------> | Label |
     +----------+            +-------+

scalebarObj Attributes
----------------------

backgroundcolor : colorObj_
    Scalebar background color.
    
color : colorObj_
    Scalebar foreground color.
    
imagecolor : colorObj_
    Background color of scalebar.

height : int
    Pixels.

intervals : int
    Number of intervals.

label : labelObj_
    Scalebar label.
    
outlinecolor : colorObj_
    Foreground outline color.
   
position : int
    MS_UL, MS_UC, MS_UR, MS_LL, MS_LC, or MS_LR.

postlabelcache : int
    MS_TRUE or MS_FALSE.

status : int
    MS_ON, MS_OFF, or MS_EMBED.
    
style : int
    0 or 1.

units : int
    See MS_UNITS in mapserver.h.
    
width : int
    Pixels.

scalebarObj Methods
-------------------

None


-----------------------------------------------------------------------------
 shapefileObj
-----------------------------------------------------------------------------

shapefileObj Attributes
-----------------------

bounds : rectObj_
    Extent of shapes
    
numshapes : int
    Number of shapes

type : int
    See mapshape.h for values of type.

shapefileObj Methods
--------------------

new shapefileObj( string filename [, int type=-1 ] ) : shapefileObj
    Create a new instance.  Omit the *type* argument or use a value of -1
    to open an existing shapefile.

add( shapeObj_ shape ) : int
    Add shape to the shapefile.  Returns MS_SUCCESS or MS_FAILURE.
    
get( int i, shapeObj_ shape ) : int
    Get the shapefile feature from index *i* and store it in *shape*.
    Returns MS_SUCCESS or MS_FAILURE.

getShape( int i ) : shapeObj_
    Returns the shapefile feature at index i.  More effecient than *get*.

*TODO*


-----------------------------------------------------------------------------
 shapeObj
-----------------------------------------------------------------------------

Each feature of a layer's data is a shapeObj.  Each part of the shape is a
closed lineObj_.

::

    +-------+ 1    1..* +------+
    | Shape | --------> | Line |
    +-------+           +------+

shapeObj Attributes
-------------------

bounds : rectObj_
    Bounding box of shape.
      
classindex : int
    The class index for features of a classified layer.
   
index : int
    Feature index within the layer.

numlines : int immutable
    Number of parts.

numvalues : int immutable
    Number of shape attributes.

text : string
    Shape annotation.

tileindex : int
    Index of tiled file for tileindexed layers.

type : int
    MS_SHAPE_POINT, MS_SHAPE_LINE, MS_SHAPE_POLYGON, or MS_SHAPE_NULL.
 
shapeObj Methods
----------------

new shapeObj( int type ) : shapeObj
    Return a new shapeObj of the specified *type*.  See the type attribute
    above. No attribute values created by default. initValues should be
    explicitly called to create the required number of values.

add( lineObj_ line ) : int
    Add *line* (i.e. a part) to the shape.  Returns MS_SUCCESS or MS_FAILURE.

boundary() : shapeObj
    Returns the boundary of the existing shape. Requires GEOS support.
    Returns NULL/undef on failure.

buffer( int distance ) : shapeObj
    Returns a new buffered shapeObj based on the supplied distance (given in
    the coordinates of the existing shapeObj). Requires GEOS support. 
    Returns NULL/undef on failure.

contains( pointObj_ point ) : int
    Returns MS_TRUE if the point is inside the shape, MS_FALSE otherwise.

contains( shapeObj shape2 ) : int
    Returns MS_TRUE if shape2 is entirely within the shape. Returns -1 on 
    error and MS_FALSE otherwise. Requires GEOS support.

convexHull() : shapeObj
    Returns the convex hull of the existing shape. Requires GEOS support. 
    Returns NULL/undef on failure.

copy( shapeObj shape_copy ) : int
    Copy the shape to *shape_copy*.  Returns MS_SUCCESS or MS_FAILURE.

clone() : shapeObj
    Return an independent copy of the shape.

crosses( shapeObj shape2 ) : int
    Returns MS_TRUE if shape2 crosses the shape. Returns -1 on error and 
    MS_FALSE otherwise. Requires GEOS support.

difference( shapeObj shape ) : shapeObj
    Returns the computed difference of the supplied and existing
    shape. Requires GEOS support. Returns NULL/undef on failure.

disjoint( shapeObj shape2 ) : int
    Returns MS_TRUE if shape2 and the shape are disjoint. Returns -1 on 
    error and MS_FALSE otherwise. Requires GEOS support.

distanceToPoint( pointObj_ point ) : float
    Return distance to *point*.
    
distanceToShape( shapeObj shape ) : float
    Return the minimum distance to *shape*.

draw( mapObj_ map, layerObj_ layer, imageObj_ img ) : int
    Draws the individual shape using layer.  Returns MS_SUCCESS or MS_FAILURE.

equals( shapeObj shape2 ) : int
    Returns MS_TRUE if the shape and shape2 are equal (geometry only). Returns -1
    on error and MS_FALSE otherwise. Requires GEOS support.

fromWKT( char \*wkt ) : shapeObj
    Returns a new shapeObj based on a well-known text representation of a 
    geometry. Requires GEOS support. Returns NULL/undef on failure.

get( int index ) : lineObj_
    Returns a reference to part at *index*.  Reference is valid
    only during the life of the shapeObj.

getArea() : double
    Returns the area of the shape (if applicable). Requires GEOS support.

getCentroid() : pointObj_
    Returns the centroid for the existing shape. Requires GEOS support. 
    Returns NULL/undef on failure.

getLength() : double
    Returns the length (or perimeter) of a shape. Requires GEOS support.

getValue( int i ) : string
    Return the shape attribute at index *i*.
    
initValues( int numvalues ) : void
    Allocates memory for the requested number of values.

intersects( shapeObj shape ) : int
    Returns MS_TRUE if the two shapes intersect, MS_FALSE otherwise.
    Note, does not require GEOS support but will use GEOS functions if
    available.

intersection( shapeObj shape ) : shapeObj
    Returns the computed intersection of the supplied and existing
    shape. Requires GEOS support. Returns NULL/undef on failure.

overlaps( shapeObj shape2 ) : int
    Returns MS_TRUE if shape2 overlaps shape. Returns -1 on error and 
    MS_FALSE otherwise. Requires GEOS support.

project( projectionObj_ proj_in, projectionObj_ proj_out ) : int
    Reproject shape from *proj_in* to *proj_out*.  Transformation
    is done in place.  Returns MS_SUCCESS or MS_FAILURE.

setBounds : void    
    Must be called to calculate new bounding box after new parts have been
    added.

    **TODO**: should return int and set msSetError.

setValue( int i, string value ) : int
    Set the shape value at index *i* to *value*.

symDifference( shapeObj shape ) : shapeObj
    Returns the computed symmetric difference of the supplied and existing
    shape. Requires GEOS support. Returns NULL/undef on failure.

touches( shapeObj shape2 ) : int
    Returns MS_TRUE if the shape and shape2 touch. Returns -1 on error and
    MS_FALSE otherwise. Requires GEOS support.

toWKT() : string
    Returns the well-known text representation of a shapeObj. Requires 
    GEOS support. Returns NULL/undef on failure.

Union( shapeObj shape ) : shapeObj
    Returns the union of the existing and supplied shape. Shapes must be
    of the same type. Requires GEOS support. Returns NULL/undef on failure.

within( shapeObj shape2 ) : int
    Returns MS_TRUE if the shape is entirely within shape2. Returns -1
    on error and MS_FALSE otherwise. Requires GEOS support.

-----------------------------------------------------------------------------
 styleObj
-----------------------------------------------------------------------------

An instance of styleObj is associated with one instance of classObj.

::

    +-------+ 0..*    1 +-------+
    | Style | <-------- | Class |
    +-------+           +-------+

An instance of styleObj can exist outside of a classObj container and
be explicitly inserted into the classObj for use in mapping.

::

    new_style = new styleObj()
    the_class.insertStyle(new_style)
    
It is important to understand that insertStyle inserts a **copy** of the
styleObj instance, not a reference to the instance itself.

The older use case 

::

    new_style = new styleObj(the_class)

remains supported.  These will be the only ways to access the styles of
a class.  Programmers should no longer directly access the styles attribute.

styleObj Attributes
-------------------

angle : double
    Angle, given in degrees, to draw the line work. Default is 0.
    For symbols of Type HATCH, this is the angle of the hatched lines.

angleitem : string
    Attribute/field that stores the angle to be used in rendering.
    Angle is given in degrees with 0 meaning no rotation.

antialias : int
    MS_TRUE or MS_FALSE. Should TrueType fonts and Cartoline symbols be antialiased.  

backgroundcolor : colorObj_
    Background pen color.

color : colorObj_
    Foreground or fill pen color.

mincolor : colorObj_
    Attribute for Color Range Mapping (RFC-6). mincolor, minvalue, maxcolor,
    maxvalue define the range for mapping a continuous feature value to a continuous
    range of colors when rendering the feature on the map.

minsize : int
    Minimum pen or symbol width for scaling styles.

minvalue : double
    Attribute for Color Range Mapping (RFC-6). mincolor, minvalue, maxcolor,
    maxvalue define the range for mapping a continuous feature value to a continuous
    range of colors when rendering the feature on the map.

minwidth : int
    Minimum width of the symbol.    

maxcolor : colorObj_
    Attribute for Color Range Mapping (RFC-6). mincolor, minvalue, maxcolor,
    maxvalue define the range for mapping a continuous feature value to a continuous
    range of colors when rendering the feature on the map.

maxsize : int
    Maximum pen or symbol width for scaling.
    
maxvalue : double
    Attribute for Color Range Mapping (RFC-6). mincolor, minvalue, maxcolor,
    maxvalue define the range for mapping a continuous feature value to a continuous
    range of colors when rendering the feature on the map.
    
maxwidth : int
    Maximum width of the symbol.
    
offsetx : int
    Draw with pen or symbol offset from map data.
    
offsety : int
    Draw with pen or symbol offset from map data.
    
outlinecolor : colorObj_
    Outline pen color.

rangeitem : string
    Attribute/field that stores the values for the Color Range Mapping (RFC-6).

size : int
    Pixel width of the style's pen or symbol.

sizeitem : string
    Attribute/field that stores the size to be used in rendering. Value is given in pixels.    

symbol : int
    The index within the map symbolset of the style's symbol.
    
symbolname : string immutable
    Name of the style's symbol.
    
width : int
    Width refers to the thickness of line work drawn, in pixels. Default is 1.
    For symbols of Type HATCH, the with is how thick the hatched lines are.

styleObj Methods
-----------------

new styleObj( [ classObj_ parent_class ] ) : styleObj
    Returns new default style Obj instance.  The *parent_class* is
    optional.

clone : styleObj
    Returns an independent copy of the style with no parent class.

setSymbolByName(mapObj_ map, string symbolname) : int
    Setting the symbol of the styleObj given the reference of the
    map object and the symbol name. 

-----------------------------------------------------------------------------
 symbolObj
-----------------------------------------------------------------------------

A symbolObj is associated with one symbolSetObj_.

::

    +--------+ 0..*    1 +-----------+
    | Symbol | <-------- | SymbolSet |
    +--------+           +-----------+

A styleObj_ will often refer to a symbolObj by name or index, but this is
not really an object association, is it?

symbolObj Attributes
--------------------

antialias : int
    MS_TRUE or MS_FALSE.

character : string
    For TrueType symbols.

filled : int
    MS_TRUE or MS_FALSE.

font : string
    For TrueType symbols.

gap : int
    **TODO** what is this?
    
imagepath : string
    Path to pixmap file.

linecap : int
    **TODO** unsure about the cartoline attributes.
    
linejoin : int
    **TODO**
    
linejoinmaxsize : float
    **TODO**

name : string
    Symbol name

numpoints : int immutable
    Number of points of a vector symbol.
  
position : int
    **TODO** ?
    
sizex : float
    **TODO** what is this?

sizey : float
    **TODO** what is this?

stylelength : int
    Number of intervals

transparent : int
    **TODO** what is this?
    
transparentcolor : int
    **TODO** is this a derelict attribute?
    
type : int
    MS_SYMBOL_SIMPLE, MS_SYMBOL_VECTOR, MS_SYMBOL_ELLIPSE, MS_SYMBOL_PIXMAP,
    MS_SYMBOL_TRUETYPE, or MS_SYMBOL_CARTOLINE.
    
symbolObj Methods
-----------------

new symbolObj( string symbolname [, string imagefile ] ) : symbolObj
    Create new default symbol named *name*.  If *imagefile* is specified,
    then the symbol will be of type MS_SYMBOL_PIXMAP.

getImage() : imageObj_
    Returns a pixmap symbol's imagery as an imageObj.
    
getPoints() : lineObj_
    Returns the symbol points as a lineObj.

setImage( imageObj_ image ) : int
    Set a pixmap symbol's imagery from *image*.
    
setPoints( lineObj_ line ) : int
    Sets the symbol points from the points of *line*.  Returns the updated
    number of points.

setStyle( int index, int value ) : int
    Set the style at *index* to *value*.  Returns MS_SUCCESS or MS_FAILURE.


-----------------------------------------------------------------------------
 symbolSetObj
-----------------------------------------------------------------------------

A symbolSetObj is an attribute of a mapObj_ and is associated with instances
of symbolObj_.

::

    +-----------+ 1    0..* +--------+
    | SymbolSet | --------> | Symbol |
    +-----------+           +--------+

symbolSetObj Attributes
-----------------------

filename : string
    Symbolset filename
    
numsymbols : int immutable
    Number of symbols in the set.

symbolSetObj Methods
--------------------

new symbolSetObj( [ string symbolfile ] ) : symbolSetObj
    Create new instance.  If *symbolfile* is specified, symbols will be 
    loaded from the file.

appendSymbol( symbolObj_ symbol ) : int
    Add a copy of *symbol* to the symbolset and return its index.

getSymbol( int index ) : symbolObj_
    Returns a reference to the symbol at *index*.

getSymbolByName( string name ) : symbolObj_
    Returns a reference to the symbol named *name*.

index( string name ) : int
    Return the index of the symbol named *name* or -1 in the case that
    no such symbol is found.

removeSymbol( int index ) : symbolObj_
    Remove the symbol at *index* and return a copy of the symbol.

save( string filename ) : int
    Save symbol set to a file.  Returns MS_SUCCESS or MS_FAILURE.

------------------------------------------------------------------------------
 webObj
------------------------------------------------------------------------------

Has no other existence than as an attribute of a mapObj.  Serves as a 
container for various run-time web application definitions like temporary
file paths, template paths, etc.

webObj Attributes
-----------------

empty : string
    **TODO**

error : string
    **TODO**

extent : rectObj_
    Clipping extent.
    
footer : string
    Path to footer document.

header : string
    Path to header document.
    
imagepath : string
    Filesystem path to temporary image location.

imageurl : string
    URL to temporary image location.
    
log : string
    **TODO**

map : mapObj immutable
    Reference to parent mapObj.

maxscale : float
    Maximum map scale.

maxtemplate : string
    **TODO**
   
metadata : hashTableObj_ immutable
    metadata hash table.

minscale : float
    Minimum map scale.

mintemplate : string
    **TODO**

queryformat : string
    **TODO**
    
template : string
    Path to template document.


webObj Methods
--------------

None.