File: ogrsf_frmts.dox

package info (click to toggle)
gdal 1.10.1+dfsg-8
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 84,320 kB
  • ctags: 74,726
  • sloc: cpp: 677,199; ansic: 162,820; python: 13,816; cs: 11,163; sh: 10,446; java: 5,279; perl: 4,429; php: 2,971; xml: 1,500; yacc: 934; makefile: 494; sql: 112
file content (2898 lines) | stat: -rw-r--r-- 98,591 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
/******************************************************************************
 * $Id: ogrsf_frmts.dox 25840 2013-04-02 19:10:04Z winkey $
 *
 * Project:  OpenGIS Simple Features Reference Implementation
 * Purpose:  Documentation for ogrsf_frmts.h classes.
 * Author:   Frank Warmerdam, warmerda@home.com
 *
 ******************************************************************************
 * Copyright (c) 1999,  Les Technologies SoftMap Inc.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included
 * in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 ******************************************************************************/

/************************************************************************/
/*                         OGRSFDriverRegistrar                         */
/************************************************************************/

/**
 
  \fn OGRDataSource *OGRSFDriverRegistrar::Open( const char *pszName, int bUpdate = FALSE, OGRSFDriver **ppoDriver=NULL);

  \brief Open a file / data source with one of the registered drivers.

  This method loops through all the drivers registered with the driver
  manager trying each until one succeeds with the given data source.  This
  method is static.  Applications don't normally need to use any other
  OGRSFDriverRegistrar methods directly, nor do they normally need to have
  a pointer to an OGRSFDriverRegistrar instance.

  If this method fails, CPLGetLastErrorMsg() can be used to check if there
  is an error message explaining why.

  For drivers supporting the VSI virtual file API, it is possible to open
  a file in a .zip archive (see VSIInstallZipFileHandler()), in a .tar/.tar.gz/.tgz archive
  (see VSIInstallTarFileHandler()) or on a HTTP / FTP server (see VSIInstallCurlFileHandler())
 
  This method is the same as the C function OGROpen().

  @param pszName the name of the file, or data source to open. UTF-8 encoded.
  @param bUpdate FALSE for read-only access (the default) or TRUE for 
         read-write access.
  @param ppoDriver if non-NULL, this argument will be updated with a 
         pointer to the driver which was used to open the data source.

  @return NULL on error or if the pass name is not supported by this driver,
  otherwise a pointer to an OGRDataSource.  This OGRDataSource should be
  closed by deleting the object when it is no longer needed.

  <b>Example:</b>

  <pre>
    OGRDataSource	*poDS;

    poDS = OGRSFDriverRegistrar::Open( "polygon.shp" );
    if( poDS == NULL )
    {
        return;
    }

    ... use the data source ...

    OGRDataSource::DestroyDataSource(poDS);
  </pre>

*/


/**
 
  \fn OGRDataSourceH OGROpen( const char *pszName, int bUpdate,
                        OGRSFDriverH *pahDriverList );

  \brief Open a file / data source with one of the registered drivers.

  This function loops through all the drivers registered with the driver
  manager trying each until one succeeds with the given data source.  This
  function is static.  Applications don't normally need to use any other
  OGRSFDriverRegistrar function, not do they normally need to have
  a pointer to an OGRSFDriverRegistrar instance.

  If this function fails, CPLGetLastErrorMsg() can be used to check if there
  is an error message explaining why.

  For drivers supporting the VSI virtual file API, it is possible to open
  a file in a .zip archive (see VSIInstallZipFileHandler()), in a .tar/.tar.gz/.tgz archive
  (see VSIInstallTarFileHandler()) or on a HTTP / FTP server (see VSIInstallCurlFileHandler())

  This function is the same as the C++ method OGRSFDriverRegistrar::Open().

  @param pszName the name of the file, or data source to open.
  @param bUpdate FALSE for read-only access (the default) or TRUE for 
         read-write access.
  @param pahDriverList if non-NULL, this argument will be updated with a 
         pointer to the driver which was used to open the data source.

  @return NULL on error or if the pass name is not supported by this driver,
  otherwise an handle to an OGRDataSource.  This OGRDataSource should be
  closed by deleting the object when it is no longer needed.

  <b>Example:</b>

  <pre>
    OGRDataSourceH	hDS;
    OGRSFDriverH        *pahDriver;

    hDS = OGROpen( "polygon.shp", 0, pahDriver );
    if( hDS == NULL )
    {
        return;
    }

    ... use the data source ...

    OGRReleaseDataSource( hDS );
  </pre>

*/

/**
  \fn OGRSFDriverRegistrar *OGRSFDriverRegistrar::GetRegistrar();

  \brief Return the driver manager, creating one if none exist. 

  @return the driver manager.

*/

/** 
  \fn void OGRSFDriverRegistrar::RegisterDriver( OGRSFDriver * poDriver );
  
  \brief Add a driver to the list of registered drivers.

  If the passed driver is already registered (based on pointer comparison) 
  then the driver isn't registered.  New drivers are added at the end of
  the list of registered drivers.

  This method is the same as the C function OGRRegisterDriver().

  @param poDriver the driver to add.

*/


/** 
  \fn void OGRRegisterDriver( OGRSFDriverH hDriver );
  
  \brief Add a driver to the list of registered drivers.

  If the passed driver is already registered (based on handle comparison) 
  then the driver isn't registered.  New drivers are added at the end of
  the list of registered drivers.

  This function is the same as the C++ method 
  OGRSFDriverRegistrar::RegisterDriver().

  @param hDriver handle to the driver to add.

*/


/** 
  \fn void OGRSFDriverRegistrar::DeregisterDriver( OGRSFDriver * poDriver );
  
  \brief Remove the passed driver from the list of registered drivers.

  This method is the same as the C function OGRDeregisterDriver().

  @param poDriver the driver to deregister.

  @since GDAL 1.8.0
*/


/** 
  \fn void OGRDeregisterDriver( OGRSFDriverH hDriver );
  
  \brief Remove the passed driver from the list of registered drivers.

  This function is the same as the C++ method 
  OGRSFDriverRegistrar::DeregisterDriver().

  @param hDriver handle to the driver to deregister.

  @since GDAL 1.8.0
*/

/**

  \fn int OGRSFDriverRegistrar::GetDriverCount();

  \brief Fetch the number of registered drivers.

  This method is the same as the C function OGRGetDriverCount().

  @return the drivers count.

*/

/**

  \fn int OGRGetDriverCount();

  \brief Fetch the number of registered drivers.

  This function is the same as the C++ method 
  OGRSFDriverRegistrar::GetDriverCount().

  @return the drivers count.

*/

/**
 
  \fn OGRSFDriver *OGRSFDriverRegistrar::GetDriver( int iDriver );

  \brief Fetch the indicated driver.

  This method is the same as the C function OGRGetDriver().

  @param iDriver the driver index, from 0 to GetDriverCount()-1.

  @return the driver, or NULL if iDriver is out of range.

*/

/**
 
  \fn OGRSFDriverH OGRGetDriver( int iDriver );

  \brief Fetch the indicated driver.

  This function is the same as the C++ method 
  OGRSFDriverRegistrar::GetDriver().

  @param iDriver the driver index, from 0 to GetDriverCount()-1.

  @return handle to the driver, or NULL if iDriver is out of range.

*/

/**
  \fn OGRSFDriver *OGRSFDriverRegistrar::GetDriverByName( const char * pszName );

  \brief Fetch the indicated driver.

  This method is the same as the C function OGRGetDriverByName

  @param pszName the driver name

  @return the driver, or NULL if no driver with that name is found
*/

/**
  \fn OGRSFDriverH OGRGetDriverByName( const char *pszName );

  \brief Fetch the indicated driver.

  This function is the same as the C++ method OGRSFDriverRegistrar::GetDriverByName()

  @param pszName the driver name

  @return the driver, or NULL if no driver with that name is found
*/

/**
  \fn int OGRSFDriverRegistrar::GetOpenDSCount();

  \brief Return the number of opened datasources.

  This method is the same as the C function OGRGetOpenDSCount()

  @return the number of opened datasources.
*/

/**
  \fn int OGRGetOpenDSCount();

  \brief Return the number of opened datasources.

  This function is the same as the C++ method OGRSFDriverRegistrar::GetOpenDSCount()

  @return the number of opened datasources.
*/

/**
  \fn OGRDataSource *OGRSFDriverRegistrar::GetOpenDS( int iDS )

  \brief Return the iDS th datasource opened.

  This method is the same as the C function OGRGetOpenDS().

  @param iDS the index of the dataset to return (between 0 and GetOpenDSCount() - 1)
*/

/**
  \fn OGRDataSourceH OGRGetOpenDS( int iDS )

  \brief Return the iDS th datasource opened.

  This function is the same as the C++ method OGRSFDriverRegistrar::GetOpenDS.

  @param iDS the index of the dataset to return (between 0 and GetOpenDSCount() - 1)
*/

/**

  \fn int OGRRegisterAll();

  \brief Register all drivers.

*/

/************************************************************************/
/*                             OGRSFDriver                              */
/************************************************************************/


/** 

  \fn const char *OGRSFDriver::GetName();

  \brief Fetch name of driver (file format).
  This name should be relatively short
  (10-40 characters), and should reflect the underlying file format.  For
  instance "ESRI Shapefile".

  This method is the same as the C function OGR_Dr_GetName().

  @return driver name.  This is an internal string and should not be modified
  or freed. 
*/


/** 

  \fn const char *OGR_Dr_GetName( OGRSFDriverH hDriver );

  \brief Fetch name of driver (file format).
  This name should be relatively short
  (10-40 characters), and should reflect the underlying file format.  For
  instance "ESRI Shapefile".

  This function is the same as the C++ method OGRSFDriver::GetName().

  @param hDriver handle to the the driver to get the name from.
  @return driver name.  This is an internal string and should not be modified
  or freed. 
*/

/**

  \fn OGRDataSource *OGRSFDriver::Open( const char *pszName, int bUpdate );

  \brief Attempt to open file with this driver. 

  This method is what OGRSFDriverRegistrar uses to implement its Open() 
  method.  See it for more details.

  Note, drivers do not normally set their own m_poDriver value, so a direct
  call to this method (instead of indirectly via OGRSFDriverRegistrar) will
  usually result in a datasource that does not know what driver it relates to
  if GetDriver() is called on the datasource.  The application may directly
  call SetDriver() after opening with this method to avoid this problem.

  For drivers supporting the VSI virtual file API, it is possible to open
  a file in a .zip archive (see VSIInstallZipFileHandler()), in a .tar/.tar.gz/.tgz archive
  (see VSIInstallTarFileHandler()) or on a HTTP / FTP server (see VSIInstallCurlFileHandler())

  This method is the same as the C function OGR_Dr_Open().

  @param pszName the name of the file, or data source to try and open.
  @param bUpdate TRUE if update access is required, otherwise FALSE (the
  default).

  @return NULL on error or if the pass name is not supported by this driver,
  otherwise a pointer to an OGRDataSource.  This OGRDataSource should be
  closed by deleting the object when it is no longer needed.

*/


/**

  \fn OGRDataSourceH OGR_Dr_Open( OGRSFDriverH hDriver, const char *pszName, 
                            int bUpdate );

  \brief Attempt to open file with this driver. 

  This function is the same as the C++ method OGRSFDriver::Open().

  @param hDriver handle to the driver that is used to open file.
  @param pszName the name of the file, or data source to try and open.
  @param bUpdate TRUE if update access is required, otherwise FALSE (the
  default).

  @return NULL on error or if the pass name is not supported by this driver,
  otherwise an handle to an OGRDataSource.  This OGRDataSource should be
  closed by deleting the object when it is no longer needed.

*/

/**
 \fn int OGRSFDriver::TestCapability( const char *pszCapability );

 \brief Test if capability is available.

 One of the following data source capability names can be passed into this
 method, and a TRUE or FALSE value will be returned indicating whether or not
 the capability is available for this object.

 <ul>
  <li> <b>ODrCCreateDataSource</b>: True if this driver can support creating data sources.<p>
  <li> <b>ODrCDeleteDataSource</b>: True if this driver supports deleting data sources.<p>
 </ul>

 The \#define macro forms of the capability names should be used in preference
 to the strings themselves to avoid mispelling.

 This method is the same as the C function OGR_Dr_TestCapability().

 @param pszCapability the capability to test.

 @return TRUE if capability available otherwise FALSE.
*/ 


/**
 \fn int OGR_Dr_TestCapability( OGRSFDriverH hDriver, const char *pszCap );

 \brief Test if capability is available.

 One of the following data source capability names can be passed into this
 function, and a TRUE or FALSE value will be returned indicating whether
 or not the capability is available for this object.

 <ul>
  <li> <b>ODrCCreateDataSource</b>: True if this driver can support creating data sources.<p>
  <li> <b>ODrCDeleteDataSource</b>: True if this driver supports deleting data sources.<p>
 </ul>

 The \#define macro forms of the capability names should be used in preference
 to the strings themselves to avoid mispelling.

 This function is the same as the C++ method OGRSFDriver::TestCapability().

 @param hDriver handle to the driver to test the capability against.
 @param pszCap the capability to test.

 @return TRUE if capability available otherwise FALSE.

*/ 

/**
 \fn OGRErr OGRSFDriver::DeleteDataSource( const char *pszDataSource );

 \brief Delete a datasource.

 Delete (from the disk, in the database, ...) the named datasource.
 Normally it would be safest if the datasource was not open at the time. 

 Whether this is a supported operation on this driver case be tested
 using TestCapability() on ODrCDeleteDataSource.

 This method is the same as the C function OGR_Dr_DeleteDataSource().

 @param pszDataSource the name of the datasource to delete. 

 @return OGRERR_NONE on success, and OGRERR_UNSUPPORTED_OPERATION if this
 is not supported by this driver. 
*/

/**
 \fn OGRErr OGR_Dr_DeleteDataSource( OGRSFDriverH hDriver, 
                                const char *pszDataSource )

 \brief Delete a datasource.

 Delete (from the disk, in the database, ...) the named datasource.
 Normally it would be safest if the datasource was not open at the time. 

 Whether this is a supported operation on this driver case be tested
 using TestCapability() on ODrCDeleteDataSource.

 This method is the same as the C++ method OGRSFDriver::DeleteDataSource().

 @param hDriver handle to the driver on which data source deletion is
based.

 @param pszDataSource the name of the datasource to delete. 

 @return OGRERR_NONE on success, and OGRERR_UNSUPPORTED_OPERATION if this
 is not supported by this driver. 

*/

/**
 \fn OGRDataSource *OGRSFDriver::CreateDataSource( const char *pszName, 
                                        char ** papszOptions );

 \brief This method attempts to create a new data source based on the passed driver.

 The papszOptions argument can be used to control driver specific
 creation options.  These options are normally documented in the format
 specific documentation. 

 It is important to call OGRDataSource::DestroyDataSource() when the datasource is no longer
 used to ensure that all data has been properly flushed to disk.

 This method is the same as the C function OGR_Dr_CreateDataSource().

 \note This method does <strong>NOT</strong> attach driver instance to the 
 returned  data source, so caller should expect that OGRDataSource::GetDriver()
 will return NULL pointer. In order to attach driver to the returned data 
 source, it is required to use C function OGR_Dr_CreateDataSource.
 This behavior is related to fix of issue reported in <a href="http://trac.osgeo.org/gdal/ticket/1223">Ticket #1233</a>. 

 @param pszName the name for the new data source. UTF-8 encoded.
 @param papszOptions a StringList of name=value options.  Options are driver
specific, and driver information can be found at the following url:  
http://www.gdal.org/ogr/ogr_formats.html 

 @return NULL is returned on failure, or a new OGRDataSource on 
success. 
*/

/** 

  \fn OGRDataSourceH OGR_Dr_CreateDataSource( OGRSFDriverH hDriver,
                                        const char *pszName, 
                                        char ** papszOptions )

 \brief This function attempts to create a new data source based on the passed driver.

 The papszOptions argument can be used to control driver specific
 creation options.  These options are normally documented in the format
 specific documentation. 

 It is important to call OGR_DS_Destroy() when the datasource is no longer
 used to ensure that all data has been properly flushed to disk.

 This function is the same as the C++ method OGRSFDriver::CreateDataSource().

 @param hDriver handle to the driver on which data source creation is
based.
 @param pszName the name for the new data source. UTF-8 encoded.
 @param papszOptions a StringList of name=value options.  Options are driver
specific, and driver information can be found at the following url:  
http://www.gdal.org/ogr/ogr_formats.html 

 @return NULL is returned on failure, or a new OGRDataSource handle on 
success. 
*/


/**

   \fn OGRDataSource *OGRSFDriver::CopyDataSource( OGRDataSource *poSrcDS, 
                                            const char *pszNewName,
                                            char **papszOptions )

   \brief This method creates a new datasource by copying all the layers from the source datasource.

   It is important to call OGRDataSource::DestroyDataSource() when the datasource is no longer
   used to ensure that all data has been properly flushed to disk.

   This method is the same as the C function OGR_Dr_CopyDataSource().

 @param poSrcDS source datasource
 @param pszNewName the name for the new data source. UTF-8 encoded.
 @param papszOptions a StringList of name=value options.  Options are driver
specific, and driver information can be found at the following url:  
http://www.gdal.org/ogr/ogr_formats.html 

 @return NULL is returned on failure, or a new OGRDataSource handle on 
success. 
*/

/**

   \fn OGRDataSourceH OGR_Dr_CopyDataSource( OGRSFDriverH hDriver, 
                                      OGRDataSourceH hSrcDS, 
                                      const char *pszNewName,
                                      char **papszOptions )

   \brief This function creates a new datasource by copying all the layers from the source datasource.

   It is important to call OGR_DS_Destroy() when the datasource is no longer
   used to ensure that all data has been properly flushed to disk.

   This function is the same as the C++ method OGRSFDriver::CopyDataSource().

 @param hDriver handle to the driver on which data source creation is
based.
 @param hSrcDS source datasource
 @param pszNewName the name for the new data source.
 @param papszOptions a StringList of name=value options.  Options are driver
specific, and driver information can be found at the following url:  
http://www.gdal.org/ogr/ogr_formats.html 

 @return NULL is returned on failure, or a new OGRDataSource handle on 
success. 
*/

/************************************************************************/
/*                            OGRDataSource                             */
/************************************************************************/

/**
  \fn void OGR_DS_Destroy( OGRDataSourceH hDataSource )

  \brief Closes opened datasource and releases allocated resources.

   This method is the same as the C++ method OGRDataSource::DestroyDataSource().

  @param hDataSource handle to allocated datasource object.
*/

/** 
 \fn const char *OGRDataSource::GetName();

 \brief Returns the name of the data source.

 This string should be sufficient to
 open the data source if passed to the same OGRSFDriver that this data
 source was opened with, but it need not be exactly the same string that
 was used to open the data source.  Normally this is a filename. 

 This method is the same as the C function OGR_DS_GetName().

 @return pointer to an internal name string which should not be modified
 or freed by the caller.

*/

/** 
 \fn const char *OGR_DS_GetName( OGRDataSourceH hDS );

 \brief Returns the name of the data source.

  This string should be sufficient to
 open the data source if passed to the same OGRSFDriver that this data
 source was opened with, but it need not be exactly the same string that
 was used to open the data source.  Normally this is a filename. 

 This function is the same as the C++ method OGRDataSource::GetName().

 @param hDS handle to the data source to get the name from.
 @return pointer to an internal name string which should not be modified
 or freed by the caller.

*/

/**
 \fn int OGRDataSource::GetLayerCount();

 \brief Get the number of layers in this data source.

 This method is the same as the C function OGR_DS_GetLayerCount().

 @return layer count.

*/


/**
 \fn int OGR_DS_GetLayerCount( OGRDataSourceH hDS );

 \brief Get the number of layers in this data source.

 This function is the same as the C++ method OGRDataSource::GetLayerCount().

 @param hDS handle to the data source from which to get the number of layers.
 @return layer count.

*/

/**
 \fn OGRLayer *OGRDataSource::GetLayer(int iLayer);

 \brief Fetch a layer by index.

 The returned layer remains owned by the 
 OGRDataSource and should not be deleted by the application.

 This method is the same as the C function OGR_DS_GetLayer().

 @param iLayer a layer number between 0 and GetLayerCount()-1.

 @return the layer, or NULL if iLayer is out of range or an error occurs.

*/


/**
 \fn OGRLayerH OGR_DS_GetLayer( OGRDataSourceH hDS, int iLayer );

 \brief Fetch a layer by index.

 The returned layer remains owned by the 
 OGRDataSource and should not be deleted by the application.

 This function is the same as the C++ method OGRDataSource::GetLayer().

 @param hDS handle to the data source from which to get the layer.
 @param iLayer a layer number between 0 and OGR_DS_GetLayerCount()-1.

 @return an handle to the layer, or NULL if iLayer is out of range
 or an error occurs.

*/

/**
 \fn OGRLayer *OGRDataSource::GetLayerByName(const char *pszLayerName);

 \brief Fetch a layer by name.

 The returned layer remains owned by the 
 OGRDataSource and should not be deleted by the application.

 This method is the same as the C function OGR_DS_GetLayerByName().

 @param pszLayerName the layer name of the layer to fetch.

 @return the layer, or NULL if Layer is not found or an error occurs.

*/


/**
 \fn OGRLayerH OGR_DS_GetLayerByName(OGRDataSourceH hDS, 
                                     const char *pszLayerName );

 \brief Fetch a layer by name.

 The returned layer remains owned by the 
 OGRDataSource and should not be deleted by the application.

 This function is the same as the C++ method OGRDataSource::GetLayerByName().

 @param hDS handle to the data source from which to get the layer.
 @param pszLayerName Layer the layer name of the layer to fetch.

 @return an handle to the layer, or NULL if the layer is not found
 or an error occurs.

*/

/**
 \fn OGRLayer *OGRDataSource::CopyLayer( OGRLayer *poSrcLayer, 
                                    const char *pszNewName, 
                                    char **papszOptions )

 \brief Duplicate an existing layer.

 This method creates a new layer, duplicate the field definitions of the
 source layer and then duplicate each features of the source layer.
 The papszOptions argument
 can be used to control driver specific creation options.  These options are
 normally documented in the format specific documentation.
 The source layer may come from another dataset.

 This method is the same as the C function OGR_DS_CopyLayer().

 @param poSrcLayer source layer.
 @param pszNewName the name of the layer to create.
 @param papszOptions a StringList of name=value options.  Options are driver
                     specific.

 @return an handle to the layer, or NULL if an error occurs.
*/

/**
 \fn OGRLayerH OGR_DS_CopyLayer( OGRDataSourceH hDS, 
                            OGRLayerH hSrcLayer, const char *pszNewName,
                            char **papszOptions )

 \brief Duplicate an existing layer.

 This function creates a new layer, duplicate the field definitions of the
 source layer and then duplicate each features of the source layer.
 The papszOptions argument
 can be used to control driver specific creation options.  These options are
 normally documented in the format specific documentation.
 The source layer may come from another dataset.

 This function is the same as the C++ method OGRDataSource::CopyLayer

 @param hDS handle to the data source where to create the new layer
 @param hSrcLayer handle to the source layer.
 @param pszNewName the name of the layer to create.
 @param papszOptions a StringList of name=value options.  Options are driver
                     specific.

 @return an handle to the layer, or NULL if an error occurs.
*/

/**
 \fn OGRErr OGRDataSource::DeleteLayer(int iLayer);

 \brief Delete the indicated layer from the datasource.

 If this method is supported
 the ODsCDeleteLayer capability will test TRUE on the OGRDataSource.

 This method is the same as the C function OGR_DS_DeleteLayer().

 @param iLayer the index of the layer to delete. 

 @return OGRERR_NONE on success, or OGRERR_UNSUPPORTED_OPERATION if deleting
 layers is not supported for this datasource.

*/

/**
 \fn OGRErr OGR_DS_DeleteLayer(OGRDataSourceH hDS, int iLayer);

 \brief Delete the indicated layer from the datasource.

 If this method is supported
 the ODsCDeleteLayer capability will test TRUE on the OGRDataSource.

 This method is the same as the C++ method OGRDataSource::DeleteLayer().

 @param hDS handle to the datasource
 @param iLayer the index of the layer to delete. 

 @return OGRERR_NONE on success, or OGRERR_UNSUPPORTED_OPERATION if deleting
 layers is not supported for this datasource.

*/

/**
 \fn  void OGRDataSource::GetStyleTable();

 \brief Returns data source style table.
 
 This method is the same as the C function OGR_DS_GetStyleTable().
 
 @return pointer to a style table which should not be modified or freed by the
 caller.
*/

/**
 \fn  void OGRDataSource::SetStyleTable(OGRStyleTable *poStyleTable);

 \brief Set data source style table.
 
 This method operate exactly as OGRDataSource::SetStyleTableDirectly() except
 that it does not assume ownership of the passed table.
 
 This method is the same as the C function OGR_DS_SetStyleTable().
 
 @param poStyleTable pointer to style table to set

*/

/**
 \fn  void OGRDataSource::SetStyleTableDirectly(OGRStyleTable *poStyleTable);

 \brief Set data source style table.
 
 This method operate exactly as OGRDataSource::SetStyleTable() except that it
 assumes ownership of the passed table.
 
 This method is the same as the C function OGR_DS_SetStyleTableDirectly().
 
 @param poStyleTable pointer to style table to set

*/

/**
 \fn OGRLayer *OGRDataSource::ExecuteSQL(const char *pszStatement,
				         OGRGeometry *poSpatialFilter, 
				         const char *pszDialect );

 \brief Execute an SQL statement against the data store. 

 The result of an SQL query is either NULL for statements that are in error,
 or that have no results set, or an OGRLayer pointer representing a results
 set from the query.  Note that this OGRLayer is in addition to the layers
 in the data store and must be destroyed with 
 OGRDataSource::ReleaseResultSet() before the data source is closed
 (destroyed).  

 This method is the same as the C function OGR_DS_ExecuteSQL().

 For more information on the SQL dialect supported internally by OGR
 review the <a href="ogr_sql.html">OGR SQL</a> document.  Some drivers (ie.
 Oracle and PostGIS) pass the SQL directly through to the underlying RDBMS.

 Starting with OGR 1.10, the <a href="ogr_sql_sqlite.html">SQLITE dialect</a>
 can also be used.

 @param pszStatement the SQL statement to execute. 
 @param poSpatialFilter geometry which represents a spatial filter. Can be NULL.
 @param pszDialect allows control of the statement dialect. If set to NULL, the
OGR SQL engine will be used, except for RDBMS drivers that will use their dedicated SQL engine,
unless OGRSQL is explicitly passed as the dialect. Starting with OGR 1.10, the SQLITE dialect
can also be used.

 @return an OGRLayer containing the results of the query.  Deallocate with
 ReleaseResultSet().

*/


/**
 \fn OGRLayerH OGR_DS_ExecuteSQL( OGRDataSourceH hDS, 
                             const char *pszSQLCommand,
                             OGRGeometryH hSpatialFilter,
                             const char *pszDialect );

 \brief Execute an SQL statement against the data store. 

 The result of an SQL query is either NULL for statements that are in error,
 or that have no results set, or an OGRLayer handle representing a results
 set from the query.  Note that this OGRLayer is in addition to the layers
 in the data store and must be destroyed with 
 OGR_DS_ReleaseResultSet() before the data source is closed
 (destroyed).  

 For more information on the SQL dialect supported internally by OGR
 review the <a href="ogr_sql.html">OGR SQL</a> document.  Some drivers (ie.
 Oracle and PostGIS) pass the SQL directly through to the underlying RDBMS.

 Starting with OGR 1.10, the <a href="ogr_sql_sqlite.html">SQLITE dialect</a>
 can also be used.

 This function is the same as the C++ method OGRDataSource::ExecuteSQL();

 @param hDS handle to the data source on which the SQL query is executed.
 @param pszSQLCommand the SQL statement to execute. 
 @param hSpatialFilter handle to a geometry which represents a spatial filter. Can be NULL.
 @param pszDialect allows control of the statement dialect. If set to NULL, the
OGR SQL engine will be used, except for RDBMS drivers that will use their dedicated SQL engine,
unless OGRSQL is explicitly passed as the dialect. Starting with OGR 1.10, the SQLITE dialect
can also be used.

 @return an handle to a OGRLayer containing the results of the query.  
 Deallocate with OGR_DS_ReleaseResultSet().

*/

/**
 \fn void OGRDataSource::ReleaseResultSet(OGRLayer *poResultsSet);

 \brief Release results of ExecuteSQL().

 This method should only be used to deallocate OGRLayers resulting from
 an ExecuteSQL() call on the same OGRDataSource.  Failure to deallocate a
 results set before destroying the OGRDataSource may cause errors. 

 This method is the same as the C function OGR_L_ReleaseResultSet().

 @param poResultsSet the result of a previous ExecuteSQL() call.

*/ 


/**
 \fn void OGR_DS_ReleaseResultSet( OGRDataSourceH hDS, OGRLayerH hLayer );

 \brief Release results of OGR_DS_ExecuteSQL().

 This function should only be used to deallocate OGRLayers resulting from
 an OGR_DS_ExecuteSQL() call on the same OGRDataSource.  
 Failure to deallocate a results set before destroying the OGRDataSource 
 may cause errors. 

 This function is the same as the C++ method 
 OGRDataSource::ReleaseResultSet().

 @param hDS an handle to the data source on which was executed an 
 SQL query.
 @param hLayer handle to the result of a previous OGR_DS_ExecuteSQL() call.

*/ 


/**
 \fn int OGRDataSource::TestCapability( const char *pszCapability );

 \brief Test if capability is available.

 One of the following data source capability names can be passed into this
 method, and a TRUE or FALSE value will be returned indicating whether or not
 the capability is available for this object.

 <ul>
  <li> <b>ODsCCreateLayer</b>: True if this datasource can create new layers.<p>
  <li> <b>ODsCDeleteLayer</b>: True if this datasource can delete existing layers.<p>
 </ul>

 The \#define macro forms of the capability names should be used in preference
 to the strings themselves to avoid mispelling.

 This method is the same as the C function OGR_DS_TestCapability().

 @param pszCapability the capability to test.

 @return TRUE if capability available otherwise FALSE.

*/ 


/**
 \fn int OGR_DS_TestCapability( OGRDataSourceH hDS, const char *pszCapability );

 \brief Test if capability is available.

 One of the following data source capability names can be passed into this
 function, and a TRUE or FALSE value will be returned indicating whether 
 or not the capability is available for this object.

 <ul>
  <li> <b>ODsCCreateLayer</b>: True if this datasource can create new layers.
  <li> <b>ODsCDeleteLayer</b>: True if this datasource can delete existing layers.<p>
  <p>
 </ul>

 The \#define macro forms of the capability names should be used in preference
 to the strings themselves to avoid mispelling.

 This function is the same as the C++ method OGRDataSource::TestCapability().

 @param hDS handle to the data source against which to test the capability.
 @param pszCapability the capability to test.

 @return TRUE if capability available otherwise FALSE.

*/ 

/**
 \fn OGRLayer *OGRDataSource::CreateLayer( const char *pszName, 
                                OGRSpatialReference *poSpatialRef = NULL,
                                OGRwkbGeometryType eGType = wkbUnknown,
                                char ** papszOptions = NULL );

\brief This method attempts to create a new layer on the data source with the indicated name, coordinate system, geometry type.

The papszOptions argument
can be used to control driver specific creation options.  These options are
normally documented in the format specific documentation. 

 @param pszName the name for the new layer.  This should ideally not 
match any existing layer on the datasource.
 @param poSpatialRef the coordinate system to use for the new layer, or NULL if
no coordinate system is available. 
 @param eGType the geometry type for the layer.  Use wkbUnknown if there
are no constraints on the types geometry to be written. 
 @param papszOptions a StringList of name=value options.  Options are driver
specific.

 @return NULL is returned on failure, or a new OGRLayer handle on success. 

<b>Example:</b>

\code
#include "ogrsf_frmts.h" 
#include "cpl_string.h"

...

        OGRLayer *poLayer;
        char     **papszOptions;

        if( !poDS->TestCapability( ODsCCreateLayer ) )
        {
        ...
        }

        papszOptions = CSLSetNameValue( papszOptions, "DIM", "2" );
        poLayer = poDS->CreateLayer( "NewLayer", NULL, wkbUnknown,
                                     papszOptions );
        CSLDestroy( papszOptions );

        if( poLayer == NULL )
        {
            ...
        }        
\endcode
*/

/**
 \fn OGRLayerH OGR_DS_CreateLayer( OGRDataSourceH hDS, 
                              const char * pszName,
                              OGRSpatialReferenceH hSpatialRef,
                              OGRwkbGeometryType eType,
                              char ** papszOptions );

\brief This function attempts to create a new layer on the data source with the indicated name, coordinate system, geometry type.

The papszOptions argument
can be used to control driver specific creation options.  These options are
normally documented in the format specific documentation. 

This function is the same as the C++ method OGRDataSource::CreateLayer().

 @param hDS The dataset handle.
 @param pszName the name for the new layer.  This should ideally not 
match any existing layer on the datasource.
 @param hSpatialRef handle to the coordinate system to use for the new layer,
or NULL if no coordinate system is available. 
 @param eType the geometry type for the layer.  Use wkbUnknown if there
are no constraints on the types geometry to be written. 
 @param papszOptions a StringList of name=value options.  Options are driver
specific, and driver information can be found at the following url:  
http://www.gdal.org/ogr/ogr_formats.html 

 @return NULL is returned on failure, or a new OGRLayer handle on success. 

<b>Example:</b>

\code
#include "ogrsf_frmts.h" 
#include "cpl_string.h"

...

	OGRLayerH *hLayer;
        char     **papszOptions;

	if( OGR_DS_TestCapability( hDS, ODsCCreateLayer ) )
        {
	    ...
        }

        papszOptions = CSLSetNameValue( papszOptions, "DIM", "2" );
        hLayer = OGR_DS_CreateLayer( hDS, "NewLayer", NULL, wkbUnknown,
				     papszOptions );
        CSLDestroy( papszOptions );

        if( hLayer == NULL )
        {
            ...
        }        
\endcode
*/

/**
 \fn int OGRDataSource::Reference();

\brief Increment datasource reference count.

This method is the same as the C function OGR_DS_Reference().

@return the reference count after incrementing.
*/
				         
/**
 \fn int OGRDataSource::Dereference();

\brief Decrement datasource reference count.

This method is the same as the C function OGR_DS_Dereference().

@return the reference count after decrementing.
*/
				         
/**
 \fn int OGRDataSource::GetRefCount() const;

\brief Fetch reference count.

This method is the same as the C function OGR_DS_GetRefCount().

@return the current reference count for the datasource object itself.
*/
				         
/**
 \fn int OGRDataSource::GetSummaryRefCount() const;

\brief Fetch reference count of datasource and all owned layers.

This method is the same as the C function OGR_DS_GetSummaryRefCount().

@return the current summary reference count for the datasource and its layers.
*/

/**
 \fn OGRErr OGRDataSource::Release();

\brief Drop a reference to this datasource, and if the reference count drops to zero close (destroy) the datasource.

Internally this actually calls
the OGRSFDriverRegistrar::ReleaseDataSource() method.  This method is
essentially a convenient alias. 

This method is the same as the C function OGRReleaseDataSource().

@return OGRERR_NONE on success or an error code. 
*/

/**
  \fn OGRErr OGRReleaseDataSource( OGRDataSourceH hDS )

\brief Drop a reference to this datasource, and if the reference count drops to zero close (destroy) the datasource.

Internally this actually calls
the OGRSFDriverRegistrar::ReleaseDataSource() method.  This method is
essentially a convenient alias. 

This method is the same as the C++ method OGRDataSource::Release()

@param hDS handle to the data source to release

@return OGRERR_NONE on success or an error code. 
*/

/**
 \fn void OGRDataSource::DestroyDataSource(OGRDataSource* poDS);

 \brief Closes opened datasource and releases allocated resources.

 This static method will close and destroy a datasource.  It is
 equivelent to calling delete on the object, but it ensures that the
 deallocation is properly executed within the GDAL libraries heap on
 platforms where this can matter (win32).  

 This method is the same as the C function OGR_DS_Destroy().

  @param poDS pointer to allocated datasource object.
*/

/**
 \fn OGRErr OGRDataSource::SyncToDisk();

\brief Flush pending changes to disk.

This call is intended to force the datasource to flush any pending writes to
disk, and leave the disk file in a consistent state.  It would not normally
have any effect on read-only datasources. 

Some data sources do not implement this method, and will still return 
OGRERR_NONE.  An error is only returned if an error occurs while attempting
to flush to disk.  

The default implementation of this method just calls the SyncToDisk() method
on each of the layers.  Conceptionally, calling SyncToDisk() on a datasource
should include any work that might be accomplished by calling SyncToDisk()
on layers in that data source.

In any event, you should always close any opened datasource with
OGRDataSource::DestroyDataSource() that will ensure all data is correctly flushed.

This method is the same as the C function OGR_DS_SyncToDisk().

@return OGRERR_NONE if no error occurs (even if nothing is done) or an
error code.
*/

/**
 \fn OGRErr OGR_DS_SyncToDisk(OGRDataSourceH hDS);

\brief Flush pending changes to disk.

This call is intended to force the datasource to flush any pending writes to
disk, and leave the disk file in a consistent state.  It would not normally
have any effect on read-only datasources. 

Some data sources do not implement this method, and will still return 
OGRERR_NONE.  An error is only returned if an error occurs while attempting
to flush to disk.  

The default implementation of this method just calls the SyncToDisk() method
on each of the layers.  Conceptionally, calling SyncToDisk() on a datasource
should include any work that might be accomplished by calling SyncToDisk()
on layers in that data source.

In any event, you should always close any opened datasource with
OGR_DS_Destroy() that will ensure all data is correctly flushed.

This method is the same as the C++ method OGRDataSource::SyncToDisk()

@param hDS handle to the data source

@return OGRERR_NONE if no error occurs (even if nothing is done) or an
error code.
*/

/**
 \fn OGRSFDriver *OGRDataSource::GetDriver() const;

\brief Returns the driver that the dataset was opened with. 

This method is the same as the C function OGR_DS_GetDriver().

@return NULL if driver info is not available, or pointer to a driver owned
by the OGRSFDriverManager.
*/

/**
 \fn OGRSFDriverH OGR_DS_GetDriver( OGRDataSourceH hDS );

\brief Returns the driver that the dataset was opened with. 

This method is the same as the C++ method OGRDataSource::GetDriver() 

@param hDS handle to the datasource
@return NULL if driver info is not available, or pointer to a driver owned
by the OGRSFDriverManager.
*/

/**
 \fn void OGRDataSource::SetDriver( OGRSFDriver *poDriver );

\brief Sets the driver that the dataset was created or opened with. 

\note This method is not exposed as the OGR C API function.
 
@param poDriver pointer to driver instance associated with the data source.

*/

/************************************************************************/
/*                               OGRLayer                               */
/************************************************************************/

/**
 \fn const char* OGRLayer::GetName();

 \brief Return the layer name.

 This returns the same content as GetLayerDefn()->GetName(), but for a
 few drivers, calling GetName() directly can avoid lengthy layer
 definition initialization.

 This method is the same as the C function OGR_L_GetName().

 If this method is derived in a driver, it must be done such that it
 returns the same content as GetLayerDefn()->GetName().

 @return the layer name (must not been freed)
 @since OGR 1.8.0

*/

/**
 \fn const char* OGR_L_GetName( OGRLayerH hLayer );

 \brief Return the layer name.

 This returns the same content as OGR_FD_GetName(OGR_L_GetLayerDefn(hLayer)),
 but for a few drivers, calling OGR_L_GetName() directly can avoid lengthy
 layer definition initialization.

 This function is the same as the C++ method OGRLayer::GetName().

 @param hLayer handle to the layer.
 @return the layer name (must not been freed)
 @since OGR 1.8.0
*/


/**
 \fn OGRwkbGeometryType OGRLayer::GetGeomType();

 \brief Return the layer geometry type.

 This returns the same result as GetLayerDefn()->GetGeomType(), but for a
 few drivers, calling GetGeomType() directly can avoid lengthy layer
 definition initialization.

 This method is the same as the C function OGR_L_GetGeomType().

 If this method is derived in a driver, it must be done such that it
 returns the same content as GetLayerDefn()->GetGeomType().

 @return the geometry type
 @since OGR 1.8.0

*/

/**
 \fn OGRwkbGeometryType OGR_L_GetGeomType( OGRLayerH hLayer );

 \brief Return the layer geometry type.

 This returns the same result as OGR_FD_GetGeomType(OGR_L_GetLayerDefn(hLayer)),
 but for a few drivers, calling OGR_L_GetGeomType() directly can avoid lengthy
 layer definition initialization.

 This function is the same as the C++ method OGRLayer::GetGeomType().

 @param hLayer handle to the layer.
 @return the geometry type
 @since OGR 1.8.0
*/


/**
 \fn void OGRLayer::ResetReading();

 \brief Reset feature reading to start on the first feature.

 This affects GetNextFeature().

 This method is the same as the C function OGR_L_ResetReading().

*/

/**
 \fn void OGR_L_ResetReading( OGRLayerH hLayer );

 \brief Reset feature reading to start on the first feature.

 This affects GetNextFeature().

 This function is the same as the C++ method OGRLayer::ResetReading().

 @param hLayer handle to the layer on which features are read.

*/

/**
 \fn OGRFeature *OGRLayer::GetNextFeature();

 \brief Fetch the next available feature from this layer.

 The returned feature
 becomes the responsiblity of the caller to delete with OGRFeature::DestroyFeature(). It is critical that
 all features associated with an OGRLayer (more specifically an 
 OGRFeatureDefn) be deleted before that layer/datasource is deleted.

 Only features matching the current spatial filter (set with 
 SetSpatialFilter()) will be returned.  

 This method implements sequential access to the features of a layer.  The
 ResetReading() method can be used to start at the beginning again.  

 This method is the same as the C function OGR_L_GetNextFeature().

 @return a feature, or NULL if no more features are available. 

*/


/**
 \fn OGRFeatureH OGR_L_GetNextFeature( OGRLayerH hLayer );

 \brief Fetch the next available feature from this layer.

 The returned feature
 becomes the responsiblity of the caller to delete with OGR_F_Destroy().  It is critical that
 all features associated with an OGRLayer (more specifically an 
 OGRFeatureDefn) be deleted before that layer/datasource is deleted.

 Only features matching the current spatial filter (set with 
 SetSpatialFilter()) will be returned.  

 This function implements sequential access to the features of a layer.
 The OGR_L_ResetReading() function can be used to start at the beginning 
 again.

 This function is the same as the C++ method OGRLayer::GetNextFeature().

 @param hLayer handle to the layer from which feature are read.
 @return an handle to a feature, or NULL if no more features are available. 

*/

/**

 \fn int OGRLayer::GetFeatureCount( int bForce = TRUE );

 \brief Fetch the feature count in this layer. 

 Returns the number of features in the layer.  For dynamic databases the
 count may not be exact.  If bForce is FALSE, and it would be expensive
 to establish the feature count a value of -1 may be returned indicating
 that the count isn't know.  If bForce is TRUE some implementations will
 actually scan the entire layer once to count objects. 

 The returned count takes the spatial filter into account. 

 Note that some implementations of this method may alter the read cursor
 of the layer.

 This method is the same as the C function OGR_L_GetFeatureCount().

 @param bForce Flag indicating whether the count should be computed even
 if it is expensive.

 @return feature count, -1 if count not known. 

*/

/**
 \fn int OGR_L_GetFeatureCount( OGRLayerH hLayer, int bForce );

 \brief Fetch the feature count in this layer. 

 Returns the number of features in the layer.  For dynamic databases the
 count may not be exact.  If bForce is FALSE, and it would be expensive
 to establish the feature count a value of -1 may be returned indicating
 that the count isn't know.  If bForce is TRUE some implementations will
 actually scan the entire layer once to count objects. 

 The returned count takes the spatial filter into account. 

 Note that some implementations of this method may alter the read cursor
 of the layer.

 This function is the same as the CPP OGRLayer::GetFeatureCount().

 @param hLayer handle to the layer that owned the features.
 @param bForce Flag indicating whether the count should be computed even
 if it is expensive.

 @return feature count, -1 if count not known. 

*/

/**

 \fn OGRErr OGRLayer::GetExtent( OGREnvelope *psExtent, int bForce = TRUE );

 \brief Fetch the extent of this layer.

 Returns the extent (MBR) of the data in the layer.  If bForce is FALSE,
 and it would be expensive to establish the extent then OGRERR_FAILURE
 will be returned indicating that the extent isn't know.  If bForce is 
 TRUE then some implementations will actually scan the entire layer once
 to compute the MBR of all the features in the layer.

 Depending on the drivers, the returned extent may or may not take the
 spatial filter into account.  So it is safer to call GetExtent() without
 setting a spatial filter.

 Layers without any geometry may return OGRERR_FAILURE just indicating that
 no meaningful extents could be collected.

 Note that some implementations of this method may alter the read cursor
 of the layer.

 This method is the same as the C function OGR_L_GetExtent().

 @param psExtent the structure in which the extent value will be returned.
 @param bForce Flag indicating whether the extent should be computed even
 if it is expensive.

 @return OGRERR_NONE on success, OGRERR_FAILURE if extent not known. 

*/


/**

 \fn OGRErr OGR_L_GetExtent( OGRLayerH hLayer, OGREnvelope *psExtent, int bForce);

 \brief Fetch the extent of this layer.

 Returns the extent (MBR) of the data in the layer.  If bForce is FALSE,
 and it would be expensive to establish the extent then OGRERR_FAILURE
 will be returned indicating that the extent isn't know.  If bForce is 
 TRUE then some implementations will actually scan the entire layer once
 to compute the MBR of all the features in the layer.

 Depending on the drivers, the returned extent may or may not take the
 spatial filter into account.  So it is safer to call OGR_L_GetExtent() without
 setting a spatial filter.

 Layers without any geometry may return OGRERR_FAILURE just indicating that
 no meaningful extents could be collected.

 Note that some implementations of this method may alter the read cursor
 of the layer.

 This function is the same as the C++ method OGRLayer::GetExtent().

 @param hLayer handle to the layer from which to get extent.
 @param psExtent the structure in which the extent value will be returned.
 @param bForce Flag indicating whether the extent should be computed even
 if it is expensive.

 @return OGRERR_NONE on success, OGRERR_FAILURE if extent not known. 

*/

/** 
 \fn void OGRLayer::SetSpatialFilter( OGRGeometry * poFilter );

 \brief Set a new spatial filter. 

 This method set the geometry to be used as a spatial filter when 
 fetching features via the GetNextFeature() method.  Only features that
 geometrically intersect the filter geometry will be returned.  

 Currently this test is may be inaccurately implemented, but it is
 guaranteed that all features who's envelope (as returned by
 OGRGeometry::getEnvelope()) overlaps the envelope of the spatial filter
 will be returned.  This can result in more shapes being returned that 
 should strictly be the case. 

 This method makes an internal copy of the passed geometry.  The 
 passed geometry remains the responsibility of the caller, and may 
 be safely destroyed. 

 For the time being the passed filter geometry should be in the same
 SRS as the layer (as returned by OGRLayer::GetSpatialRef()).  In the
 future this may be generalized. 

 This method is the same as the C function OGR_L_SetSpatialFilter().

 @param poFilter the geometry to use as a filtering region.  NULL may
 be passed indicating that the current spatial filter should be cleared,
 but no new one instituted.
 
 */

/** 
 \fn void OGR_L_SetSpatialFilter( OGRLayerH hLayer, OGRGeometryH hGeom );

 \brief Set a new spatial filter. 

 This function set the geometry to be used as a spatial filter when 
 fetching features via the OGR_L_GetNextFeature() function.  Only 
 features that geometrically intersect the filter geometry will be 
 returned.  

 Currently this test is may be inaccurately implemented, but it is
 guaranteed that all features who's envelope (as returned by
 OGR_G_GetEnvelope()) overlaps the envelope of the spatial filter
 will be returned.  This can result in more shapes being returned that 
 should strictly be the case. 

 This function makes an internal copy of the passed geometry.  The 
 passed geometry remains the responsibility of the caller, and may 
 be safely destroyed. 

 For the time being the passed filter geometry should be in the same
 SRS as the layer (as returned by OGR_L_GetSpatialRef()).  In the
 future this may be generalized. 

 This function is the same as the C++ method OGRLayer::SetSpatialFilter.

 @param hLayer handle to the layer on which to set the spatial filter.
 @param hGeom handle to the geometry to use as a filtering region.  NULL may
 be passed indicating that the current spatial filter should be cleared,
 but no new one instituted.
 
 */

/** 
 \fn void OGRLayer::SetSpatialFilterRect( double dfMinX, double dfMinY, 
                                          double dfMaxX, double dfMaxY );

 \brief Set a new rectangular spatial filter. 

 This method set rectangle to be used as a spatial filter when 
 fetching features via the GetNextFeature() method.  Only features that
 geometrically intersect the given rectangle will be returned.  

 The x/y values should be in the same coordinate system as the layer as
 a whole (as returned by OGRLayer::GetSpatialRef()).   Internally this 
 method is normally implemented as creating a 5 vertex closed rectangular
 polygon and passing it to OGRLayer::SetSpatialFilter().  It exists as
 a convenience. 

 The only way to clear a spatial filter set with this method is to 
 call OGRLayer::SetSpatialFilter(NULL). 

 This method is the same as the C function OGR_L_SetSpatialFilterRect().

 @param dfMinX the minimum X coordinate for the rectangular region.
 @param dfMinY the minimum Y coordinate for the rectangular region.
 @param dfMaxX the maximum X coordinate for the rectangular region.
 @param dfMaxY the maximum Y coordinate for the rectangular region.
 
 */

/** 
 \fn void OGR_L_SetSpatialFilterRect( OGRLayerH hLayer,
                                      double dfMinX, double dfMinY, 
                                      double dfMaxX, double dfMaxY );

 \brief Set a new rectangular spatial filter. 

 This method set rectangle to be used as a spatial filter when 
 fetching features via the OGR_L_GetNextFeature() method.  Only features that
 geometrically intersect the given rectangle will be returned.  

 The x/y values should be in the same coordinate system as the layer as
 a whole (as returned by OGRLayer::GetSpatialRef()).   Internally this 
 method is normally implemented as creating a 5 vertex closed rectangular
 polygon and passing it to OGRLayer::SetSpatialFilter().  It exists as
 a convenience. 

 The only way to clear a spatial filter set with this method is to 
 call OGRLayer::SetSpatialFilter(NULL). 

 This method is the same as the C++ method OGRLayer::SetSpatialFilterRect().

 @param hLayer handle to the layer on which to set the spatial filter.
 @param dfMinX the minimum X coordinate for the rectangular region.
 @param dfMinY the minimum Y coordinate for the rectangular region.
 @param dfMaxX the maximum X coordinate for the rectangular region.
 @param dfMaxY the maximum Y coordinate for the rectangular region.
 
 */

/**
 \fn OGRGeometry *OGRLayer::GetSpatialFilter();

 \brief This method returns the current spatial filter for this layer. 

 The returned pointer is to an internally owned object, and should not
 be altered or deleted by the caller.  

 This method is the same as the C function OGR_L_GetSpatialFilter().

 @return spatial filter geometry.
 
 */


/**
 \fn OGRGeometryH OGR_L_GetSpatialFilter( OGRLayerH hLayer );

 \brief This function returns the current spatial filter for this layer. 

 The returned pointer is to an internally owned object, and should not
 be altered or deleted by the caller.  

 This function is the same as the C++ method OGRLayer::GetSpatialFilter().

 @param hLayer handle to the layer to get the spatial filter from.
 @return an handle to the spatial filter geometry.
 
 */

/** 
 \fn void OGRLayer::SetAttributeFilter( const char *pszQuery );

 \brief Set a new attribute query.

 This method sets the attribute query string to be used when 
 fetching features via the GetNextFeature() method.  Only features for which
 the query evaluates as true will be returned.

 The query string should be in the format of an SQL WHERE clause.  For
 instance "population > 1000000 and population < 5000000" where population
 is an attribute in the layer.  The query format is normally a restricted 
 form of SQL  WHERE clause as described in the "WHERE" section of the 
 <a href="ogr_sql.html">OGR SQL</a> tutorial.  In some cases (RDBMS 
 backed drivers) the native capabilities of the database may be used to 
 interprete the WHERE clause in which case the capabilities will be broader
 than those of OGR SQL.

 Note that installing a query string will generally result in resetting
 the current reading position (ala ResetReading()).  

 This method is the same as the C function OGR_L_SetAttributeFilter().

 @param pszQuery query in restricted SQL WHERE format, or NULL to clear the
 current query.

 @return OGRERR_NONE if successfully installed, or an error code if the 
 query expression is in error, or some other failure occurs. 
 
 */

/** 
 \fn OGRErr OGR_L_SetAttributeFilter(OGRLayerH hLayer, const char *pszQuery);

 \brief Set a new attribute query.

 This function sets the attribute query string to be used when 
 fetching features via the OGR_L_GetNextFeature() function.
 Only features for which the query evaluates as true will be returned.

 The query string should be in the format of an SQL WHERE clause.  For
 instance "population > 1000000 and population < 5000000" where population
 is an attribute in the layer.  The query format is a restricted form of SQL
 WHERE clause as defined "eq_format=restricted_where" about half way through
 this document:

   http://ogdi.sourceforge.net/prop/6.2.CapabilitiesMetadata.html

 Note that installing a query string will generally result in resetting
 the current reading position (ala OGR_L_ResetReading()).  

 This function is the same as the C++ method OGRLayer::SetAttributeFilter().

 @param hLayer handle to the layer on which attribute query will be executed.
 @param pszQuery query in restricted SQL WHERE format, or NULL to clear the
 current query.

 @return OGRERR_NONE if successfully installed, or an error code if the 
 query expression is in error, or some other failure occurs. 
 
 */

/** 
 \fn OGRFeatureDefn *OGRLayer::GetLayerDefn();

 \brief Fetch the schema information for this layer.

 The returned OGRFeatureDefn is owned by the OGRLayer, and should not be
 modified or freed by the application.  It encapsulates the attribute schema
 of the features of the layer. 

 This method is the same as the C function OGR_L_GetLayerDefn().

 @return feature definition.

*/

/** 
 \fn OGRFeatureDefnH OGR_L_GetLayerDefn( OGRLayerH hLayer );

 \brief Fetch the schema information for this layer.

 The returned handle to the OGRFeatureDefn is owned by the OGRLayer,
 and should not be modified or freed by the application.  It encapsulates
 the attribute schema of the features of the layer. 

 This function is the same as the C++ method OGRLayer::GetLayerDefn().

 @param hLayer handle to the layer to get the schema information.
 @return an handle to the feature definition.

*/

/**

 \fn OGRSpatialReference *OGRLayer::GetSpatialRef();

 \brief Fetch the spatial reference system for this layer. 

 The returned object is owned by the OGRLayer and should not be modified
 or freed by the application.  

 This method is the same as the C function OGR_L_GetSpatialRef().

 @return spatial reference, or NULL if there isn't one.

*/


/**

 \fn OGRSpatialReferenceH OGR_L_GetSpatialRef( OGRLayerH hLayer );

 \brief Fetch the spatial reference system for this layer. 

 The returned object is owned by the OGRLayer and should not be modified
 or freed by the application.  

 This function is the same as the C++ method OGRLayer::GetSpatialRef().

 @param hLayer handle to the layer to get the spatial reference from.
 @return spatial reference, or NULL if there isn't one.

*/

/**

 \fn OGRFeature *OGRLayer::GetFeature( long nFID );

 \brief Fetch a feature by its identifier.

 This function will attempt to read the identified feature.  The nFID
 value cannot be OGRNullFID.  Success or failure of this operation is
 unaffected by the spatial or attribute filters.

 If this method returns a non-NULL feature, it is guaranteed that its  
 feature id (OGRFeature::GetFID()) will be the same as nFID.

 Use OGRLayer::TestCapability(OLCRandomRead) to establish if this layer
 supports efficient random access reading via GetFeature(); however, the
 call should always work if the feature exists as a fallback implementation
 just scans all the features in the layer looking for the desired feature.
 
 Sequential reads are generally considered interrupted by a GetFeature() call.
 
 The returned feature should be free with OGRFeature::DestroyFeature().

 This method is the same as the C function OGR_L_GetFeature().

 @param nFID the feature id of the feature to read. 

 @return a feature now owned by the caller, or NULL on failure. 

*/


/**

 \fn OGRFeatureH OGR_L_GetFeature( OGRLayerH hLayer, long nFeatureId );

 \brief Fetch a feature by its identifier.

 This function will attempt to read the identified feature.  The nFID
 value cannot be OGRNullFID.  Success or failure of this operation is
 unaffected by the spatial or attribute filters.

 If this function returns a non-NULL feature, it is guaranteed that its  
 feature id (OGR_F_GetFID()) will be the same as nFID.

 Use OGR_L_TestCapability(OLCRandomRead) to establish if this layer
 supports efficient random access reading via OGR_L_GetFeature(); however, 
 the call should always work if the feature exists as a fallback 
 implementation just scans all the features in the layer looking for the 
 desired feature.
 
 Sequential reads are generally considered interrupted by a 
 OGR_L_GetFeature() call.
 
 The returned feature should be free with OGR_F_Destroy().
 
 This function is the same as the C++ method OGRLayer::GetFeature( ).

 @param hLayer handle to the layer that owned the feature.
 @param nFeatureId the feature id of the feature to read. 

 @return an handle to a feature now owned by the caller, or NULL on failure. 

*/

/**
 
 \fn OGRErr OGRLayer::SetFeature( OGRFeature * poFeature );

 \brief Rewrite an existing feature.

 This method will write a feature to the layer, based on the feature id
 within the OGRFeature.   

 Use OGRLayer::TestCapability(OLCRandomWrite) to establish if this layer
 supports random access writing via SetFeature().

 This method is the same as the C function OGR_L_SetFeature().

 @param poFeature the feature to write.

 @return OGRERR_NONE if the operation works, otherwise an appropriate error
 code.

*/

/**
 
 \fn OGRErr OGR_L_SetFeature( OGRLayerH hLayer, OGRFeatureH hFeat );

 \brief Rewrite an existing feature.

 This function will write a feature to the layer, based on the feature id
 within the OGRFeature.   

 Use OGR_L_TestCapability(OLCRandomWrite) to establish if this layer
 supports random access writing via OGR_L_SetFeature().

 This function is the same as the C++ method OGRLayer::SetFeature().

 @param hLayer handle to the layer to write the feature.
 @param hFeat the feature to write.

 @return OGRERR_NONE if the operation works, otherwise an appropriate error
 code.

*/

/**

 \fn OGRErr OGRLayer::CreateFeature( OGRFeature * poFeature );

 \brief Create and write a new feature within a layer.

 The passed feature is written to the layer as a new feature, rather than
 overwriting an existing one.  If the feature has a feature id other than
 OGRNullFID, then the native implementation may use that as the feature id
 of the new feature, but not necessarily.  Upon successful return the 
 passed feature will have been updated with the new feature id. 

 This method is the same as the C function OGR_L_CreateFeature().

 @param poFeature the feature to write to disk. 

 @return OGRERR_NONE on success.

*/

/**

 \fn OGRErr OGR_L_CreateFeature( OGRLayerH hLayer, OGRFeatureH hFeat );

 \brief Create and write a new feature within a layer.

 The passed feature is written to the layer as a new feature, rather than
 overwriting an existing one.  If the feature has a feature id other than
 OGRNullFID, then the native implementation may use that as the feature id
 of the new feature, but not necessarily.  Upon successful return the 
 passed feature will have been updated with the new feature id. 

 This function is the same as the C++ method OGRLayer::CreateFeature().

 @param hLayer handle to the layer to write the feature to.
 @param hFeat the handle of the feature to write to disk. 

 @return OGRERR_NONE on success.

*/

/**

 \fn OGRErr OGRLayer::DeleteFeature( long nFID );

 \brief Delete feature from layer.

 The feature with the indicated feature id is deleted from the layer if
 supported by the driver.  Most drivers do not support feature deletion,
 and will return OGRERR_UNSUPPORTED_OPERATION.  The TestCapability()
 layer method may be called with OLCDeleteFeature to check if the driver 
 supports feature deletion.

 This method is the same as the C function OGR_L_DeleteFeature().

 @param nFID the feature id to be deleted from the layer 

 @return OGRERR_NONE on success.

*/

/**

 \fn OGRErr OGR_L_DeleteFeature( OGRLayerH hLayer, long nFID );

 \brief Delete feature from layer.

 The feature with the indicated feature id is deleted from the layer if
 supported by the driver.  Most drivers do not support feature deletion,
 and will return OGRERR_UNSUPPORTED_OPERATION.  The OGR_L_TestCapability()
 function may be called with OLCDeleteFeature to check if the driver 
 supports feature deletion.

 This method is the same as the C++ method OGRLayer::DeleteFeature().

 @param hLayer handle to the layer
 @param nFID the feature id to be deleted from the layer 

 @return OGRERR_NONE on success.


*/


/**

 \fn int OGRLayer::TestCapability( const char * pszCap );

 \brief Test if this layer supported the named capability.

 The capability codes that can be tested are represented as strings, but
 \#defined constants exists to ensure correct spelling.  Specific layer 
 types may implement class specific capabilities, but this can't generally
 be discovered by the caller. <p>

<ul>

 <li> <b>OLCRandomRead</b> / "RandomRead": TRUE if the GetFeature() method 
is implemented in an optimized way for this layer, as opposed to the default
implementation using ResetReading() and GetNextFeature() to find the requested
feature id.<p>

 <li> <b>OLCSequentialWrite</b> / "SequentialWrite": TRUE if the 
CreateFeature() method works for this layer.  Note this means that this 
particular layer is writable.  The same OGRLayer class  may returned FALSE 
for other layer instances that are effectively read-only.<p>

 <li> <b>OLCRandomWrite</b> / "RandomWrite": TRUE if the SetFeature() method
is operational on this layer.   Note this means that this 
particular layer is writable.  The same OGRLayer class  may returned FALSE 
for other layer instances that are effectively read-only.<p>

 <li> <b>OLCFastSpatialFilter</b> / "FastSpatialFilter": TRUE if this layer
implements spatial filtering efficiently.  Layers that effectively read all
features, and test them with the OGRFeature intersection methods should
return FALSE.  This can be used as a clue by the application whether it 
should build and maintain its own spatial index for features in this layer.<p>

 <li> <b>OLCFastFeatureCount</b> / "FastFeatureCount": 
TRUE if this layer can return a feature
count (via GetFeatureCount()) efficiently ... ie. without counting
the features.  In some cases this will return TRUE until a spatial filter is
installed after which it will return FALSE.<p>

 <li> <b>OLCFastGetExtent</b> / "FastGetExtent": 
TRUE if this layer can return its data extent (via GetExtent())
efficiently ... ie. without scanning all the features.  In some cases this
will return TRUE until a spatial filter is installed after which it will
return FALSE.<p>

 <li> <b>OLCFastSetNextByIndex</b> / "FastSetNextByIndex": 
TRUE if this layer can perform the SetNextByIndex() call efficiently, otherwise
FALSE.<p>

 <li> <b>OLCCreateField</b> / "CreateField": TRUE if this layer can create 
new fields on the current layer using CreateField(), otherwise FALSE.<p>

 <li> <b>OLCDeleteField</b> / "DeleteField": TRUE if this layer can delete
existing fields on the current layer using DeleteField(), otherwise FALSE.<p>

 <li> <b>OLCReorderFields</b> / "ReorderFields": TRUE if this layer can reorder
existing fields on the current layer using ReorderField() or ReorderFields(), otherwise FALSE.<p>

 <li> <b>OLCAlterFieldDefn</b> / "AlterFieldDefn": TRUE if this layer can alter
the definition of an existing field on the current layer using AlterFieldDefn(), otherwise FALSE.<p>

 <li> <b>OLCDeleteFeature</b> / "DeleteFeature": TRUE if the DeleteFeature()
method is supported on this layer, otherwise FALSE.<p>

 <li> <b>OLCStringsAsUTF8</b> / "StringsAsUTF8": TRUE if values of OFTString
fields are assured to be in UTF-8 format.  If FALSE the encoding of fields 
is uncertain, though it might still be UTF-8.<p>

<li> <b>OLCTransactions</b> / "Transactions": TRUE if the StartTransaction(),
CommitTransaction() and RollbackTransaction() methods work in a meaningful way,
otherwise FALSE.<p>

<li> <b>OLCIgnoreFields</b> / "IgnoreFields": TRUE if fields, geometry and style
will be omitted when fetching features as set by SetIgnoredFields() method.

<p>

</ul>
 
 This method is the same as the C function OGR_L_TestCapability().

 @param pszCap the name of the capability to test.

 @return TRUE if the layer has the requested capability, or FALSE otherwise.
OGRLayers will return FALSE for any unrecognised capabilities.<p>

*/


/**

 \fn int OGR_L_TestCapability( OGRLayerH hLayer, const char *pszCap );

 \brief Test if this layer supported the named capability.

 The capability codes that can be tested are represented as strings, but
 \#defined constants exists to ensure correct spelling.  Specific layer 
 types may implement class specific capabilities, but this can't generally
 be discovered by the caller. <p>

<ul>

 <li> <b>OLCRandomRead</b> / "RandomRead": TRUE if the GetFeature() method 
is implemented in an optimized way for this layer, as opposed to the default
implementation using ResetReading() and GetNextFeature() to find the requested
feature id.<p>

 <li> <b>OLCSequentialWrite</b> / "SequentialWrite": TRUE if the 
CreateFeature() method works for this layer.  Note this means that this 
particular layer is writable.  The same OGRLayer class  may returned FALSE 
for other layer instances that are effectively read-only.<p>

 <li> <b>OLCRandomWrite</b> / "RandomWrite": TRUE if the SetFeature() method
is operational on this layer.   Note this means that this 
particular layer is writable.  The same OGRLayer class  may returned FALSE 
for other layer instances that are effectively read-only.<p>

 <li> <b>OLCFastSpatialFilter</b> / "FastSpatialFilter": TRUE if this layer
implements spatial filtering efficiently.  Layers that effectively read all
features, and test them with the OGRFeature intersection methods should
return FALSE.  This can be used as a clue by the application whether it 
should build and maintain its own spatial index for features in this 
layer.<p>

 <li> <b>OLCFastFeatureCount</b> / "FastFeatureCount": 
TRUE if this layer can return a feature
count (via OGR_L_GetFeatureCount()) efficiently ... ie. without counting
the features.  In some cases this will return TRUE until a spatial filter is
installed after which it will return FALSE.<p>

 <li> <b>OLCFastGetExtent</b> / "FastGetExtent": 
TRUE if this layer can return its data extent (via OGR_L_GetExtent())
efficiently ... ie. without scanning all the features.  In some cases this
will return TRUE until a spatial filter is installed after which it will
return FALSE.<p>

 <li> <b>OLCFastSetNextByIndex</b> / "FastSetNextByIndex": 
TRUE if this layer can perform the SetNextByIndex() call efficiently, otherwise
FALSE.<p>

 <li> <b>OLCCreateField</b> / "CreateField": TRUE if this layer can create 
new fields on the current layer using CreateField(), otherwise FALSE.<p>

 <li> <b>OLCDeleteField</b> / "DeleteField": TRUE if this layer can delete
existing fields on the current layer using DeleteField(), otherwise FALSE.<p>

 <li> <b>OLCReorderFields</b> / "ReorderFields": TRUE if this layer can reorder
existing fields on the current layer using ReorderField() or ReorderFields(), otherwise FALSE.<p>

 <li> <b>OLCAlterFieldDefn</b> / "AlterFieldDefn": TRUE if this layer can alter
the definition of an existing field on the current layer using AlterFieldDefn(), otherwise FALSE.<p>

 <li> <b>OLCDeleteFeature</b> / "DeleteFeature": TRUE if the DeleteFeature()
method is supported on this layer, otherwise FALSE.<p>

 <li> <b>OLCStringsAsUTF8</b> / "StringsAsUTF8": TRUE if values of OFTString
fields are assured to be in UTF-8 format.  If FALSE the encoding of fields 
is uncertain, though it might still be UTF-8.<p>

<li> <b>OLCTransactions</b> / "Transactions": TRUE if the StartTransaction(),
CommitTransaction() and RollbackTransaction() methods work in a meaningful way,
otherwise FALSE.<p>

<p>

</ul>
 
 This function is the same as the C++ method OGRLayer::TestCapability().

 @param hLayer handle to the layer to get the capability from.
 @param pszCap the name of the capability to test.

 @return TRUE if the layer has the requested capability, or FALSE otherwise.
OGRLayers will return FALSE for any unrecognised capabilities.<p>

*/

/**
 \fn const char *OGRLayer::GetInfo( const char *pszTag );

 \brief Fetch metadata from layer.

 This method can be used to fetch various kinds of metadata or layer 
 specific information encoded as a string.  It is anticipated that various
 tag values will be defined with well known semantics, while other tags will
 be used for driver/application specific purposes.  

 This method is deprecated and will be replaced with a more general 
 metadata model in the future. At this time no drivers return information
 via the GetInfo() call. 

 @param pszTag the tag for which information is being requested.

 @return the value of the requested tag, or NULL if that tag does not
 have a value, or is unknown.

 @deprecated

*/

/**
 \fn OGRErr OGRLayer::SyncToDisk();

\brief Flush pending changes to disk.

This call is intended to force the layer to flush any pending writes to
disk, and leave the disk file in a consistent state.  It would not normally
have any effect on read-only datasources. 

Some layers do not implement this method, and will still return 
OGRERR_NONE.  The default implementation just returns OGRERR_NONE.  An error
is only returned if an error occurs while attempting to flush to disk.  

In any event, you should always close any opened datasource with
OGRDataSource::DestroyDataSource() that will ensure all data is correctly flushed.

This method is the same as the C function OGR_L_SyncToDisk().

@return OGRERR_NONE if no error occurs (even if nothing is done) or an
error code.
*/

/**
 \fn OGRErr OGR_L_SyncToDisk(OGRLayerH hLayer);

\brief Flush pending changes to disk.

This call is intended to force the layer to flush any pending writes to
disk, and leave the disk file in a consistent state.  It would not normally
have any effect on read-only datasources. 

Some layers do not implement this method, and will still return 
OGRERR_NONE.  The default implementation just returns OGRERR_NONE.  An error
is only returned if an error occurs while attempting to flush to disk.  

In any event, you should always close any opened datasource with
OGR_DS_Destroy() that will ensure all data is correctly flushed.

This method is the same as the C++ method OGRLayer::SyncToDisk()

@param hLayer handle to the layer

@return OGRERR_NONE if no error occurs (even if nothing is done) or an
error code.
*/

/**
 \fn OGRErr OGRLayer::SetNextByIndex( long nIndex );

 \brief Move read cursor to the nIndex'th feature in the current resultset. 

 This method allows positioning of a layer such that the GetNextFeature()
 call will read the requested feature, where nIndex is an absolute index
 into the current result set.   So, setting it to 3 would mean the next
 feature read with GetNextFeature() would have been the 4th feature to have
 been read if sequential reading took place from the beginning of the layer,
 including accounting for spatial and attribute filters. 

 Only in rare circumstances is SetNextByIndex() efficiently implemented.  
 In all other cases the default implementation which calls ResetReading()
 and then calls GetNextFeature() nIndex times is used.  To determine if 
 fast seeking is available on the current layer use the TestCapability()
 method with a value of OLCFastSetNextByIndex.  

 This method is the same as the C function OGR_L_SetNextByIndex().

 @param nIndex the index indicating how many steps into the result set
 to seek. 

 @return OGRERR_NONE on success or an error code.

*/


/**
 \fn OGRErr OGR_L_SetNextByIndex( OGRLayerH hLayer, long nIndex );

 \brief Move read cursor to the nIndex'th feature in the current resultset. 

 This method allows positioning of a layer such that the GetNextFeature()
 call will read the requested feature, where nIndex is an absolute index
 into the current result set.   So, setting it to 3 would mean the next
 feature read with GetNextFeature() would have been the 4th feature to have
 been read if sequential reading took place from the beginning of the layer,
 including accounting for spatial and attribute filters. 

 Only in rare circumstances is SetNextByIndex() efficiently implemented.  
 In all other cases the default implementation which calls ResetReading()
 and then calls GetNextFeature() nIndex times is used.  To determine if 
 fast seeking is available on the current layer use the TestCapability()
 method with a value of OLCFastSetNextByIndex.  

 This method is the same as the C++ method OGRLayer::SetNextByIndex()

 @param hLayer handle to the layer
 @param nIndex the index indicating how many steps into the result set
 to seek. 

 @return OGRERR_NONE on success or an error code.

*/

/**
 \fn int OGRLayer::Reference();

\brief Increment layer reference count.

This method is the same as the C function OGR_L_Reference().

@return the reference count after incrementing.
*/
				         
/**
 \fn int OGRLayer::Dereference();

\brief Decrement layer reference count.

This method is the same as the C function OGR_L_Dereference().

@return the reference count after decrementing.
*/
				         
/**
 \fn int OGRLayer::GetRefCount() const;

\brief Fetch reference count.

This method is the same as the C function OGR_L_GetRefCount().

@return the current reference count for the layer object itself.
*/

/**
\fn OGRErr OGRLayer::CreateField( OGRFieldDefn *poField, 
				  int bApproxOK = TRUE );

\brief Create a new field on a layer.

You must use this to create new fields
on a real layer. Internally the OGRFeatureDefn for the layer will be updated
to reflect the new field.  Applications should never modify the OGRFeatureDefn
used by a layer directly.

This method should not be called while there are feature objects in existance that
were obtained or created with the previous layer definition.

Not all drivers support this method. You can query a layer to check if it supports it
with the OLCCreateField capability. Some drivers may only support this method while
there are still no features in the layer. When it is supported, the existings features of the
backing file/database should be updated accordingly.

This function is the same as the C function OGR_L_CreateField().

@param poField field definition to write to disk. 
@param bApproxOK If TRUE, the field may be created in a slightly different
form depending on the limitations of the format driver.

@return OGRERR_NONE on success.
*/
 
/**

 \fn OGRErr OGR_L_CreateField( OGRLayerH hLayer, OGRFieldDefnH hField, 
                          int bApproxOK );

\brief Create a new field on a layer.

You must use this to create new fields
on a real layer. Internally the OGRFeatureDefn for the layer will be updated
to reflect the new field.  Applications should never modify the OGRFeatureDefn
used by a layer directly.

This function should not be called while there are feature objects in existance that
were obtained or created with the previous layer definition.

Not all drivers support this function. You can query a layer to check if it supports it
with the OLCCreateField capability. Some drivers may only support this method while
there are still no features in the layer. When it is supported, the existings features of the
backing file/database should be updated accordingly.

 This function is the same as the C++ method OGRLayer::CreateField().

 @param hLayer handle to the layer to write the field definition.
 @param hField handle of the field definition to write to disk. 
 @param bApproxOK If TRUE, the field may be created in a slightly different
form depending on the limitations of the format driver.

 @return OGRERR_NONE on success.

*/

/**
\fn OGRErr OGRLayer::DeleteField( int iField );

\brief Delete an existing field on a layer.

You must use this to delete existing fields
on a real layer. Internally the OGRFeatureDefn for the layer will be updated
to reflect the deleted field.  Applications should never modify the OGRFeatureDefn
used by a layer directly.

This method should not be called while there are feature objects in existance that
were obtained or created with the previous layer definition.

Not all drivers support this method. You can query a layer to check if it supports it
with the OLCDeleteField capability. Some drivers may only support this method while
there are still no features in the layer. When it is supported, the existings features of the
backing file/database should be updated accordingly.

This function is the same as the C function OGR_L_DeleteField().

@param iField index of the field to delete.

@return OGRERR_NONE on success.

@since OGR 1.9.0
*/

/**

\fn OGRErr OGR_L_DeleteField( OGRLayerH hLayer, int iField);

\brief Create a new field on a layer.

You must use this to delete existing fields
on a real layer. Internally the OGRFeatureDefn for the layer will be updated
to reflect the deleted field.  Applications should never modify the OGRFeatureDefn
used by a layer directly.

This function should not be called while there are feature objects in existance that
were obtained or created with the previous layer definition.

Not all drivers support this function. You can query a layer to check if it supports it
with the OLCDeleteField capability. Some drivers may only support this method while
there are still no features in the layer. When it is supported, the existings features of the
backing file/database should be updated accordingly.

This function is the same as the C++ method OGRLayer::DeleteField().

@param hLayer handle to the layer.
@param iField index of the field to delete.

@return OGRERR_NONE on success.

@since OGR 1.9.0
*/

/**
\fn OGRErr OGRLayer::ReorderFields( int* panMap );

\brief Reorder all the fields of a layer.

You must use this to reorder existing fields
on a real layer. Internally the OGRFeatureDefn for the layer will be updated
to reflect the reordering of the fields.  Applications should never modify the OGRFeatureDefn
used by a layer directly.

This method should not be called while there are feature objects in existance that
were obtained or created with the previous layer definition.

panMap is such that,for each field definition at position i after reordering,
its position before reordering was panMap[i].

For example, let suppose the fields were "0","1","2","3","4" initially.
ReorderFields([0,2,3,1,4]) will reorder them as "0","2","3","1","4".

Not all drivers support this method. You can query a layer to check if it supports it
with the OLCReorderFields capability. Some drivers may only support this method while
there are still no features in the layer. When it is supported, the existings features of the
backing file/database should be updated accordingly.

This function is the same as the C function OGR_L_ReorderFields().

@param panMap an array of GetLayerDefn()->GetFieldCount() elements which
is a permutation of [0, GetLayerDefn()->GetFieldCount()-1].

@return OGRERR_NONE on success.

@since OGR 1.9.0
*/

/**

\fn OGRErr OGR_L_ReorderFields( OGRLayerH hLayer, int* panMap );

\brief Reorder all the fields of a layer.

You must use this to reorder existing fields
on a real layer. Internally the OGRFeatureDefn for the layer will be updated
to reflect the reordering of the fields.  Applications should never modify the OGRFeatureDefn
used by a layer directly.

This function should not be called while there are feature objects in existance that
were obtained or created with the previous layer definition.

panMap is such that,for each field definition at position i after reordering,
its position before reordering was panMap[i].

For example, let suppose the fields were "0","1","2","3","4" initially.
ReorderFields([0,2,3,1,4]) will reorder them as "0","2","3","1","4".

Not all drivers support this function. You can query a layer to check if it supports it
with the OLCReorderFields capability. Some drivers may only support this method while
there are still no features in the layer. When it is supported, the existings features of the
backing file/database should be updated accordingly.

This function is the same as the C++ method OGRLayer::ReorderFields().

@param hLayer handle to the layer.
@param panMap an array of GetLayerDefn()->GetFieldCount() elements which
is a permutation of [0, GetLayerDefn()->GetFieldCount()-1].

@return OGRERR_NONE on success.

@since OGR 1.9.0
*/

/**
\fn OGRErr OGRLayer::ReorderField( int iOldFieldPos, int iNewFieldPos );

\brief Reorder an existing field on a layer.

This method is a conveniency wrapper of ReorderFields() dedicated to move a single field.
It is a non-virtual method, so drivers should implement ReorderFields() instead.

You must use this to reorder existing fields
on a real layer. Internally the OGRFeatureDefn for the layer will be updated
to reflect the reordering of the fields.  Applications should never modify the OGRFeatureDefn
used by a layer directly.

This method should not be called while there are feature objects in existance that
were obtained or created with the previous layer definition.

The field definition that was at initial position iOldFieldPos will be moved at
position iNewFieldPos, and elements between will be shuffled accordingly.

For example, let suppose the fields were "0","1","2","3","4" initially.
ReorderField(1, 3) will reorder them as "0","2","3","1","4".

Not all drivers support this method. You can query a layer to check if it supports it
with the OLCReorderFields capability. Some drivers may only support this method while
there are still no features in the layer. When it is supported, the existings features of the
backing file/database should be updated accordingly.

This function is the same as the C function OGR_L_ReorderField().

@param iOldFieldPos previous position of the field to move. Must be in the range [0,GetFieldCount()-1].
@param iNewFieldPos new position of the field to move. Must be in the range [0,GetFieldCount()-1].

@return OGRERR_NONE on success.

@since OGR 1.9.0
*/

/**

\fn OGRErr OGR_L_ReorderField( OGRLayerH hLayer, int iOldFieldPos, int iNewFieldPos );

\brief Reorder an existing field on a layer.

This function is a conveniency wrapper of OGR_L_ReorderFields() dedicated to move a single field.

You must use this to reorder existing fields
on a real layer. Internally the OGRFeatureDefn for the layer will be updated
to reflect the reordering of the fields.  Applications should never modify the OGRFeatureDefn
used by a layer directly.

This function should not be called while there are feature objects in existance that
were obtained or created with the previous layer definition.

The field definition that was at initial position iOldFieldPos will be moved at
position iNewFieldPos, and elements between will be shuffled accordingly.

For example, let suppose the fields were "0","1","2","3","4" initially.
ReorderField(1, 3) will reorder them as "0","2","3","1","4".

Not all drivers support this function. You can query a layer to check if it supports it
with the OLCReorderFields capability. Some drivers may only support this method while
there are still no features in the layer. When it is supported, the existings features of the
backing file/database should be updated accordingly.

This function is the same as the C++ method OGRLayer::ReorderField().

@param hLayer handle to the layer.
@param iOldFieldPos previous position of the field to move. Must be in the range [0,GetFieldCount()-1].
@param iNewFieldPos new position of the field to move. Must be in the range [0,GetFieldCount()-1].

@return OGRERR_NONE on success.

@since OGR 1.9.0
*/

/**
\fn OGRErr OGRLayer::AlterFieldDefn( int iField, OGRFieldDefn* poNewFieldDefn, int nFlags );

\brief Alter the definition of an existing field on a layer.

You must use this to alter the definition of an existing field of a real layer.
Internally the OGRFeatureDefn for the layer will be updated
to reflect the altered field.  Applications should never modify the OGRFeatureDefn
used by a layer directly.

This method should not be called while there are feature objects in existance that
were obtained or created with the previous layer definition.

Not all drivers support this method. You can query a layer to check if it supports it
with the OLCAlterFieldDefn capability. Some drivers may only support this method while
there are still no features in the layer. When it is supported, the existings features of the
backing file/database should be updated accordingly. Some drivers might also not support
all update flags.

This function is the same as the C function OGR_L_AlterFieldDefn().

@param iField index of the field whose definition must be altered.
@param poNewFieldDefn new field definition
@param nFlags combination of ALTER_NAME_FLAG, ALTER_TYPE_FLAG and ALTER_WIDTH_PRECISION_FLAG
to indicate which of the name and/or type and/or width and precision fields from the new field
definition must be taken into account.

@return OGRERR_NONE on success.

@since OGR 1.9.0
*/

/**
\fn OGRErr OGR_L_AlterFieldDefn( OGRLayerH hLayer, int iField, OGRFieldDefnH hNewFieldDefn, int nFlags )

\brief Alter the definition of an existing field on a layer.

You must use this to alter the definition of an existing field of a real layer.
Internally the OGRFeatureDefn for the layer will be updated
to reflect the altered field.  Applications should never modify the OGRFeatureDefn
used by a layer directly.

This function should not be called while there are feature objects in existance that
were obtained or created with the previous layer definition.

Not all drivers support this function. You can query a layer to check if it supports it
with the OLCAlterFieldDefn capability. Some drivers may only support this method while
there are still no features in the layer. When it is supported, the existings features of the
backing file/database should be updated accordingly. Some drivers might also not support
all update flags.

This function is the same as the C++ method OGRLayer::AlterFieldDefn().

@param hLayer handle to the layer.
@param iField index of the field whose definition must be altered.
@param hNewFieldDefn new field definition
@param nFlags combination of ALTER_NAME_FLAG, ALTER_TYPE_FLAG and ALTER_WIDTH_PRECISION_FLAG
to indicate which of the name and/or type and/or width and precision fields from the new field
definition must be taken into account.

@return OGRERR_NONE on success.

@since OGR 1.9.0
*/

/**
 \fn  void OGRLayer::GetStyleTable();

 \brief Returns layer style table.
 
 This method is the same as the C function OGR_L_GetStyleTable().
 
 @return pointer to a style table which should not be modified or freed by the
 caller.
*/

/**
 \fn  void OGRLayer::SetStyleTable(OGRStyleTable *poStyleTable);

 \brief Set layer style table.
 
 This method operate exactly as OGRLayer::SetStyleTableDirectly() except
 that it does not assume ownership of the passed table.
 
 This method is the same as the C function OGR_L_SetStyleTable().
 
 @param poStyleTable pointer to style table to set

*/

/**
 \fn  void OGRLayer::SetStyleTableDirectly(OGRStyleTable *poStyleTable);

 \brief Set layer style table.
 
 This method operate exactly as OGRLayer::SetStyleTable() except that it
 assumes ownership of the passed table.
 
 This method is the same as the C function OGR_L_SetStyleTableDirectly().
 
 @param poStyleTable pointer to style table to set

*/

/**

 \fn OGRErr OGR_L_StartTransaction( OGRLayerH hLayer );

 \brief For datasources which support transactions, StartTransaction creates a transaction.

 If starting the transaction fails, will return 
 OGRERR_FAILURE. Datasources which do not support transactions will 
 always return OGRERR_NONE. 
 
 This function is the same as the C++ method OGRLayer::StartTransaction().

 @param hLayer handle to the layer 

 @return OGRERR_NONE on success.

*/

/**

 \fn OGRErr OGR_L_CommitTransaction( OGRLayerH hLayer );

 \brief For datasources which support transactions, CommitTransaction commits a transaction.

 If no transaction is active, or the commit fails, will return 
 OGRERR_FAILURE. Datasources which do not support transactions will 
 always return OGRERR_NONE. 

 This function is the same as the C++ method OGRLayer::CommitTransaction().

 @param hLayer handle to the layer

 @return OGRERR_NONE on success.

*/

/**

 \fn OGRErr OGR_L_RollbackTransaction( OGRLayerH hLayer );

 \brief For datasources which support transactions, RollbackTransaction will roll back a datasource to its state before the start of the current transaction. 
 If no transaction is active, or the rollback fails, will return  
 OGRERR_FAILURE. Datasources which do not support transactions will
 always return OGRERR_NONE. 

 This function is the same as the C++ method OGRLayer::RollbackTransaction().

 @param hLayer handle to the layer

 @return OGRERR_NONE on success.

*/

/**
 \fn const char *OGRLayer::GetFIDColumn();

 \brief This method returns the name of the underlying database column being used as the FID column, or "" if not supported.

 This method is the same as the C function OGR_L_GetFIDColumn().

 @return fid column name.
 
 */

/**
 \fn const char* OGR_L_GetFIDColumn(OGRLayerH hLayer);

 \brief This method returns the name of the underlying database column being used as the FID column, or "" if not supported.

 This method is the same as the C++ method OGRLayer::GetFIDColumn()

 @param hLayer handle to the layer
 @return fid column name.
 
 */

/**
 \fn const char *OGRLayer::GetGeometryColumn();

 \brief This method returns the name of the underlying database column being used as the geometry column, or "" if not supported.

 This method is the same as the C function OGR_L_GetGeometryColumn().

 @return geometry column name.
 
 */

/**
 \fn const char* OGR_L_GetGeometryColumn(OGRLayerH hLayer);

 \brief This method returns the name of the underlying database column being used as the geometry column, or "" if not supported.

 This method is the same as the C++ method OGRLayer::GetGeometryColumn()

 @param hLayer handle to the layer
 @return geometry column name.
 
 */

/**
 \fn OGRErr OGRLayer::SetIgnoredFields( const char **papszFields );

 \brief Set which fields can be omitted when retrieving features from the layer.

 If the driver supports this functionality (testable using OLCIgnoreFields capability), it will not fetch the specified fields
 in subsequent calls to GetFeature() / GetNextFeature() and thus save some processing time and/or bandwidth.

 Besides field names of the layers, the following special fields can be passed: "OGR_GEOMETRY" to ignore geometry and
 "OGR_STYLE" to ignore layer style.

 By default, no fields are ignored.

 This method is the same as the C function OGR_L_SetIgnoredFields()

 @param papszFields an array of field names terminated by NULL item. If NULL is passed, the ignored list is cleared.
 @return OGRERR_NONE if all field names have been resolved (even if the driver does not support this method)

 */

/**
 \fn OGRErr OGR_L_SetIgnoredFields( OGRLayerH, const char** papszFields);

 \brief Set which fields can be omitted when retrieving features from the layer.

 If the driver supports this functionality (testable using OLCIgnoreFields capability), it will not fetch the specified fields
 in subsequent calls to GetFeature() / GetNextFeature() and thus save some processing time and/or bandwidth.

 Besides field names of the layers, the following special fields can be passed: "OGR_GEOMETRY" to ignore geometry and
 "OGR_STYLE" to ignore layer style.

 By default, no fields are ignored.

 This method is the same as the C++ method OGRLayer::SetIgnoredFields()

 @param papszFields an array of field names terminated by NULL item. If NULL is passed, the ignored list is cleared.
 @return OGRERR_NONE if all field names have been resolved (even if the driver does not support this method)

 */