-
Notifications
You must be signed in to change notification settings - Fork 4
/
FFI.pm
2008 lines (1836 loc) · 107 KB
/
FFI.pm
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
package Geo::GDAL::FFI;
use v5.10;
use strict;
use warnings;
use Carp;
use PDL::Types ();
use Config (); # needed to silence some FFI::Platypus warnings
use FFI::Platypus;
use FFI::Platypus::Buffer;
require Exporter;
require B;
use Geo::GDAL::FFI::VSI;
use Geo::GDAL::FFI::VSI::File;
use Geo::GDAL::FFI::SpatialReference;
use Geo::GDAL::FFI::Object;
use Geo::GDAL::FFI::Driver;
use Geo::GDAL::FFI::Dataset;
use Geo::GDAL::FFI::Band;
use Geo::GDAL::FFI::Layer;
use Geo::GDAL::FFI::FeatureDefn;
use Geo::GDAL::FFI::FieldDefn;
use Geo::GDAL::FFI::GeomFieldDefn;
use Geo::GDAL::FFI::Feature;
use Geo::GDAL::FFI::Geometry;
our $VERSION = 0.0900;
our $DEBUG = 0;
our @ISA = qw(Exporter);
our @EXPORT_OK = qw(@errors GetVersionInfo SetErrorHandling UnsetErrorHandling
Capabilities OpenFlags DataTypes ResamplingMethods
FieldTypes FieldSubtypes Justifications ColorInterpretations
GeometryTypes GeometryFormats GridAlgorithms
GetDriver GetDrivers IdentifyDriver Open
HaveGEOS SetConfigOption GetConfigOption
FindFile PushFinderLocation PopFinderLocation FinderClean);
our %EXPORT_TAGS = (all => \@EXPORT_OK);
our $None = 0;
our $Debug = 1;
our $Warning = 2;
our $Failure = 3;
our $Fatal = 4;
our %ogr_errors = (
1 => 'NOT_ENOUGH_DATA',
2 => 'NOT_ENOUGH_MEMORY',
3 => 'UNSUPPORTED_GEOMETRY_TYPE',
4 => 'UNSUPPORTED_OPERATION',
5 => 'CORRUPT_DATA',
6 => 'FAILURE',
7 => 'UNSUPPORTED_SRS',
8 => 'INVALID_HANDLE',
9 => 'NON_EXISTING_FEATURE',
);
our $Read = 0;
our $Write = 1;
our @errors;
our %immutable;
my %parent_ref_hash;
my $instance;
sub SetErrorHandling {
return unless $instance;
return if exists $instance->{CPLErrorHandler};
$instance->{CPLErrorHandler} = $instance->{ffi}->closure(
sub {
my ($err_cat, $err_num, $msg) = @_;
if ($err_cat == $None) {
} elsif ($err_cat == $Debug) {
if ($DEBUG) {
print STDERR $msg;
}
} elsif ($err_cat == $Warning) {
warn $msg;
} else {
push @errors, $msg;
}
});
CPLPushErrorHandler($instance->{CPLErrorHandler});
}
sub UnsetErrorHandling {
return unless $instance;
return unless exists $instance->{CPLErrorHandler};
CPLPopErrorHandler($instance->{CPLErrorHandler});
delete $instance->{CPLErrorHandler};
}
sub error_msg {
my $args = shift;
return unless @errors || $args;
unless (@errors) {
return $ogr_errors{$args->{OGRError}} if $args->{OGRError};
return "Unknown error.";
}
my $msg = join("\n", @errors);
@errors = ();
return $msg;
}
# internal methods
sub _register_parent_ref {
my ($gdal_handle, $parent) = @_;
# ensure $gdal_handle is not blessed?
confess "gdal handle is undefined"
if !defined $gdal_handle;
confess "Parent ref is undefined"
if !$parent;
$parent_ref_hash{$gdal_handle} = $parent;
}
sub _deregister_parent_ref {
my ($gdal_handle) = @_;
# we get undef vals in global cleanup
return if !$gdal_handle;
delete $parent_ref_hash{$gdal_handle};
}
sub _get_parent_ref {
my ($gdal_handle) = @_;
warn "Attempting to access non-existent parent"
if !$parent_ref_hash{$gdal_handle};
return $parent_ref_hash{$gdal_handle}
}
our %capabilities = (
OPEN => 1,
CREATE => 2,
CREATECOPY => 3,
VIRTUALIO => 4,
RASTER => 5,
VECTOR => 6,
GNM => 7,
NOTNULL_FIELDS => 8,
DEFAULT_FIELDS => 9,
NOTNULL_GEOMFIELDS => 10,
NONSPATIAL => 11,
FEATURE_STYLES => 12,
);
sub Capabilities {
return sort {$capabilities{$a} <=> $capabilities{$b}} keys %capabilities;
}
our %open_flags = (
READONLY => 0x00,
UPDATE => 0x01,
ALL => 0x00,
RASTER => 0x02,
VECTOR => 0x04,
GNM => 0x08,
SHARED => 0x20,
VERBOSE_ERROR => 0x40,
INTERNAL => 0x80,
ARRAY_BLOCK_ACCESS => 0x100,
HASHSET_BLOCK_ACCESS => 0x200,
);
sub OpenFlags {
return sort {$open_flags{$a} <=> $open_flags{$b}} keys %open_flags;
}
our %data_types = (
Unknown => 0,
Byte => 1,
UInt16 => 2,
Int16 => 3,
UInt32 => 4,
Int32 => 5,
Float32 => 6,
Float64 => 7,
CInt16 => 8,
CInt32 => 9,
CFloat32 => 10,
CFloat64 => 11
);
our %data_types_reverse = reverse %data_types;
sub DataTypes {
return sort {$data_types{$a} <=> $data_types{$b}} keys %data_types;
}
our %rat_field_type = (
Integer => 0,
Real => 1,
String => 2
);
our %rat_field_usage = (
Generic => 0,
PixelCount => 1,
Name => 2,
Min => 3,
Max => 4,
MinMax => 5,
Red => 6,
Green => 7,
Blue => 8,
Alpha => 9,
RedMin => 10,
GreenMin => 11,
BlueMin => 12,
AlphaMin => 13,
RedMax => 14,
GreenMax => 15,
BlueMax => 16,
AlphaMax => 17,
);
our %rat_table_type = (
THEMATIC => 0,
ATHEMATIC => 1
);
our %resampling = (
NearestNeighbour => 0,
Bilinear => 1,
Cubic => 2,
CubicSpline => 3,
ORA_Lanczos => 4,
Average => 5,
Mode => 6,
Gauss => 7
);
sub ResamplingMethods {
return sort {$resampling{$a} <=> $resampling{$b}} keys %resampling;
}
our %data_type2pdl_data_type = (
Byte => $PDL::Types::PDL_B,
Int16 => $PDL::Types::PDL_S,
UInt16 => $PDL::Types::PDL_US,
Int32 => $PDL::Types::PDL_L,
Float32 => $PDL::Types::PDL_F,
Float64 => $PDL::Types::PDL_D,
);
our %pdl_data_type2data_type = reverse %data_type2pdl_data_type;
our %field_types = (
Integer => 0,
IntegerList => 1,
Real => 2,
RealList => 3,
String => 4,
StringList => 5,
#WideString => 6, # do not use
#WideStringList => 7, # do not use
Binary => 8,
Date => 9,
Time => 10,
DateTime => 11,
Integer64 => 12,
Integer64List => 13,
);
our %field_types_reverse = reverse %field_types;
sub FieldTypes {
return sort {$field_types{$a} <=> $field_types{$b}} keys %field_types;
}
our %field_subtypes = (
None => 0,
Boolean => 1,
Int16 => 2,
Float32 => 3
);
our %field_subtypes_reverse = reverse %field_subtypes;
sub FieldSubtypes {
return sort {$field_subtypes{$a} <=> $field_subtypes{$b}} keys %field_subtypes;
}
our %justification = (
Undefined => 0,
Left => 1,
Right => 2
);
our %justification_reverse = reverse %justification;
sub Justifications {
return sort {$justification{$a} <=> $justification{$b}} keys %justification;
}
our %color_interpretations = (
Undefined => 0,
GrayIndex => 1,
PaletteIndex => 2,
RedBand => 3,
GreenBand => 4,
BlueBand => 5,
AlphaBand => 6,
HueBand => 7,
SaturationBand => 8,
LightnessBand => 9,
CyanBand => 10,
MagentaBand => 11,
YellowBand => 12,
BlackBand => 13,
YCbCr_YBand => 14,
YCbCr_CbBand => 15,
YCbCr_CrBand => 16,
);
our %color_interpretations_reverse = reverse %color_interpretations;
sub ColorInterpretations {
return sort {$color_interpretations{$a} <=> $color_interpretations{$b}} keys %color_interpretations;
}
our %geometry_types = (
Unknown => 0,
Point => 1,
LineString => 2,
Polygon => 3,
MultiPoint => 4,
MultiLineString => 5,
MultiPolygon => 6,
GeometryCollection => 7,
CircularString => 8,
CompoundCurve => 9,
CurvePolygon => 10,
MultiCurve => 11,
MultiSurface => 12,
Curve => 13,
Surface => 14,
PolyhedralSurface => 15,
TIN => 16,
Triangle => 17,
None => 100,
LinearRing => 101,
CircularStringZ => 1008,
CompoundCurveZ => 1009,
CurvePolygonZ => 1010,
MultiCurveZ => 1011,
MultiSurfaceZ => 1012,
CurveZ => 1013,
SurfaceZ => 1014,
PolyhedralSurfaceZ => 1015,
TINZ => 1016,
TriangleZ => 1017,
PointM => 2001,
LineStringM => 2002,
PolygonM => 2003,
MultiPointM => 2004,
MultiLineStringM => 2005,
MultiPolygonM => 2006,
GeometryCollectionM => 2007,
CircularStringM => 2008,
CompoundCurveM => 2009,
CurvePolygonM => 2010,
MultiCurveM => 2011,
MultiSurfaceM => 2012,
CurveM => 2013,
SurfaceM => 2014,
PolyhedralSurfaceM => 2015,
TINM => 2016,
TriangleM => 2017,
PointZM => 3001,
LineStringZM => 3002,
PolygonZM => 3003,
MultiPointZM => 3004,
MultiLineStringZM => 3005,
MultiPolygonZM => 3006,
GeometryCollectionZM => 3007,
CircularStringZM => 3008,
CompoundCurveZM => 3009,
CurvePolygonZM => 3010,
MultiCurveZM => 3011,
MultiSurfaceZM => 3012,
CurveZM => 3013,
SurfaceZM => 3014,
PolyhedralSurfaceZM => 3015,
TINZM => 3016,
TriangleZM => 3017,
Point25D => 0x80000001,
LineString25D => 0x80000002,
Polygon25D => 0x80000003,
MultiPoint25D => 0x80000004,
MultiLineString25D => 0x80000005,
MultiPolygon25D => 0x80000006,
GeometryCollection25D => 0x80000007
);
our %geometry_types_reverse = reverse %geometry_types;
sub GeometryTypes {
return sort {$geometry_types{$a} <=> $geometry_types{$b}} keys %geometry_types;
}
our %geometry_formats = (
WKT => 1,
);
sub GeometryFormats {
return sort {$geometry_formats{$a} <=> $geometry_formats{$b}} keys %geometry_formats;
}
our %grid_algorithms = (
InverseDistanceToAPower => 1,
MovingAverage => 2,
NearestNeighbor => 3,
MetricMinimum => 4,
MetricMaximum => 5,
MetricRange => 6,
MetricCount => 7,
MetricAverageDistance => 8,
MetricAverageDistancePts => 9,
Linear => 10,
InverseDistanceToAPowerNearestNeighbor => 11
);
sub GridAlgorithms {
return sort {$grid_algorithms{$a} <=> $grid_algorithms{$b}} keys %grid_algorithms;
}
sub isint {
my $value = shift;
my $b_obj = B::svref_2object(\$value);
my $flags = $b_obj->FLAGS;
return 1 if $flags & B::SVp_IOK() && !($flags & B::SVp_NOK()) && !($flags & B::SVp_POK());
}
sub new {
my $class = shift;
return $instance if $instance;
my $ffi = FFI::Platypus->new;
$ffi->load_custom_type('::StringPointer' => 'string_pointer');
$ffi->lib(Alien::gdal->dynamic_libs);
$ffi->type('(pointer,size_t,size_t,opaque)->size_t' => 'VSIWriteFunction');
$ffi->type('(int,int,string)->void' => 'CPLErrorHandler');
$ffi->type('(double,string,pointer)->int' => 'GDALProgressFunc');
$ffi->type('(pointer,int, pointer,int,int,unsigned int,unsigned int,int,int)->int' => 'GDALDerivedPixelFunc');
$ffi->type('(pointer,int,int,pointer,pointer,pointer,pointer)->int' => 'GDALTransformerFunc');
$ffi->type('(double,int,pointer,pointer,pointer)->int' => 'GDALContourWriter');
# from port/*.h
eval{$ffi->attach(VSIMalloc => [qw/uint/] => 'opaque');};
croak "Can't attach to GDAL methods. Does Alien::gdal provide GDAL dynamic libs?" unless $class->can('VSIMalloc');
eval{$ffi->attach(VSIFree => ['opaque'] => 'void');};
eval{$ffi->attach(CPLError => [qw/int int string/] => 'void');};
eval{$ffi->attach(VSIFOpenL => [qw/string string/] => 'opaque');};
eval{$ffi->attach(VSIFOpenExL => [qw/string string int/] => 'opaque');};
eval{$ffi->attach(VSIFCloseL => ['opaque'] => 'int');};
eval{$ffi->attach(VSIFWriteL => [qw/opaque uint uint opaque/] => 'uint');};
eval{$ffi->attach(VSIFReadL => [qw/opaque uint uint opaque/] => 'uint');};
eval{$ffi->attach(VSIIngestFile => [qw/opaque string string_pointer uint64* sint64/] => 'int');};
eval{$ffi->attach(VSIMkdir => [qw/string sint64/] => 'int');};
eval{$ffi->attach(VSIRmdir => [qw/string/] => 'int');};
eval{$ffi->attach(VSIReadDirEx => [qw/string int/] => 'opaque');};
eval{$ffi->attach(VSIUnlink => [qw/string/] => 'int');};
eval{$ffi->attach(VSIRename => [qw/string string/] => 'int');};
eval{$ffi->attach(VSIStdoutSetRedirection => ['VSIWriteFunction', 'opaque'] => 'void');};
eval{$ffi->attach(CPLPushErrorHandler => ['CPLErrorHandler'] => 'void');};
eval{$ffi->attach(CPLPopErrorHandler => ['CPLErrorHandler'] => 'void');};
eval{$ffi->attach(CSLDestroy => ['opaque'] => 'void');};
eval{$ffi->attach(CSLAddString => ['opaque', 'string'] => 'opaque');};
eval{$ffi->attach(CSLCount => ['opaque'] => 'int');};
eval{$ffi->attach(CSLGetField => ['opaque', 'int'] => 'string');};
eval{$ffi->attach(CPLGetConfigOption => ['string', 'string'] => 'string');};
eval{$ffi->attach(CPLSetConfigOption => ['string', 'string'] => 'void');};
eval{$ffi->attach(CPLFindFile => ['string', 'string'] => 'string');};
eval{$ffi->attach(CPLPushFinderLocation => ['string'] => 'void');};
eval{$ffi->attach(CPLPopFinderLocation => [] => 'void');};
eval{$ffi->attach(CPLFinderClean => [] => 'void');};
# from ogr_core.h
eval{$ffi->attach( 'OGR_GT_Flatten' => ['unsigned int'] => 'unsigned int');};
# generated with parse_h.pl
# from gcore/gdal.h
eval{$ffi->attach('GDALGetDataTypeSize' => ['unsigned int'] => 'int');};
eval{$ffi->attach('GDALGetDataTypeSizeBits' => ['unsigned int'] => 'int');};
eval{$ffi->attach('GDALGetDataTypeSizeBytes' => ['unsigned int'] => 'int');};
eval{$ffi->attach('GDALDataTypeIsComplex' => ['unsigned int'] => 'int');};
eval{$ffi->attach('GDALDataTypeIsInteger' => ['unsigned int'] => 'int');};
eval{$ffi->attach('GDALDataTypeIsFloating' => ['unsigned int'] => 'int');};
eval{$ffi->attach('GDALDataTypeIsSigned' => ['unsigned int'] => 'int');};
eval{$ffi->attach('GDALGetDataTypeName' => ['unsigned int'] => 'string');};
eval{$ffi->attach('GDALGetDataTypeByName' => [qw/string/] => 'unsigned int');};
eval{$ffi->attach('GDALDataTypeUnion' => ['unsigned int','unsigned int'] => 'unsigned int');};
eval{$ffi->attach('GDALDataTypeUnionWithValue' => ['unsigned int','double','int'] => 'unsigned int');};
eval{$ffi->attach('GDALFindDataType' => [qw/int int int int/] => 'unsigned int');};
eval{$ffi->attach('GDALFindDataTypeForValue' => [qw/double int/] => 'unsigned int');};
eval{$ffi->attach('GDALAdjustValueToDataType' => ['unsigned int','double','int*','int*'] => 'double');};
eval{$ffi->attach('GDALGetNonComplexDataType' => ['unsigned int'] => 'unsigned int');};
eval{$ffi->attach('GDALDataTypeIsConversionLossy' => ['unsigned int','unsigned int'] => 'int');};
eval{$ffi->attach('GDALGetAsyncStatusTypeName' => ['unsigned int'] => 'string');};
eval{$ffi->attach('GDALGetAsyncStatusTypeByName' => [qw/string/] => 'unsigned int');};
eval{$ffi->attach('GDALGetColorInterpretationName' => ['unsigned int'] => 'string');};
eval{$ffi->attach('GDALGetColorInterpretationByName' => [qw/string/] => 'unsigned int');};
eval{$ffi->attach('GDALGetPaletteInterpretationName' => ['unsigned int'] => 'string');};
eval{$ffi->attach('GDALAllRegister' => [] => 'void');};
eval{$ffi->attach('GDALCreate' => ['opaque','string','int','int','int','unsigned int','opaque'] => 'opaque');};
eval{$ffi->attach('GDALCreateCopy' => [qw/opaque string opaque int opaque GDALProgressFunc opaque/] => 'opaque');};
eval{$ffi->attach('GDALIdentifyDriver' => [qw/string opaque/] => 'opaque');};
eval{$ffi->attach('GDALIdentifyDriverEx' => ['string','unsigned int','opaque','opaque'] => 'opaque');};
eval{$ffi->attach('GDALOpen' => ['string','unsigned int'] => 'opaque');};
eval{$ffi->attach('GDALOpenShared' => ['string','unsigned int'] => 'opaque');};
eval{$ffi->attach('GDALOpenEx' => ['string','unsigned int','opaque','opaque','opaque'] => 'opaque');};
eval{$ffi->attach('GDALDumpOpenDatasets' => [qw/opaque/] => 'int');};
eval{$ffi->attach('GDALGetDriverByName' => [qw/string/] => 'opaque');};
eval{$ffi->attach('GDALGetDriverCount' => [] => 'int');};
eval{$ffi->attach('GDALGetDriver' => [qw/int/] => 'opaque');};
eval{$ffi->attach('GDALCreateDriver' => [] => 'opaque');};
eval{$ffi->attach('GDALDestroyDriver' => [qw/opaque/] => 'void');};
eval{$ffi->attach('GDALRegisterDriver' => [qw/opaque/] => 'int');};
eval{$ffi->attach('GDALDeregisterDriver' => [qw/opaque/] => 'void');};
eval{$ffi->attach('GDALDestroyDriverManager' => [] => 'void');};
eval{$ffi->attach('GDALDestroy' => [] => 'void');};
eval{$ffi->attach('GDALDeleteDataset' => [qw/opaque string/] => 'int');};
eval{$ffi->attach('GDALRenameDataset' => [qw/opaque string string/] => 'int');};
eval{$ffi->attach('GDALCopyDatasetFiles' => [qw/opaque string string/] => 'int');};
eval{$ffi->attach('GDALValidateCreationOptions' => [qw/opaque opaque/] => 'int');};
eval{$ffi->attach('GDALGetDriverShortName' => [qw/opaque/] => 'string');};
eval{$ffi->attach('GDALGetDriverLongName' => [qw/opaque/] => 'string');};
eval{$ffi->attach('GDALGetDriverHelpTopic' => [qw/opaque/] => 'string');};
eval{$ffi->attach('GDALGetDriverCreationOptionList' => [qw/opaque/] => 'string');};
eval{$ffi->attach('GDALInitGCPs' => [qw/int opaque/] => 'void');};
eval{$ffi->attach('GDALDeinitGCPs' => [qw/int opaque/] => 'void');};
eval{$ffi->attach('GDALDuplicateGCPs' => [qw/int opaque/] => 'opaque');};
eval{$ffi->attach('GDALGCPsToGeoTransform' => [qw/int opaque double* int/] => 'int');};
eval{$ffi->attach('GDALInvGeoTransform' => [qw/double* double*/] => 'int');};
eval{$ffi->attach('GDALApplyGeoTransform' => [qw/double* double double double* double*/] => 'void');};
eval{$ffi->attach('GDALComposeGeoTransforms' => [qw/double* double* double*/] => 'void');};
eval{$ffi->attach('GDALGetMetadataDomainList' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('GDALGetMetadata' => [qw/opaque string/] => 'opaque');};
eval{$ffi->attach('GDALSetMetadata' => [qw/opaque opaque string/] => 'int');};
eval{$ffi->attach('GDALGetMetadataItem' => [qw/opaque string string/] => 'string');};
eval{$ffi->attach('GDALSetMetadataItem' => [qw/opaque string string string/] => 'int');};
eval{$ffi->attach('GDALGetDescription' => [qw/opaque/] => 'string');};
eval{$ffi->attach('GDALSetDescription' => [qw/opaque string/] => 'void');};
eval{$ffi->attach('GDALGetDatasetDriver' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('GDALGetFileList' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('GDALClose' => [qw/opaque/] => 'void');};
eval{$ffi->attach('GDALGetRasterXSize' => [qw/opaque/] => 'int');};
eval{$ffi->attach('GDALGetRasterYSize' => [qw/opaque/] => 'int');};
eval{$ffi->attach('GDALGetRasterCount' => [qw/opaque/] => 'int');};
eval{$ffi->attach('GDALGetRasterBand' => [qw/opaque int/] => 'opaque');};
eval{$ffi->attach('GDALAddBand' => ['opaque','unsigned int','opaque'] => 'int');};
eval{$ffi->attach('GDALBeginAsyncReader' => ['opaque','int','int','int','int','opaque','int','int','unsigned int','int','int*','int','int','int','opaque'] => 'opaque');};
eval{$ffi->attach('GDALEndAsyncReader' => [qw/opaque opaque/] => 'void');};
eval{$ffi->attach('GDALDatasetRasterIO' => ['opaque','unsigned int','int','int','int','int','opaque','int','int','unsigned int','int','int*','int','int','int'] => 'int');};
eval{$ffi->attach('GDALDatasetRasterIOEx' => ['opaque','unsigned int','int','int','int','int','opaque','int','int','unsigned int','int','int*','sint64','sint64','sint64','opaque'] => 'int');};
eval{$ffi->attach('GDALDatasetAdviseRead' => ['opaque','int','int','int','int','int','int','unsigned int','int','int*','opaque'] => 'int');};
eval{$ffi->attach('GDALGetProjectionRef' => [qw/opaque/] => 'string');};
eval{$ffi->attach('GDALGetSpatialRef' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('GDALSetProjection' => [qw/opaque string/] => 'int');};
eval{$ffi->attach('GDALSetSpatialRef' => [qw/opaque opaque/] => 'int');};
eval{$ffi->attach('GDALGetGeoTransform' => [qw/opaque double[6]/] => 'int');};
eval{$ffi->attach('GDALSetGeoTransform' => [qw/opaque double[6]/] => 'int');};
eval{$ffi->attach('GDALGetGCPCount' => [qw/opaque/] => 'int');};
eval{$ffi->attach('GDALGetGCPProjection' => [qw/opaque/] => 'string');};
eval{$ffi->attach('GDALGetGCPSpatialRef' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('GDALGetGCPs' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('GDALSetGCPs' => [qw/opaque int opaque string/] => 'int');};
eval{$ffi->attach('GDALSetGCPs2' => [qw/opaque int opaque opaque/] => 'int');};
eval{$ffi->attach('GDALGetInternalHandle' => [qw/opaque string/] => 'opaque');};
eval{$ffi->attach('GDALReferenceDataset' => [qw/opaque/] => 'int');};
eval{$ffi->attach('GDALDereferenceDataset' => [qw/opaque/] => 'int');};
eval{$ffi->attach('GDALReleaseDataset' => [qw/opaque/] => 'int');};
eval{$ffi->attach('GDALBuildOverviews' => [qw/opaque string int int* int int* GDALProgressFunc opaque/] => 'int');};
eval{$ffi->attach('GDALGetOpenDatasets' => [qw/uint64* int*/] => 'void');};
eval{$ffi->attach('GDALGetAccess' => [qw/opaque/] => 'int');};
eval{$ffi->attach('GDALFlushCache' => [qw/opaque/] => 'void');};
eval{$ffi->attach('GDALCreateDatasetMaskBand' => [qw/opaque int/] => 'int');};
eval{$ffi->attach('GDALDatasetCopyWholeRaster' => [qw/opaque opaque opaque GDALProgressFunc opaque/] => 'int');};
eval{$ffi->attach('GDALRasterBandCopyWholeRaster' => [qw/opaque opaque string_pointer GDALProgressFunc opaque/] => 'int');};
eval{$ffi->attach('GDALRegenerateOverviews' => [qw/opaque int uint64* string GDALProgressFunc opaque/] => 'int');};
eval{$ffi->attach('GDALDatasetGetLayerCount' => [qw/opaque/] => 'int');};
eval{$ffi->attach('GDALDatasetGetLayer' => [qw/opaque int/] => 'opaque');};
eval{$ffi->attach('GDALDatasetGetLayerByName' => [qw/opaque string/] => 'opaque');};
eval{$ffi->attach('GDALDatasetIsLayerPrivate' => [qw/opaque int/] => 'int');};
eval{$ffi->attach('GDALDatasetDeleteLayer' => [qw/opaque int/] => 'int');};
eval{$ffi->attach('GDALDatasetCreateLayer' => ['opaque','string','opaque','unsigned int','opaque'] => 'opaque');};
eval{$ffi->attach('GDALDatasetCopyLayer' => [qw/opaque opaque string opaque/] => 'opaque');};
eval{$ffi->attach('GDALDatasetResetReading' => [qw/opaque/] => 'void');};
eval{$ffi->attach('GDALDatasetGetNextFeature' => [qw/opaque uint64* double* GDALProgressFunc opaque/] => 'opaque');};
eval{$ffi->attach('GDALDatasetTestCapability' => [qw/opaque string/] => 'int');};
eval{$ffi->attach('GDALDatasetExecuteSQL' => [qw/opaque string opaque string/] => 'opaque');};
eval{$ffi->attach('GDALDatasetAbortSQL' => [qw/opaque/] => 'int');};
eval{$ffi->attach('GDALDatasetReleaseResultSet' => [qw/opaque opaque/] => 'void');};
eval{$ffi->attach('GDALDatasetGetStyleTable' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('GDALDatasetSetStyleTableDirectly' => [qw/opaque opaque/] => 'void');};
eval{$ffi->attach('GDALDatasetSetStyleTable' => [qw/opaque opaque/] => 'void');};
eval{$ffi->attach('GDALDatasetStartTransaction' => [qw/opaque int/] => 'int');};
eval{$ffi->attach('GDALDatasetCommitTransaction' => [qw/opaque/] => 'int');};
eval{$ffi->attach('GDALDatasetRollbackTransaction' => [qw/opaque/] => 'int');};
eval{$ffi->attach('GDALDatasetClearStatistics' => [qw/opaque/] => 'void');};
eval{$ffi->attach('GDALDatasetGetFieldDomain' => [qw/opaque string/] => 'opaque');};
eval{$ffi->attach('GDALDatasetAddFieldDomain' => [qw/opaque opaque string_pointer/] => 'bool');};
eval{$ffi->attach('GDALGetRasterDataType' => [qw/opaque/] => 'unsigned int');};
eval{$ffi->attach('GDALGetBlockSize' => [qw/opaque int* int*/] => 'void');};
eval{$ffi->attach('GDALGetActualBlockSize' => [qw/opaque int int int* int*/] => 'int');};
eval{$ffi->attach('GDALRasterAdviseRead' => ['opaque','int','int','int','int','int','int','unsigned int','opaque'] => 'int');};
eval{$ffi->attach('GDALRasterIO' => ['opaque','unsigned int','int','int','int','int','opaque','int','int','unsigned int','int','int'] => 'int');};
eval{$ffi->attach('GDALRasterIOEx' => ['opaque','unsigned int','int','int','int','int','opaque','int','int','unsigned int','sint64','sint64','opaque'] => 'int');};
eval{$ffi->attach('GDALReadBlock' => [qw/opaque int int opaque/] => 'int');};
eval{$ffi->attach('GDALWriteBlock' => [qw/opaque int int opaque/] => 'int');};
eval{$ffi->attach('GDALGetRasterBandXSize' => [qw/opaque/] => 'int');};
eval{$ffi->attach('GDALGetRasterBandYSize' => [qw/opaque/] => 'int');};
eval{$ffi->attach('GDALGetRasterAccess' => [qw/opaque/] => 'unsigned int');};
eval{$ffi->attach('GDALGetBandNumber' => [qw/opaque/] => 'int');};
eval{$ffi->attach('GDALGetBandDataset' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('GDALGetRasterColorInterpretation' => [qw/opaque/] => 'unsigned int');};
eval{$ffi->attach('GDALSetRasterColorInterpretation' => ['opaque','unsigned int'] => 'int');};
eval{$ffi->attach('GDALGetRasterColorTable' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('GDALSetRasterColorTable' => [qw/opaque opaque/] => 'int');};
eval{$ffi->attach('GDALHasArbitraryOverviews' => [qw/opaque/] => 'int');};
eval{$ffi->attach('GDALGetOverviewCount' => [qw/opaque/] => 'int');};
eval{$ffi->attach('GDALGetOverview' => [qw/opaque int/] => 'opaque');};
eval{$ffi->attach('GDALGetRasterNoDataValue' => [qw/opaque int*/] => 'double');};
eval{$ffi->attach('GDALSetRasterNoDataValue' => [qw/opaque double/] => 'int');};
eval{$ffi->attach('GDALDeleteRasterNoDataValue' => [qw/opaque/] => 'int');};
eval{$ffi->attach('GDALGetRasterCategoryNames' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('GDALSetRasterCategoryNames' => [qw/opaque opaque/] => 'int');};
eval{$ffi->attach('GDALGetRasterMinimum' => [qw/opaque int*/] => 'double');};
eval{$ffi->attach('GDALGetRasterMaximum' => [qw/opaque int*/] => 'double');};
eval{$ffi->attach('GDALGetRasterStatistics' => [qw/opaque int int double* double* double* double*/] => 'int');};
eval{$ffi->attach('GDALComputeRasterStatistics' => [qw/opaque int double* double* double* double* GDALProgressFunc opaque/] => 'int');};
eval{$ffi->attach('GDALSetRasterStatistics' => [qw/opaque double double double double/] => 'int');};
eval{$ffi->attach('GDALRasterBandAsMDArray' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('GDALGetRasterUnitType' => [qw/opaque/] => 'string');};
eval{$ffi->attach('GDALSetRasterUnitType' => [qw/opaque string/] => 'int');};
eval{$ffi->attach('GDALGetRasterOffset' => [qw/opaque int*/] => 'double');};
eval{$ffi->attach('GDALSetRasterOffset' => [qw/opaque double/] => 'int');};
eval{$ffi->attach('GDALGetRasterScale' => [qw/opaque int*/] => 'double');};
eval{$ffi->attach('GDALSetRasterScale' => [qw/opaque double/] => 'int');};
eval{$ffi->attach('GDALComputeRasterMinMax' => [qw/opaque int double/] => 'void');};
eval{$ffi->attach('GDALFlushRasterCache' => [qw/opaque/] => 'int');};
eval{$ffi->attach('GDALGetRasterHistogram' => [qw/opaque double double int int* int int GDALProgressFunc opaque/] => 'int');};
eval{$ffi->attach('GDALGetRasterHistogramEx' => [qw/opaque double double int uint64* int int GDALProgressFunc opaque/] => 'int');};
eval{$ffi->attach('GDALGetDefaultHistogram' => [qw/opaque double* double* int* int* int GDALProgressFunc opaque/] => 'int');};
eval{$ffi->attach('GDALGetDefaultHistogramEx' => [qw/opaque double* double* int* uint64* int GDALProgressFunc opaque/] => 'int');};
eval{$ffi->attach('GDALSetDefaultHistogram' => [qw/opaque double double int int*/] => 'int');};
eval{$ffi->attach('GDALSetDefaultHistogramEx' => [qw/opaque double double int uint64*/] => 'int');};
eval{$ffi->attach('GDALGetRandomRasterSample' => [qw/opaque int float*/] => 'int');};
eval{$ffi->attach('GDALGetRasterSampleOverview' => [qw/opaque int/] => 'opaque');};
eval{$ffi->attach('GDALGetRasterSampleOverviewEx' => [qw/opaque uint64/] => 'opaque');};
eval{$ffi->attach('GDALFillRaster' => [qw/opaque double double/] => 'int');};
eval{$ffi->attach('GDALComputeBandStats' => [qw/opaque int double* double* GDALProgressFunc opaque/] => 'int');};
eval{$ffi->attach('GDALOverviewMagnitudeCorrection' => [qw/opaque int uint64* GDALProgressFunc opaque/] => 'int');};
eval{$ffi->attach('GDALGetDefaultRAT' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('GDALSetDefaultRAT' => [qw/opaque opaque/] => 'int');};
eval{$ffi->attach('GDALAddDerivedBandPixelFunc' => [qw/string GDALDerivedPixelFunc/] => 'int');};
eval{$ffi->attach('GDALAddDerivedBandPixelFuncWithArgs' => [qw/string GDALDerivedPixelFunc string/] => 'int');};
eval{$ffi->attach('GDALGetMaskBand' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('GDALGetMaskFlags' => [qw/opaque/] => 'int');};
eval{$ffi->attach('GDALCreateMaskBand' => [qw/opaque int/] => 'int');};
eval{$ffi->attach('GDALGetDataCoverageStatus' => [qw/opaque int int int int int double*/] => 'int');};
eval{$ffi->attach('GDALARGetNextUpdatedRegion' => [qw/opaque double int* int* int* int*/] => 'unsigned int');};
eval{$ffi->attach('GDALARLockBuffer' => [qw/opaque double/] => 'int');};
eval{$ffi->attach('GDALARUnlockBuffer' => [qw/opaque/] => 'void');};
eval{$ffi->attach('GDALGeneralCmdLineProcessor' => [qw/int string_pointer int/] => 'int');};
eval{$ffi->attach('GDALSwapWords' => [qw/opaque int int int/] => 'void');};
eval{$ffi->attach('GDALSwapWordsEx' => [qw/opaque int size_t int/] => 'void');};
eval{$ffi->attach('GDALCopyWords' => ['opaque','unsigned int','int','opaque','unsigned int','int','int'] => 'void');};
eval{$ffi->attach('GDALCopyWords64' => ['opaque','unsigned int','int','opaque','unsigned int','int','int'] => 'void');};
eval{$ffi->attach('GDALCopyBits' => [qw/pointer int int pointer int int int int/] => 'void');};
eval{$ffi->attach('GDALLoadWorldFile' => [qw/string double*/] => 'int');};
eval{$ffi->attach('GDALReadWorldFile' => [qw/string string double*/] => 'int');};
eval{$ffi->attach('GDALWriteWorldFile' => [qw/string string double*/] => 'int');};
eval{$ffi->attach('GDALLoadTabFile' => [qw/string double* string_pointer int* opaque/] => 'int');};
eval{$ffi->attach('GDALReadTabFile' => [qw/string double* string_pointer int* opaque/] => 'int');};
eval{$ffi->attach('GDALLoadOziMapFile' => [qw/string double* string_pointer int* opaque/] => 'int');};
eval{$ffi->attach('GDALReadOziMapFile' => [qw/string double* string_pointer int* opaque/] => 'int');};
eval{$ffi->attach('GDALDecToDMS' => [qw/double string int/] => 'string');};
eval{$ffi->attach('GDALPackedDMSToDec' => [qw/double/] => 'double');};
eval{$ffi->attach('GDALDecToPackedDMS' => [qw/double/] => 'double');};
eval{$ffi->attach('GDALVersionInfo' => [qw/string/] => 'string');};
eval{$ffi->attach('GDALCheckVersion' => [qw/int int string/] => 'int');};
eval{$ffi->attach('GDALExtractRPCInfoV1' => [qw/opaque opaque/] => 'int');};
eval{$ffi->attach('GDALExtractRPCInfoV2' => [qw/opaque opaque/] => 'int');};
eval{$ffi->attach('GDALCreateColorTable' => ['unsigned int'] => 'opaque');};
eval{$ffi->attach('GDALDestroyColorTable' => [qw/opaque/] => 'void');};
eval{$ffi->attach('GDALCloneColorTable' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('GDALGetPaletteInterpretation' => [qw/opaque/] => 'unsigned int');};
eval{$ffi->attach('GDALGetColorEntryCount' => [qw/opaque/] => 'int');};
eval{$ffi->attach('GDALGetColorEntry' => [qw/opaque int/] => 'short[4]');};
eval{$ffi->attach('GDALGetColorEntryAsRGB' => [qw/opaque int short[4]/] => 'int');};
eval{$ffi->attach('GDALSetColorEntry' => [qw/opaque int short[4]/] => 'void');};
eval{$ffi->attach('GDALCreateColorRamp' => [qw/opaque int short[4] int short[4]/] => 'void');};
eval{$ffi->attach('GDALCreateRasterAttributeTable' => [] => 'opaque');};
eval{$ffi->attach('GDALDestroyRasterAttributeTable' => [qw/opaque/] => 'void');};
eval{$ffi->attach('GDALRATGetColumnCount' => [qw/opaque/] => 'int');};
eval{$ffi->attach('GDALRATGetNameOfCol' => [qw/opaque int/] => 'string');};
eval{$ffi->attach('GDALRATGetUsageOfCol' => [qw/opaque int/] => 'unsigned int');};
eval{$ffi->attach('GDALRATGetTypeOfCol' => [qw/opaque int/] => 'unsigned int');};
eval{$ffi->attach('GDALRATGetColOfUsage' => ['opaque','unsigned int'] => 'int');};
eval{$ffi->attach('GDALRATGetRowCount' => [qw/opaque/] => 'int');};
eval{$ffi->attach('GDALRATGetValueAsString' => [qw/opaque int int/] => 'string');};
eval{$ffi->attach('GDALRATGetValueAsInt' => [qw/opaque int int/] => 'int');};
eval{$ffi->attach('GDALRATGetValueAsDouble' => [qw/opaque int int/] => 'double');};
eval{$ffi->attach('GDALRATSetValueAsString' => [qw/opaque int int string/] => 'void');};
eval{$ffi->attach('GDALRATSetValueAsInt' => [qw/opaque int int int/] => 'void');};
eval{$ffi->attach('GDALRATSetValueAsDouble' => [qw/opaque int int double/] => 'void');};
eval{$ffi->attach('GDALRATChangesAreWrittenToFile' => [qw/opaque/] => 'int');};
eval{$ffi->attach('GDALRATValuesIOAsDouble' => ['opaque','unsigned int','int','int','int','double*'] => 'int');};
eval{$ffi->attach('GDALRATValuesIOAsInteger' => ['opaque','unsigned int','int','int','int','int*'] => 'int');};
eval{$ffi->attach('GDALRATValuesIOAsString' => ['opaque','unsigned int','int','int','int','opaque'] => 'int');};
eval{$ffi->attach('GDALRATSetRowCount' => [qw/opaque int/] => 'void');};
eval{$ffi->attach('GDALRATCreateColumn' => ['opaque','string','unsigned int','unsigned int'] => 'int');};
eval{$ffi->attach('GDALRATSetLinearBinning' => [qw/opaque double double/] => 'int');};
eval{$ffi->attach('GDALRATGetLinearBinning' => [qw/opaque double* double*/] => 'int');};
eval{$ffi->attach('GDALRATSetTableType' => ['opaque','unsigned int'] => 'int');};
eval{$ffi->attach('GDALRATGetTableType' => [qw/opaque/] => 'unsigned int');};
eval{$ffi->attach('GDALRATInitializeFromColorTable' => [qw/opaque opaque/] => 'int');};
eval{$ffi->attach('GDALRATTranslateToColorTable' => [qw/opaque int/] => 'opaque');};
eval{$ffi->attach('GDALRATDumpReadable' => [qw/opaque opaque/] => 'void');};
eval{$ffi->attach('GDALRATClone' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('GDALRATSerializeJSON' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('GDALRATGetRowOfValue' => [qw/opaque double/] => 'int');};
eval{$ffi->attach('GDALRATRemoveStatistics' => [qw/opaque/] => 'void');};
eval{$ffi->attach('GDALSetCacheMax' => [qw/int/] => 'void');};
eval{$ffi->attach('GDALGetCacheMax' => [] => 'int');};
eval{$ffi->attach('GDALGetCacheUsed' => [] => 'int');};
eval{$ffi->attach('GDALSetCacheMax64' => [qw/sint64/] => 'void');};
eval{$ffi->attach('GDALGetCacheMax64' => [] => 'sint64');};
eval{$ffi->attach('GDALGetCacheUsed64' => [] => 'sint64');};
eval{$ffi->attach('GDALFlushCacheBlock' => [] => 'int');};
eval{$ffi->attach('GDALDatasetGetVirtualMem' => ['opaque','unsigned int','int','int','int','int','int','int','unsigned int','int','int*','int','sint64','sint64','size_t','size_t','int','opaque'] => 'opaque');};
eval{$ffi->attach('GDALRasterBandGetVirtualMem' => ['opaque','unsigned int','int','int','int','int','int','int','unsigned int','int','sint64','size_t','size_t','int','opaque'] => 'opaque');};
eval{$ffi->attach('GDALGetVirtualMemAuto' => ['opaque','unsigned int','int*','sint64*','opaque'] => 'opaque');};
eval{$ffi->attach('GDALDatasetGetTiledVirtualMem' => ['opaque','unsigned int','int','int','int','int','int','int','unsigned int','int','int*','unsigned int','size_t','int','opaque'] => 'opaque');};
eval{$ffi->attach('GDALRasterBandGetTiledVirtualMem' => ['opaque','unsigned int','int','int','int','int','int','int','unsigned int','size_t','int','opaque'] => 'opaque');};
eval{$ffi->attach('GDALCreatePansharpenedVRT' => [qw/string opaque int uint64*/] => 'opaque');};
eval{$ffi->attach('GDALGetJPEG2000Structure' => [qw/string opaque/] => 'opaque');};
eval{$ffi->attach('GDALCreateMultiDimensional' => [qw/opaque string opaque opaque/] => 'opaque');};
eval{$ffi->attach('GDALExtendedDataTypeCreate' => ['unsigned int'] => 'opaque');};
eval{$ffi->attach('GDALExtendedDataTypeCreateString' => [qw/size_t/] => 'opaque');};
eval{$ffi->attach('GDALExtendedDataTypeCreateStringEx' => [qw/size_t int/] => 'opaque');};
eval{$ffi->attach('GDALExtendedDataTypeCreateCompound' => [qw/string size_t size_t opaque/] => 'opaque');};
eval{$ffi->attach('GDALExtendedDataTypeRelease' => [qw/opaque/] => 'void');};
eval{$ffi->attach('GDALExtendedDataTypeGetName' => [qw/opaque/] => 'string');};
eval{$ffi->attach('GDALExtendedDataTypeGetClass' => [qw/opaque/] => 'int');};
eval{$ffi->attach('GDALExtendedDataTypeGetNumericDataType' => [qw/opaque/] => 'unsigned int');};
eval{$ffi->attach('GDALExtendedDataTypeGetSize' => [qw/opaque/] => 'size_t');};
eval{$ffi->attach('GDALExtendedDataTypeGetMaxStringLength' => [qw/opaque/] => 'size_t');};
eval{$ffi->attach('GDALExtendedDataTypeGetComponents' => [qw/opaque size_t/] => 'uint64*');};
eval{$ffi->attach('GDALExtendedDataTypeFreeComponents' => [qw/uint64* size_t/] => 'void');};
eval{$ffi->attach('GDALExtendedDataTypeCanConvertTo' => [qw/opaque opaque/] => 'int');};
eval{$ffi->attach('GDALExtendedDataTypeEquals' => [qw/opaque opaque/] => 'int');};
eval{$ffi->attach('GDALExtendedDataTypeGetSubType' => [qw/opaque/] => 'int');};
eval{$ffi->attach('GDALEDTComponentCreate' => [qw/string size_t opaque/] => 'opaque');};
eval{$ffi->attach('GDALEDTComponentRelease' => [qw/opaque/] => 'void');};
eval{$ffi->attach('GDALEDTComponentGetName' => [qw/opaque/] => 'string');};
eval{$ffi->attach('GDALEDTComponentGetOffset' => [qw/opaque/] => 'size_t');};
eval{$ffi->attach('GDALEDTComponentGetType' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('GDALDatasetGetRootGroup' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('GDALGroupRelease' => [qw/opaque/] => 'void');};
eval{$ffi->attach('GDALGroupGetName' => [qw/opaque/] => 'string');};
eval{$ffi->attach('GDALGroupGetFullName' => [qw/opaque/] => 'string');};
eval{$ffi->attach('GDALGroupGetMDArrayNames' => [qw/opaque opaque/] => 'string_pointer');};
eval{$ffi->attach('GDALGroupOpenMDArray' => [qw/opaque string opaque/] => 'opaque');};
eval{$ffi->attach('GDALGroupOpenMDArrayFromFullname' => [qw/opaque string opaque/] => 'opaque');};
eval{$ffi->attach('GDALGroupResolveMDArray' => [qw/opaque string string opaque/] => 'opaque');};
eval{$ffi->attach('GDALGroupGetGroupNames' => [qw/opaque opaque/] => 'string_pointer');};
eval{$ffi->attach('GDALGroupOpenGroup' => [qw/opaque string opaque/] => 'opaque');};
eval{$ffi->attach('GDALGroupOpenGroupFromFullname' => [qw/opaque string opaque/] => 'opaque');};
eval{$ffi->attach('GDALGroupGetVectorLayerNames' => [qw/opaque opaque/] => 'string_pointer');};
eval{$ffi->attach('GDALGroupOpenVectorLayer' => [qw/opaque string opaque/] => 'opaque');};
eval{$ffi->attach('GDALGroupGetDimensions' => [qw/opaque size_t opaque/] => 'uint64*');};
eval{$ffi->attach('GDALGroupGetAttribute' => [qw/opaque string/] => 'opaque');};
eval{$ffi->attach('GDALGroupGetAttributes' => [qw/opaque size_t opaque/] => 'uint64*');};
eval{$ffi->attach('GDALGroupGetStructuralInfo' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('GDALGroupCreateGroup' => [qw/opaque string opaque/] => 'opaque');};
eval{$ffi->attach('GDALGroupCreateDimension' => [qw/opaque string string string uint64 opaque/] => 'opaque');};
eval{$ffi->attach('GDALGroupCreateMDArray' => [qw/opaque string size_t uint64* opaque opaque/] => 'opaque');};
eval{$ffi->attach('GDALGroupCreateAttribute' => [qw/opaque string size_t uint64* opaque opaque/] => 'opaque');};
eval{$ffi->attach('GDALMDArrayRelease' => [qw/opaque/] => 'void');};
eval{$ffi->attach('GDALMDArrayGetName' => [qw/opaque/] => 'string');};
eval{$ffi->attach('GDALMDArrayGetFullName' => [qw/opaque/] => 'string');};
eval{$ffi->attach('GDALMDArrayGetTotalElementsCount' => [qw/opaque/] => 'uint64');};
eval{$ffi->attach('GDALMDArrayGetDimensionCount' => [qw/opaque/] => 'size_t');};
eval{$ffi->attach('GDALMDArrayGetDimensions' => [qw/opaque size_t/] => 'uint64*');};
eval{$ffi->attach('GDALMDArrayGetDataType' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('GDALMDArrayRead' => [qw/opaque uint64* size_t int64 int* opaque opaque opaque size_t/] => 'int');};
eval{$ffi->attach('GDALMDArrayWrite' => [qw/opaque uint64* size_t int64 int* opaque opaque opaque size_t/] => 'int');};
eval{$ffi->attach('GDALMDArrayAdviseRead' => [qw/opaque uint64* size_t/] => 'int');};
eval{$ffi->attach('GDALMDArrayAdviseReadEx' => [qw/opaque uint64* size_t opaque/] => 'int');};
eval{$ffi->attach('GDALMDArrayGetAttribute' => [qw/opaque string/] => 'opaque');};
eval{$ffi->attach('GDALMDArrayGetAttributes' => [qw/opaque size_t opaque/] => 'uint64*');};
eval{$ffi->attach('GDALMDArrayCreateAttribute' => [qw/opaque string size_t uint64* opaque opaque/] => 'opaque');};
eval{$ffi->attach('GDALMDArrayGetRawNoDataValue' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('GDALMDArrayGetNoDataValueAsDouble' => [qw/opaque int*/] => 'double');};
eval{$ffi->attach('GDALMDArraySetRawNoDataValue' => [qw/opaque opaque/] => 'int');};
eval{$ffi->attach('GDALMDArraySetNoDataValueAsDouble' => [qw/opaque double/] => 'int');};
eval{$ffi->attach('GDALMDArraySetScale' => [qw/opaque double/] => 'int');};
eval{$ffi->attach('GDALMDArraySetScaleEx' => ['opaque','double','unsigned int'] => 'int');};
eval{$ffi->attach('GDALMDArrayGetScale' => [qw/opaque int*/] => 'double');};
eval{$ffi->attach('GDALMDArrayGetScaleEx' => ['opaque','int*','unsigned int'] => 'double');};
eval{$ffi->attach('GDALMDArraySetOffset' => [qw/opaque double/] => 'int');};
eval{$ffi->attach('GDALMDArraySetOffsetEx' => ['opaque','double','unsigned int'] => 'int');};
eval{$ffi->attach('GDALMDArrayGetOffset' => [qw/opaque int*/] => 'double');};
eval{$ffi->attach('GDALMDArrayGetOffsetEx' => ['opaque','int*','unsigned int'] => 'double');};
eval{$ffi->attach('GDALMDArrayGetBlockSize' => [qw/opaque size_t/] => 'uint64');};
eval{$ffi->attach('GDALMDArraySetUnit' => [qw/opaque string/] => 'int');};
eval{$ffi->attach('GDALMDArrayGetUnit' => [qw/opaque/] => 'string');};
eval{$ffi->attach('GDALMDArraySetSpatialRef' => [qw/opaque opaque/] => 'int');};
eval{$ffi->attach('GDALMDArrayGetSpatialRef' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('GDALMDArrayGetProcessingChunkSize' => [qw/opaque size_t size_t/] => 'size_t');};
eval{$ffi->attach('GDALMDArrayGetStructuralInfo' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('GDALMDArrayGetView' => [qw/opaque string/] => 'opaque');};
eval{$ffi->attach('GDALMDArrayTranspose' => [qw/opaque size_t int*/] => 'opaque');};
eval{$ffi->attach('GDALMDArrayGetUnscaled' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('GDALMDArrayGetMask' => [qw/opaque opaque/] => 'opaque');};
eval{$ffi->attach('GDALMDArrayAsClassicDataset' => [qw/opaque size_t size_t/] => 'opaque');};
eval{$ffi->attach('GDALMDArrayGetStatistics' => [qw/opaque opaque int int double* double* double* double* uint64 GDALProgressFunc opaque/] => 'int');};
eval{$ffi->attach('GDALMDArrayComputeStatistics' => [qw/opaque opaque int double* double* double* double* uint64 GDALProgressFunc opaque/] => 'int');};
eval{$ffi->attach('GDALMDArrayGetResampled' => [qw/opaque size_t opaque int opaque opaque/] => 'opaque');};
eval{$ffi->attach('GDALMDArrayGetCoordinateVariables' => [qw/opaque size_t/] => 'uint64*');};
eval{$ffi->attach('GDALReleaseArrays' => [qw/uint64* size_t/] => 'void');};
eval{$ffi->attach('GDALMDArrayCache' => [qw/opaque opaque/] => 'int');};
eval{$ffi->attach('GDALAttributeRelease' => [qw/opaque/] => 'void');};
eval{$ffi->attach('GDALReleaseAttributes' => [qw/uint64* size_t/] => 'void');};
eval{$ffi->attach('GDALAttributeGetName' => [qw/opaque/] => 'string');};
eval{$ffi->attach('GDALAttributeGetFullName' => [qw/opaque/] => 'string');};
eval{$ffi->attach('GDALAttributeGetTotalElementsCount' => [qw/opaque/] => 'uint64');};
eval{$ffi->attach('GDALAttributeGetDimensionCount' => [qw/opaque/] => 'size_t');};
eval{$ffi->attach('GDALAttributeGetDimensionsSize' => [qw/opaque size_t/] => 'uint64');};
eval{$ffi->attach('GDALAttributeGetDataType' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('GDALAttributeReadAsRaw' => [qw/opaque size_t/] => 'pointer');};
eval{$ffi->attach('GDALAttributeFreeRawResult' => [qw/opaque pointer size_t/] => 'void');};
eval{$ffi->attach('GDALAttributeReadAsString' => [qw/opaque/] => 'string');};
eval{$ffi->attach('GDALAttributeReadAsInt' => [qw/opaque/] => 'int');};
eval{$ffi->attach('GDALAttributeReadAsDouble' => [qw/opaque/] => 'double');};
eval{$ffi->attach('GDALAttributeReadAsStringArray' => [qw/opaque/] => 'string_pointer');};
eval{$ffi->attach('GDALAttributeReadAsIntArray' => [qw/opaque size_t/] => 'int*');};
eval{$ffi->attach('GDALAttributeReadAsDoubleArray' => [qw/opaque size_t/] => 'double*');};
eval{$ffi->attach('GDALAttributeWriteRaw' => [qw/opaque opaque size_t/] => 'int');};
eval{$ffi->attach('GDALAttributeWriteString' => [qw/opaque string/] => 'int');};
eval{$ffi->attach('GDALAttributeWriteStringArray' => [qw/opaque opaque/] => 'int');};
eval{$ffi->attach('GDALAttributeWriteInt' => [qw/opaque int/] => 'int');};
eval{$ffi->attach('GDALAttributeWriteDouble' => [qw/opaque double/] => 'int');};
eval{$ffi->attach('GDALAttributeWriteDoubleArray' => [qw/opaque double* size_t/] => 'int');};
eval{$ffi->attach('GDALDimensionRelease' => [qw/opaque/] => 'void');};
eval{$ffi->attach('GDALReleaseDimensions' => [qw/uint64* size_t/] => 'void');};
eval{$ffi->attach('GDALDimensionGetName' => [qw/opaque/] => 'string');};
eval{$ffi->attach('GDALDimensionGetFullName' => [qw/opaque/] => 'string');};
eval{$ffi->attach('GDALDimensionGetType' => [qw/opaque/] => 'string');};
eval{$ffi->attach('GDALDimensionGetDirection' => [qw/opaque/] => 'string');};
eval{$ffi->attach('GDALDimensionGetSize' => [qw/opaque/] => 'uint64');};
eval{$ffi->attach('GDALDimensionGetIndexingVariable' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('GDALDimensionSetIndexingVariable' => [qw/opaque opaque/] => 'int');};
# from ogr/ogr_api.h
eval{$ffi->attach('OGRGetGEOSVersion' => [qw/int* int* int*/] => 'bool');};
eval{$ffi->attach('OGR_G_CreateFromWkb' => [qw/string opaque uint64* int/] => 'int');};
eval{$ffi->attach('OGR_G_CreateFromWkbEx' => [qw/opaque opaque uint64* size_t/] => 'int');};
eval{$ffi->attach('OGR_G_CreateFromWkt' => [qw/string_pointer opaque uint64*/] => 'int');};
eval{$ffi->attach('OGR_G_CreateFromFgf' => [qw/string opaque uint64* int int*/] => 'int');};
eval{$ffi->attach('OGR_G_DestroyGeometry' => [qw/opaque/] => 'void');};
eval{$ffi->attach('OGR_G_CreateGeometry' => ['unsigned int'] => 'opaque');};
eval{$ffi->attach('OGR_G_ApproximateArcAngles' => [qw/double double double double double double double double double/] => 'opaque');};
eval{$ffi->attach('OGR_G_ForceToPolygon' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('OGR_G_ForceToLineString' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('OGR_G_ForceToMultiPolygon' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('OGR_G_ForceToMultiPoint' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('OGR_G_ForceToMultiLineString' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('OGR_G_ForceTo' => ['opaque','unsigned int','string_pointer'] => 'opaque');};
eval{$ffi->attach('OGR_G_RemoveLowerDimensionSubGeoms' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('OGR_G_GetDimension' => [qw/opaque/] => 'int');};
eval{$ffi->attach('OGR_G_GetCoordinateDimension' => [qw/opaque/] => 'int');};
eval{$ffi->attach('OGR_G_CoordinateDimension' => [qw/opaque/] => 'int');};
eval{$ffi->attach('OGR_G_SetCoordinateDimension' => [qw/opaque int/] => 'void');};
eval{$ffi->attach('OGR_G_Is3D' => [qw/opaque/] => 'int');};
eval{$ffi->attach('OGR_G_IsMeasured' => [qw/opaque/] => 'int');};
eval{$ffi->attach('OGR_G_Set3D' => [qw/opaque int/] => 'void');};
eval{$ffi->attach('OGR_G_SetMeasured' => [qw/opaque int/] => 'void');};
eval{$ffi->attach('OGR_G_Clone' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('OGR_G_GetEnvelope' => [qw/opaque double[4]/] => 'void');};
eval{$ffi->attach('OGR_G_GetEnvelope3D' => [qw/opaque double[6]/] => 'void');};
eval{$ffi->attach('OGR_G_ImportFromWkb' => [qw/opaque string int/] => 'int');};
eval{$ffi->attach('OGR_G_ExportToWkb' => ['opaque','unsigned int','string'] => 'int');};
eval{$ffi->attach('OGR_G_ExportToIsoWkb' => ['opaque','unsigned int','string'] => 'int');};
eval{$ffi->attach('OGR_G_WkbSize' => [qw/opaque/] => 'int');};
eval{$ffi->attach('OGR_G_WkbSizeEx' => [qw/opaque/] => 'size_t');};
eval{$ffi->attach('OGR_G_ImportFromWkt' => [qw/opaque string_pointer/] => 'int');};
eval{$ffi->attach('OGR_G_ExportToWkt' => [qw/opaque string_pointer/] => 'int');};
eval{$ffi->attach('OGR_G_ExportToIsoWkt' => [qw/opaque string_pointer/] => 'int');};
eval{$ffi->attach('OGR_G_GetGeometryType' => [qw/opaque/] => 'unsigned int');};
eval{$ffi->attach('OGR_G_GetGeometryName' => [qw/opaque/] => 'string');};
eval{$ffi->attach('OGR_G_DumpReadable' => [qw/opaque opaque string/] => 'void');};
eval{$ffi->attach('OGR_G_FlattenTo2D' => [qw/opaque/] => 'void');};
eval{$ffi->attach('OGR_G_CloseRings' => [qw/opaque/] => 'void');};
eval{$ffi->attach('OGR_G_CreateFromGML' => [qw/string/] => 'opaque');};
eval{$ffi->attach('OGR_G_ExportToGML' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('OGR_G_ExportToGMLEx' => [qw/opaque opaque/] => 'opaque');};
eval{$ffi->attach('OGR_G_CreateFromGMLTree' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('OGR_G_ExportToGMLTree' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('OGR_G_ExportEnvelopeToGMLTree' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('OGR_G_ExportToKML' => [qw/opaque string/] => 'opaque');};
eval{$ffi->attach('OGR_G_ExportToJson' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('OGR_G_ExportToJsonEx' => [qw/opaque opaque/] => 'opaque');};
eval{$ffi->attach('OGR_G_CreateGeometryFromJson' => [qw/string/] => 'opaque');};
eval{$ffi->attach('OGR_G_CreateGeometryFromEsriJson' => [qw/string/] => 'opaque');};
eval{$ffi->attach('OGR_G_AssignSpatialReference' => [qw/opaque opaque/] => 'void');};
eval{$ffi->attach('OGR_G_GetSpatialReference' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('OGR_G_Transform' => [qw/opaque opaque/] => 'int');};
eval{$ffi->attach('OGR_G_TransformTo' => [qw/opaque opaque/] => 'int');};
eval{$ffi->attach('OGR_GeomTransformer_Create' => [qw/opaque opaque/] => 'opaque');};
eval{$ffi->attach('OGR_GeomTransformer_Transform' => [qw/opaque opaque/] => 'opaque');};
eval{$ffi->attach('OGR_GeomTransformer_Destroy' => [qw/opaque/] => 'void');};
eval{$ffi->attach('OGR_G_Simplify' => [qw/opaque double/] => 'opaque');};
eval{$ffi->attach('OGR_G_SimplifyPreserveTopology' => [qw/opaque double/] => 'opaque');};
eval{$ffi->attach('OGR_G_DelaunayTriangulation' => [qw/opaque double int/] => 'opaque');};
eval{$ffi->attach('OGR_G_Segmentize' => [qw/opaque double/] => 'void');};
eval{$ffi->attach('OGR_G_Intersects' => [qw/opaque opaque/] => 'int');};
eval{$ffi->attach('OGR_G_Equals' => [qw/opaque opaque/] => 'int');};
eval{$ffi->attach('OGR_G_Disjoint' => [qw/opaque opaque/] => 'int');};
eval{$ffi->attach('OGR_G_Touches' => [qw/opaque opaque/] => 'int');};
eval{$ffi->attach('OGR_G_Crosses' => [qw/opaque opaque/] => 'int');};
eval{$ffi->attach('OGR_G_Within' => [qw/opaque opaque/] => 'int');};
eval{$ffi->attach('OGR_G_Contains' => [qw/opaque opaque/] => 'int');};
eval{$ffi->attach('OGR_G_Overlaps' => [qw/opaque opaque/] => 'int');};
eval{$ffi->attach('OGR_G_Boundary' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('OGR_G_ConvexHull' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('OGR_G_Buffer' => [qw/opaque double int/] => 'opaque');};
eval{$ffi->attach('OGR_G_Intersection' => [qw/opaque opaque/] => 'opaque');};
eval{$ffi->attach('OGR_G_Union' => [qw/opaque opaque/] => 'opaque');};
eval{$ffi->attach('OGR_G_UnionCascaded' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('OGR_G_PointOnSurface' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('OGR_G_Difference' => [qw/opaque opaque/] => 'opaque');};
eval{$ffi->attach('OGR_G_SymDifference' => [qw/opaque opaque/] => 'opaque');};
eval{$ffi->attach('OGR_G_Distance' => [qw/opaque opaque/] => 'double');};
eval{$ffi->attach('OGR_G_Distance3D' => [qw/opaque opaque/] => 'double');};
eval{$ffi->attach('OGR_G_Length' => [qw/opaque/] => 'double');};
eval{$ffi->attach('OGR_G_Area' => [qw/opaque/] => 'double');};
eval{$ffi->attach('OGR_G_Centroid' => [qw/opaque opaque/] => 'int');};
eval{$ffi->attach('OGR_G_Value' => [qw/opaque double/] => 'opaque');};
eval{$ffi->attach('OGR_G_Empty' => [qw/opaque/] => 'void');};
eval{$ffi->attach('OGR_G_IsEmpty' => [qw/opaque/] => 'int');};
eval{$ffi->attach('OGR_G_IsValid' => [qw/opaque/] => 'int');};
eval{$ffi->attach('OGR_G_MakeValid' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('OGR_G_MakeValidEx' => [qw/opaque opaque/] => 'opaque');};
eval{$ffi->attach('OGR_G_Normalize' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('OGR_G_IsSimple' => [qw/opaque/] => 'int');};
eval{$ffi->attach('OGR_G_IsRing' => [qw/opaque/] => 'int');};
eval{$ffi->attach('OGR_G_Polygonize' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('OGR_G_Intersect' => [qw/opaque opaque/] => 'int');};
eval{$ffi->attach('OGR_G_Equal' => [qw/opaque opaque/] => 'int');};
eval{$ffi->attach('OGR_G_SymmetricDifference' => [qw/opaque opaque/] => 'opaque');};
eval{$ffi->attach('OGR_G_GetArea' => [qw/opaque/] => 'double');};
eval{$ffi->attach('OGR_G_GetBoundary' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('OGR_G_GetPointCount' => [qw/opaque/] => 'int');};
eval{$ffi->attach('OGR_G_GetPoints' => [qw/opaque opaque int opaque int opaque int/] => 'int');};
eval{$ffi->attach('OGR_G_GetPointsZM' => [qw/opaque opaque int opaque int opaque int opaque int/] => 'int');};
eval{$ffi->attach('OGR_G_GetX' => [qw/opaque int/] => 'double');};
eval{$ffi->attach('OGR_G_GetY' => [qw/opaque int/] => 'double');};
eval{$ffi->attach('OGR_G_GetZ' => [qw/opaque int/] => 'double');};
eval{$ffi->attach('OGR_G_GetM' => [qw/opaque int/] => 'double');};
eval{$ffi->attach('OGR_G_GetPoint' => [qw/opaque int double* double* double*/] => 'void');};
eval{$ffi->attach('OGR_G_GetPointZM' => [qw/opaque int double* double* double* double*/] => 'void');};
eval{$ffi->attach('OGR_G_SetPointCount' => [qw/opaque int/] => 'void');};
eval{$ffi->attach('OGR_G_SetPoint' => [qw/opaque int double double double/] => 'void');};
eval{$ffi->attach('OGR_G_SetPoint_2D' => [qw/opaque int double double/] => 'void');};
eval{$ffi->attach('OGR_G_SetPointM' => [qw/opaque int double double double/] => 'void');};
eval{$ffi->attach('OGR_G_SetPointZM' => [qw/opaque int double double double double/] => 'void');};
eval{$ffi->attach('OGR_G_AddPoint' => [qw/opaque double double double/] => 'void');};
eval{$ffi->attach('OGR_G_AddPoint_2D' => [qw/opaque double double/] => 'void');};
eval{$ffi->attach('OGR_G_AddPointM' => [qw/opaque double double double/] => 'void');};
eval{$ffi->attach('OGR_G_AddPointZM' => [qw/opaque double double double double/] => 'void');};
eval{$ffi->attach('OGR_G_SetPoints' => [qw/opaque int opaque int opaque int opaque int/] => 'void');};
eval{$ffi->attach('OGR_G_SetPointsZM' => [qw/opaque int opaque int opaque int opaque int opaque int/] => 'void');};
eval{$ffi->attach('OGR_G_SwapXY' => [qw/opaque/] => 'void');};
eval{$ffi->attach('OGR_G_GetGeometryCount' => [qw/opaque/] => 'int');};
eval{$ffi->attach('OGR_G_GetGeometryRef' => [qw/opaque int/] => 'opaque');};
eval{$ffi->attach('OGR_G_AddGeometry' => [qw/opaque opaque/] => 'int');};
eval{$ffi->attach('OGR_G_AddGeometryDirectly' => [qw/opaque opaque/] => 'int');};
eval{$ffi->attach('OGR_G_RemoveGeometry' => [qw/opaque int int/] => 'int');};
eval{$ffi->attach('OGR_G_HasCurveGeometry' => [qw/opaque int/] => 'int');};
eval{$ffi->attach('OGR_G_GetLinearGeometry' => [qw/opaque double string_pointer/] => 'opaque');};
eval{$ffi->attach('OGR_G_GetCurveGeometry' => [qw/opaque string_pointer/] => 'opaque');};
eval{$ffi->attach('OGRBuildPolygonFromEdges' => [qw/opaque int int double int*/] => 'opaque');};
eval{$ffi->attach('OGRSetGenerate_DB2_V72_BYTE_ORDER' => [qw/int/] => 'int');};
eval{$ffi->attach('OGRGetGenerate_DB2_V72_BYTE_ORDER' => [] => 'int');};
eval{$ffi->attach('OGRSetNonLinearGeometriesEnabledFlag' => [qw/int/] => 'void');};
eval{$ffi->attach('OGRGetNonLinearGeometriesEnabledFlag' => [] => 'int');};
eval{$ffi->attach('OGRHasPreparedGeometrySupport' => [] => 'int');};
eval{$ffi->attach('OGRCreatePreparedGeometry' => [qw/opaque/] => 'opaque');};
eval{$ffi->attach('OGRDestroyPreparedGeometry' => [qw/opaque/] => 'void');};
eval{$ffi->attach('OGRPreparedGeometryIntersects' => [qw/opaque opaque/] => 'int');};
eval{$ffi->attach('OGRPreparedGeometryContains' => [qw/opaque opaque/] => 'int');};
eval{$ffi->attach('OGR_Fld_Create' => ['string','unsigned int'] => 'opaque');};
eval{$ffi->attach('OGR_Fld_Destroy' => [qw/opaque/] => 'void');};
eval{$ffi->attach('OGR_Fld_SetName' => [qw/opaque string/] => 'void');};
eval{$ffi->attach('OGR_Fld_GetNameRef' => [qw/opaque/] => 'string');};
eval{$ffi->attach('OGR_Fld_SetAlternativeName' => [qw/opaque string/] => 'void');};
eval{$ffi->attach('OGR_Fld_GetAlternativeNameRef' => [qw/opaque/] => 'string');};
eval{$ffi->attach('OGR_Fld_GetType' => [qw/opaque/] => 'unsigned int');};
eval{$ffi->attach('OGR_Fld_SetType' => ['opaque','unsigned int'] => 'void');};
eval{$ffi->attach('OGR_Fld_GetSubType' => [qw/opaque/] => 'unsigned int');};
eval{$ffi->attach('OGR_Fld_SetSubType' => ['opaque','unsigned int'] => 'void');};