gdal 0.0.7 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/ext/gdal-ruby/gdal/extconf.rb +3 -0
- data/ext/gdal-ruby/gdal/gdal.cpp +1082 -679
- data/ext/gdal-ruby/gdalconst/extconf.rb +3 -0
- data/ext/gdal-ruby/gdalconst/gdalconst.c +122 -137
- data/ext/gdal-ruby/ogr/extconf.rb +3 -0
- data/ext/gdal-ruby/ogr/ogr.cpp +1450 -303
- data/ext/gdal-ruby/osr/extconf.rb +3 -0
- data/ext/gdal-ruby/osr/osr.cpp +291 -187
- data/ext/gdal-ruby/ruby-2.2-patch.rb +58 -0
- data/lib/gdal-ruby/version.rb +1 -1
- data/lib/gdal.rb +4 -0
- metadata +4 -2
@@ -1,11 +1,11 @@
|
|
1
1
|
/* ----------------------------------------------------------------------------
|
2
2
|
* This file was automatically generated by SWIG (http://www.swig.org).
|
3
|
-
* Version
|
4
|
-
*
|
5
|
-
* This file is not intended to be easily readable and contains a number of
|
3
|
+
* Version 3.0.5
|
4
|
+
*
|
5
|
+
* This file is not intended to be easily readable and contains a number of
|
6
6
|
* coding conventions designed to improve portability and efficiency. Do not make
|
7
|
-
* changes to this file unless you know what you are doing--modify the SWIG
|
8
|
-
* interface file instead.
|
7
|
+
* changes to this file unless you know what you are doing--modify the SWIG
|
8
|
+
* interface file instead.
|
9
9
|
* ----------------------------------------------------------------------------- */
|
10
10
|
|
11
11
|
#define SWIGRUBY
|
@@ -41,28 +41,28 @@
|
|
41
41
|
#ifndef SWIGUNUSED
|
42
42
|
# if defined(__GNUC__)
|
43
43
|
# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
|
44
|
-
# define SWIGUNUSED __attribute__ ((__unused__))
|
44
|
+
# define SWIGUNUSED __attribute__ ((__unused__))
|
45
45
|
# else
|
46
46
|
# define SWIGUNUSED
|
47
47
|
# endif
|
48
48
|
# elif defined(__ICC)
|
49
|
-
# define SWIGUNUSED __attribute__ ((__unused__))
|
49
|
+
# define SWIGUNUSED __attribute__ ((__unused__))
|
50
50
|
# else
|
51
|
-
# define SWIGUNUSED
|
51
|
+
# define SWIGUNUSED
|
52
52
|
# endif
|
53
53
|
#endif
|
54
54
|
|
55
55
|
#ifndef SWIG_MSC_UNSUPPRESS_4505
|
56
56
|
# if defined(_MSC_VER)
|
57
57
|
# pragma warning(disable : 4505) /* unreferenced local function has been removed */
|
58
|
-
# endif
|
58
|
+
# endif
|
59
59
|
#endif
|
60
60
|
|
61
61
|
#ifndef SWIGUNUSEDPARM
|
62
62
|
# ifdef __cplusplus
|
63
63
|
# define SWIGUNUSEDPARM(p)
|
64
64
|
# else
|
65
|
-
# define SWIGUNUSEDPARM(p) p SWIGUNUSED
|
65
|
+
# define SWIGUNUSEDPARM(p) p SWIGUNUSED
|
66
66
|
# endif
|
67
67
|
#endif
|
68
68
|
|
@@ -105,7 +105,7 @@
|
|
105
105
|
# define SWIGSTDCALL __stdcall
|
106
106
|
# else
|
107
107
|
# define SWIGSTDCALL
|
108
|
-
# endif
|
108
|
+
# endif
|
109
109
|
#endif
|
110
110
|
|
111
111
|
/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
|
@@ -150,28 +150,28 @@
|
|
150
150
|
#ifndef SWIGUNUSED
|
151
151
|
# if defined(__GNUC__)
|
152
152
|
# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
|
153
|
-
# define SWIGUNUSED __attribute__ ((__unused__))
|
153
|
+
# define SWIGUNUSED __attribute__ ((__unused__))
|
154
154
|
# else
|
155
155
|
# define SWIGUNUSED
|
156
156
|
# endif
|
157
157
|
# elif defined(__ICC)
|
158
|
-
# define SWIGUNUSED __attribute__ ((__unused__))
|
158
|
+
# define SWIGUNUSED __attribute__ ((__unused__))
|
159
159
|
# else
|
160
|
-
# define SWIGUNUSED
|
160
|
+
# define SWIGUNUSED
|
161
161
|
# endif
|
162
162
|
#endif
|
163
163
|
|
164
164
|
#ifndef SWIG_MSC_UNSUPPRESS_4505
|
165
165
|
# if defined(_MSC_VER)
|
166
166
|
# pragma warning(disable : 4505) /* unreferenced local function has been removed */
|
167
|
-
# endif
|
167
|
+
# endif
|
168
168
|
#endif
|
169
169
|
|
170
170
|
#ifndef SWIGUNUSEDPARM
|
171
171
|
# ifdef __cplusplus
|
172
172
|
# define SWIGUNUSEDPARM(p)
|
173
173
|
# else
|
174
|
-
# define SWIGUNUSEDPARM(p) p SWIGUNUSED
|
174
|
+
# define SWIGUNUSEDPARM(p) p SWIGUNUSED
|
175
175
|
# endif
|
176
176
|
#endif
|
177
177
|
|
@@ -214,7 +214,7 @@
|
|
214
214
|
# define SWIGSTDCALL __stdcall
|
215
215
|
# else
|
216
216
|
# define SWIGSTDCALL
|
217
|
-
# endif
|
217
|
+
# endif
|
218
218
|
#endif
|
219
219
|
|
220
220
|
/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
|
@@ -252,7 +252,7 @@
|
|
252
252
|
You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
|
253
253
|
creating a static or dynamic library from the SWIG runtime code.
|
254
254
|
In 99.9% of the cases, SWIG just needs to declare them as 'static'.
|
255
|
-
|
255
|
+
|
256
256
|
But only do this if strictly necessary, ie, if you have problems
|
257
257
|
with your compiler or suchlike.
|
258
258
|
*/
|
@@ -278,16 +278,16 @@
|
|
278
278
|
#define SWIG_POINTER_OWN 0x1
|
279
279
|
|
280
280
|
|
281
|
-
/*
|
281
|
+
/*
|
282
282
|
Flags/methods for returning states.
|
283
|
-
|
284
|
-
The SWIG conversion methods, as ConvertPtr, return an integer
|
283
|
+
|
284
|
+
The SWIG conversion methods, as ConvertPtr, return an integer
|
285
285
|
that tells if the conversion was successful or not. And if not,
|
286
286
|
an error code can be returned (see swigerrors.swg for the codes).
|
287
|
-
|
287
|
+
|
288
288
|
Use the following macros/flags to set or process the returning
|
289
289
|
states.
|
290
|
-
|
290
|
+
|
291
291
|
In old versions of SWIG, code such as the following was usually written:
|
292
292
|
|
293
293
|
if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
|
@@ -320,23 +320,23 @@
|
|
320
320
|
} else {
|
321
321
|
// fail code
|
322
322
|
}
|
323
|
-
|
323
|
+
|
324
324
|
I.e., now SWIG_ConvertPtr can return new objects and you can
|
325
325
|
identify the case and take care of the deallocation. Of course that
|
326
326
|
also requires SWIG_ConvertPtr to return new result values, such as
|
327
327
|
|
328
|
-
int SWIG_ConvertPtr(obj, ptr,...) {
|
329
|
-
if (<obj is ok>) {
|
330
|
-
if (<need new object>) {
|
331
|
-
*ptr = <ptr to new allocated object>;
|
332
|
-
return SWIG_NEWOBJ;
|
333
|
-
} else {
|
334
|
-
*ptr = <ptr to old object>;
|
335
|
-
return SWIG_OLDOBJ;
|
336
|
-
}
|
337
|
-
} else {
|
338
|
-
return SWIG_BADOBJ;
|
339
|
-
}
|
328
|
+
int SWIG_ConvertPtr(obj, ptr,...) {
|
329
|
+
if (<obj is ok>) {
|
330
|
+
if (<need new object>) {
|
331
|
+
*ptr = <ptr to new allocated object>;
|
332
|
+
return SWIG_NEWOBJ;
|
333
|
+
} else {
|
334
|
+
*ptr = <ptr to old object>;
|
335
|
+
return SWIG_OLDOBJ;
|
336
|
+
}
|
337
|
+
} else {
|
338
|
+
return SWIG_BADOBJ;
|
339
|
+
}
|
340
340
|
}
|
341
341
|
|
342
342
|
Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
|
@@ -350,17 +350,17 @@
|
|
350
350
|
int fooi(int);
|
351
351
|
|
352
352
|
and you call
|
353
|
-
|
353
|
+
|
354
354
|
food(1) // cast rank '1' (1 -> 1.0)
|
355
355
|
fooi(1) // cast rank '0'
|
356
356
|
|
357
357
|
just use the SWIG_AddCast()/SWIG_CheckState()
|
358
358
|
*/
|
359
359
|
|
360
|
-
#define SWIG_OK (0)
|
360
|
+
#define SWIG_OK (0)
|
361
361
|
#define SWIG_ERROR (-1)
|
362
362
|
#define SWIG_IsOK(r) (r >= 0)
|
363
|
-
#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
|
363
|
+
#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
|
364
364
|
|
365
365
|
/* The CastRankLimit says how many bits are used for the cast rank */
|
366
366
|
#define SWIG_CASTRANKLIMIT (1 << 8)
|
@@ -391,14 +391,14 @@
|
|
391
391
|
# endif
|
392
392
|
# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
|
393
393
|
# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
|
394
|
-
SWIGINTERNINLINE int SWIG_AddCast(int r) {
|
394
|
+
SWIGINTERNINLINE int SWIG_AddCast(int r) {
|
395
395
|
return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
|
396
396
|
}
|
397
|
-
SWIGINTERNINLINE int SWIG_CheckState(int r) {
|
398
|
-
return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
|
397
|
+
SWIGINTERNINLINE int SWIG_CheckState(int r) {
|
398
|
+
return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
|
399
399
|
}
|
400
400
|
#else /* no cast-rank mode */
|
401
|
-
# define SWIG_AddCast
|
401
|
+
# define SWIG_AddCast(r) (r)
|
402
402
|
# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
|
403
403
|
#endif
|
404
404
|
|
@@ -442,7 +442,7 @@ typedef struct swig_module_info {
|
|
442
442
|
void *clientdata; /* Language specific module data */
|
443
443
|
} swig_module_info;
|
444
444
|
|
445
|
-
/*
|
445
|
+
/*
|
446
446
|
Compare two type names skipping the space characters, therefore
|
447
447
|
"char*" == "char *" and "Class<int>" == "Class<int >", etc.
|
448
448
|
|
@@ -462,18 +462,18 @@ SWIG_TypeNameComp(const char *f1, const char *l1,
|
|
462
462
|
|
463
463
|
/*
|
464
464
|
Check type equivalence in a name list like <name1>|<name2>|...
|
465
|
-
Return 0 if
|
465
|
+
Return 0 if equal, -1 if nb < tb, 1 if nb > tb
|
466
466
|
*/
|
467
467
|
SWIGRUNTIME int
|
468
|
-
|
469
|
-
int equiv =
|
468
|
+
SWIG_TypeCmp(const char *nb, const char *tb) {
|
469
|
+
int equiv = 1;
|
470
470
|
const char* te = tb + strlen(tb);
|
471
471
|
const char* ne = nb;
|
472
|
-
while (
|
472
|
+
while (equiv != 0 && *ne) {
|
473
473
|
for (nb = ne; *ne; ++ne) {
|
474
474
|
if (*ne == '|') break;
|
475
475
|
}
|
476
|
-
equiv =
|
476
|
+
equiv = SWIG_TypeNameComp(nb, ne, tb, te);
|
477
477
|
if (*ne) ++ne;
|
478
478
|
}
|
479
479
|
return equiv;
|
@@ -481,24 +481,13 @@ SWIG_TypeEquiv(const char *nb, const char *tb) {
|
|
481
481
|
|
482
482
|
/*
|
483
483
|
Check type equivalence in a name list like <name1>|<name2>|...
|
484
|
-
Return 0 if equal,
|
484
|
+
Return 0 if not equal, 1 if equal
|
485
485
|
*/
|
486
486
|
SWIGRUNTIME int
|
487
|
-
|
488
|
-
|
489
|
-
const char* te = tb + strlen(tb);
|
490
|
-
const char* ne = nb;
|
491
|
-
while (!equiv && *ne) {
|
492
|
-
for (nb = ne; *ne; ++ne) {
|
493
|
-
if (*ne == '|') break;
|
494
|
-
}
|
495
|
-
equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
|
496
|
-
if (*ne) ++ne;
|
497
|
-
}
|
498
|
-
return equiv;
|
487
|
+
SWIG_TypeEquiv(const char *nb, const char *tb) {
|
488
|
+
return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
|
499
489
|
}
|
500
490
|
|
501
|
-
|
502
491
|
/*
|
503
492
|
Check the typename
|
504
493
|
*/
|
@@ -526,7 +515,7 @@ SWIG_TypeCheck(const char *c, swig_type_info *ty) {
|
|
526
515
|
return 0;
|
527
516
|
}
|
528
517
|
|
529
|
-
/*
|
518
|
+
/*
|
530
519
|
Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
|
531
520
|
*/
|
532
521
|
SWIGRUNTIME swig_cast_info *
|
@@ -561,7 +550,7 @@ SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
|
|
561
550
|
return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
|
562
551
|
}
|
563
552
|
|
564
|
-
/*
|
553
|
+
/*
|
565
554
|
Dynamic pointer casting. Down an inheritance hierarchy
|
566
555
|
*/
|
567
556
|
SWIGRUNTIME swig_type_info *
|
@@ -605,7 +594,7 @@ SWIG_TypePrettyName(const swig_type_info *type) {
|
|
605
594
|
return type->name;
|
606
595
|
}
|
607
596
|
|
608
|
-
/*
|
597
|
+
/*
|
609
598
|
Set the clientdata field for a type
|
610
599
|
*/
|
611
600
|
SWIGRUNTIME void
|
@@ -613,14 +602,14 @@ SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
|
|
613
602
|
swig_cast_info *cast = ti->cast;
|
614
603
|
/* if (ti->clientdata == clientdata) return; */
|
615
604
|
ti->clientdata = clientdata;
|
616
|
-
|
605
|
+
|
617
606
|
while (cast) {
|
618
607
|
if (!cast->converter) {
|
619
608
|
swig_type_info *tc = cast->type;
|
620
609
|
if (!tc->clientdata) {
|
621
610
|
SWIG_TypeClientData(tc, clientdata);
|
622
611
|
}
|
623
|
-
}
|
612
|
+
}
|
624
613
|
cast = cast->next;
|
625
614
|
}
|
626
615
|
}
|
@@ -629,31 +618,31 @@ SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
|
|
629
618
|
SWIG_TypeClientData(ti, clientdata);
|
630
619
|
ti->owndata = 1;
|
631
620
|
}
|
632
|
-
|
621
|
+
|
633
622
|
/*
|
634
623
|
Search for a swig_type_info structure only by mangled name
|
635
624
|
Search is a O(log #types)
|
636
|
-
|
637
|
-
We start searching at module start, and finish searching when start == end.
|
625
|
+
|
626
|
+
We start searching at module start, and finish searching when start == end.
|
638
627
|
Note: if start == end at the beginning of the function, we go all the way around
|
639
628
|
the circular list.
|
640
629
|
*/
|
641
630
|
SWIGRUNTIME swig_type_info *
|
642
|
-
SWIG_MangledTypeQueryModule(swig_module_info *start,
|
643
|
-
swig_module_info *end,
|
631
|
+
SWIG_MangledTypeQueryModule(swig_module_info *start,
|
632
|
+
swig_module_info *end,
|
644
633
|
const char *name) {
|
645
634
|
swig_module_info *iter = start;
|
646
635
|
do {
|
647
636
|
if (iter->size) {
|
648
|
-
|
649
|
-
|
637
|
+
size_t l = 0;
|
638
|
+
size_t r = iter->size - 1;
|
650
639
|
do {
|
651
640
|
/* since l+r >= 0, we can (>> 1) instead (/ 2) */
|
652
|
-
|
641
|
+
size_t i = (l + r) >> 1;
|
653
642
|
const char *iname = iter->types[i]->name;
|
654
643
|
if (iname) {
|
655
|
-
|
656
|
-
if (compare == 0) {
|
644
|
+
int compare = strcmp(name, iname);
|
645
|
+
if (compare == 0) {
|
657
646
|
return iter->types[i];
|
658
647
|
} else if (compare < 0) {
|
659
648
|
if (i) {
|
@@ -678,14 +667,14 @@ SWIG_MangledTypeQueryModule(swig_module_info *start,
|
|
678
667
|
Search for a swig_type_info structure for either a mangled name or a human readable name.
|
679
668
|
It first searches the mangled names of the types, which is a O(log #types)
|
680
669
|
If a type is not found it then searches the human readable names, which is O(#types).
|
681
|
-
|
682
|
-
We start searching at module start, and finish searching when start == end.
|
670
|
+
|
671
|
+
We start searching at module start, and finish searching when start == end.
|
683
672
|
Note: if start == end at the beginning of the function, we go all the way around
|
684
673
|
the circular list.
|
685
674
|
*/
|
686
675
|
SWIGRUNTIME swig_type_info *
|
687
|
-
SWIG_TypeQueryModule(swig_module_info *start,
|
688
|
-
swig_module_info *end,
|
676
|
+
SWIG_TypeQueryModule(swig_module_info *start,
|
677
|
+
swig_module_info *end,
|
689
678
|
const char *name) {
|
690
679
|
/* STEP 1: Search the name field using binary search */
|
691
680
|
swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
|
@@ -696,7 +685,7 @@ SWIG_TypeQueryModule(swig_module_info *start,
|
|
696
685
|
of the str field (the human readable name) */
|
697
686
|
swig_module_info *iter = start;
|
698
687
|
do {
|
699
|
-
|
688
|
+
size_t i = 0;
|
700
689
|
for (; i < iter->size; ++i) {
|
701
690
|
if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
|
702
691
|
return iter->types[i];
|
@@ -704,56 +693,56 @@ SWIG_TypeQueryModule(swig_module_info *start,
|
|
704
693
|
iter = iter->next;
|
705
694
|
} while (iter != end);
|
706
695
|
}
|
707
|
-
|
696
|
+
|
708
697
|
/* neither found a match */
|
709
698
|
return 0;
|
710
699
|
}
|
711
700
|
|
712
|
-
/*
|
701
|
+
/*
|
713
702
|
Pack binary data into a string
|
714
703
|
*/
|
715
704
|
SWIGRUNTIME char *
|
716
705
|
SWIG_PackData(char *c, void *ptr, size_t sz) {
|
717
706
|
static const char hex[17] = "0123456789abcdef";
|
718
|
-
|
719
|
-
|
707
|
+
const unsigned char *u = (unsigned char *) ptr;
|
708
|
+
const unsigned char *eu = u + sz;
|
720
709
|
for (; u != eu; ++u) {
|
721
|
-
|
710
|
+
unsigned char uu = *u;
|
722
711
|
*(c++) = hex[(uu & 0xf0) >> 4];
|
723
712
|
*(c++) = hex[uu & 0xf];
|
724
713
|
}
|
725
714
|
return c;
|
726
715
|
}
|
727
716
|
|
728
|
-
/*
|
717
|
+
/*
|
729
718
|
Unpack binary data from a string
|
730
719
|
*/
|
731
720
|
SWIGRUNTIME const char *
|
732
721
|
SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
|
733
|
-
|
734
|
-
|
722
|
+
unsigned char *u = (unsigned char *) ptr;
|
723
|
+
const unsigned char *eu = u + sz;
|
735
724
|
for (; u != eu; ++u) {
|
736
|
-
|
737
|
-
|
725
|
+
char d = *(c++);
|
726
|
+
unsigned char uu;
|
738
727
|
if ((d >= '0') && (d <= '9'))
|
739
728
|
uu = ((d - '0') << 4);
|
740
729
|
else if ((d >= 'a') && (d <= 'f'))
|
741
730
|
uu = ((d - ('a'-10)) << 4);
|
742
|
-
else
|
731
|
+
else
|
743
732
|
return (char *) 0;
|
744
733
|
d = *(c++);
|
745
734
|
if ((d >= '0') && (d <= '9'))
|
746
735
|
uu |= (d - '0');
|
747
736
|
else if ((d >= 'a') && (d <= 'f'))
|
748
737
|
uu |= (d - ('a'-10));
|
749
|
-
else
|
738
|
+
else
|
750
739
|
return (char *) 0;
|
751
740
|
*u = uu;
|
752
741
|
}
|
753
742
|
return c;
|
754
743
|
}
|
755
744
|
|
756
|
-
/*
|
745
|
+
/*
|
757
746
|
Pack 'void *' into a string buffer.
|
758
747
|
*/
|
759
748
|
SWIGRUNTIME char *
|
@@ -813,18 +802,18 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
|
|
813
802
|
#endif
|
814
803
|
|
815
804
|
/* Errors in SWIG */
|
816
|
-
#define SWIG_UnknownError -1
|
817
|
-
#define SWIG_IOError -2
|
818
|
-
#define SWIG_RuntimeError -3
|
819
|
-
#define SWIG_IndexError -4
|
820
|
-
#define SWIG_TypeError -5
|
821
|
-
#define SWIG_DivisionByZero -6
|
822
|
-
#define SWIG_OverflowError -7
|
823
|
-
#define SWIG_SyntaxError -8
|
824
|
-
#define SWIG_ValueError -9
|
805
|
+
#define SWIG_UnknownError -1
|
806
|
+
#define SWIG_IOError -2
|
807
|
+
#define SWIG_RuntimeError -3
|
808
|
+
#define SWIG_IndexError -4
|
809
|
+
#define SWIG_TypeError -5
|
810
|
+
#define SWIG_DivisionByZero -6
|
811
|
+
#define SWIG_OverflowError -7
|
812
|
+
#define SWIG_SyntaxError -8
|
813
|
+
#define SWIG_ValueError -9
|
825
814
|
#define SWIG_SystemError -10
|
826
815
|
#define SWIG_AttributeError -11
|
827
|
-
#define SWIG_MemoryError -12
|
816
|
+
#define SWIG_MemoryError -12
|
828
817
|
#define SWIG_NullReferenceError -13
|
829
818
|
|
830
819
|
|
@@ -1374,7 +1363,7 @@ SWIG_Ruby_AppendOutput(VALUE target, VALUE o) {
|
|
1374
1363
|
|
1375
1364
|
/* Runtime API */
|
1376
1365
|
|
1377
|
-
#define SWIG_GetModule(clientdata) SWIG_Ruby_GetModule()
|
1366
|
+
#define SWIG_GetModule(clientdata) SWIG_Ruby_GetModule(clientdata)
|
1378
1367
|
#define SWIG_SetModule(clientdata, pointer) SWIG_Ruby_SetModule(pointer)
|
1379
1368
|
|
1380
1369
|
|
@@ -1490,14 +1479,13 @@ SWIG_Ruby_InitRuntime(void)
|
|
1490
1479
|
SWIGRUNTIME void
|
1491
1480
|
SWIG_Ruby_define_class(swig_type_info *type)
|
1492
1481
|
{
|
1493
|
-
VALUE klass;
|
1494
1482
|
char *klass_name = (char *) malloc(4 + strlen(type->name) + 1);
|
1495
1483
|
sprintf(klass_name, "TYPE%s", type->name);
|
1496
1484
|
if (NIL_P(_cSWIG_Pointer)) {
|
1497
1485
|
_cSWIG_Pointer = rb_define_class_under(_mSWIG, "Pointer", rb_cObject);
|
1498
1486
|
rb_undef_method(CLASS_OF(_cSWIG_Pointer), "new");
|
1499
1487
|
}
|
1500
|
-
|
1488
|
+
rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer);
|
1501
1489
|
free((void *) klass_name);
|
1502
1490
|
}
|
1503
1491
|
|
@@ -1528,7 +1516,7 @@ SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
|
|
1528
1516
|
downcast methods. */
|
1529
1517
|
if (obj != Qnil) {
|
1530
1518
|
VALUE value = rb_iv_get(obj, "@__swigtype__");
|
1531
|
-
char* type_name = RSTRING_PTR(value);
|
1519
|
+
const char* type_name = RSTRING_PTR(value);
|
1532
1520
|
|
1533
1521
|
if (strcmp(type->name, type_name) == 0) {
|
1534
1522
|
return obj;
|
@@ -1710,7 +1698,7 @@ SWIG_Ruby_ConvertPacked(VALUE obj, void *ptr, int sz, swig_type_info *ty) {
|
|
1710
1698
|
}
|
1711
1699
|
|
1712
1700
|
SWIGRUNTIME swig_module_info *
|
1713
|
-
SWIG_Ruby_GetModule(void)
|
1701
|
+
SWIG_Ruby_GetModule(void *SWIGUNUSEDPARM(clientdata))
|
1714
1702
|
{
|
1715
1703
|
VALUE pointer;
|
1716
1704
|
swig_module_info *ret = 0;
|
@@ -1750,7 +1738,7 @@ SWIG_Ruby_SetModule(swig_module_info *pointer)
|
|
1750
1738
|
SWIGINTERN
|
1751
1739
|
int SWIG_Ruby_isCallable( VALUE proc )
|
1752
1740
|
{
|
1753
|
-
if ( rb_respond_to( proc, swig_call_id )
|
1741
|
+
if ( rb_respond_to( proc, swig_call_id ) )
|
1754
1742
|
return 1;
|
1755
1743
|
return 0;
|
1756
1744
|
}
|
@@ -1763,7 +1751,7 @@ int SWIG_Ruby_isCallable( VALUE proc )
|
|
1763
1751
|
SWIGINTERN
|
1764
1752
|
int SWIG_Ruby_arity( VALUE proc, int minimal )
|
1765
1753
|
{
|
1766
|
-
if ( rb_respond_to( proc, swig_arity_id )
|
1754
|
+
if ( rb_respond_to( proc, swig_arity_id ) )
|
1767
1755
|
{
|
1768
1756
|
VALUE num = rb_funcall( proc, swig_arity_id, 0 );
|
1769
1757
|
int arity = NUM2INT(num);
|
@@ -1806,7 +1794,7 @@ static VALUE mGdalconst;
|
|
1806
1794
|
#define SWIG_RUBY_THREAD_END_BLOCK
|
1807
1795
|
|
1808
1796
|
|
1809
|
-
#define SWIGVERSION
|
1797
|
+
#define SWIGVERSION 0x030005
|
1810
1798
|
#define SWIG_VERSION SWIGVERSION
|
1811
1799
|
|
1812
1800
|
|
@@ -1896,18 +1884,18 @@ static swig_cast_info *swig_cast_initial[] = {
|
|
1896
1884
|
|
1897
1885
|
/* -----------------------------------------------------------------------------
|
1898
1886
|
* Type initialization:
|
1899
|
-
* This problem is tough by the requirement that no dynamic
|
1900
|
-
* memory is used. Also, since swig_type_info structures store pointers to
|
1887
|
+
* This problem is tough by the requirement that no dynamic
|
1888
|
+
* memory is used. Also, since swig_type_info structures store pointers to
|
1901
1889
|
* swig_cast_info structures and swig_cast_info structures store pointers back
|
1902
|
-
* to swig_type_info structures, we need some lookup code at initialization.
|
1903
|
-
* The idea is that swig generates all the structures that are needed.
|
1904
|
-
* The runtime then collects these partially filled structures.
|
1905
|
-
* The SWIG_InitializeModule function takes these initial arrays out of
|
1890
|
+
* to swig_type_info structures, we need some lookup code at initialization.
|
1891
|
+
* The idea is that swig generates all the structures that are needed.
|
1892
|
+
* The runtime then collects these partially filled structures.
|
1893
|
+
* The SWIG_InitializeModule function takes these initial arrays out of
|
1906
1894
|
* swig_module, and does all the lookup, filling in the swig_module.types
|
1907
1895
|
* array with the correct data and linking the correct swig_cast_info
|
1908
1896
|
* structures together.
|
1909
1897
|
*
|
1910
|
-
* The generated swig_type_info structures are assigned
|
1898
|
+
* The generated swig_type_info structures are assigned statically to an initial
|
1911
1899
|
* array. We just loop through that array, and handle each type individually.
|
1912
1900
|
* First we lookup if this type has been already loaded, and if so, use the
|
1913
1901
|
* loaded structure instead of the generated one. Then we have to fill in the
|
@@ -1917,17 +1905,17 @@ static swig_cast_info *swig_cast_initial[] = {
|
|
1917
1905
|
* a column is one of the swig_cast_info structures for that type.
|
1918
1906
|
* The cast_initial array is actually an array of arrays, because each row has
|
1919
1907
|
* a variable number of columns. So to actually build the cast linked list,
|
1920
|
-
* we find the array of casts associated with the type, and loop through it
|
1908
|
+
* we find the array of casts associated with the type, and loop through it
|
1921
1909
|
* adding the casts to the list. The one last trick we need to do is making
|
1922
1910
|
* sure the type pointer in the swig_cast_info struct is correct.
|
1923
1911
|
*
|
1924
|
-
* First off, we lookup the cast->type name to see if it is already loaded.
|
1912
|
+
* First off, we lookup the cast->type name to see if it is already loaded.
|
1925
1913
|
* There are three cases to handle:
|
1926
1914
|
* 1) If the cast->type has already been loaded AND the type we are adding
|
1927
1915
|
* casting info to has not been loaded (it is in this module), THEN we
|
1928
1916
|
* replace the cast->type pointer with the type pointer that has already
|
1929
1917
|
* been loaded.
|
1930
|
-
* 2) If BOTH types (the one we are adding casting info to, and the
|
1918
|
+
* 2) If BOTH types (the one we are adding casting info to, and the
|
1931
1919
|
* cast->type) are loaded, THEN the cast info has already been loaded by
|
1932
1920
|
* the previous module so we just ignore it.
|
1933
1921
|
* 3) Finally, if cast->type has not already been loaded, then we add that
|
@@ -1951,9 +1939,7 @@ SWIGRUNTIME void
|
|
1951
1939
|
SWIG_InitializeModule(void *clientdata) {
|
1952
1940
|
size_t i;
|
1953
1941
|
swig_module_info *module_head, *iter;
|
1954
|
-
int
|
1955
|
-
|
1956
|
-
clientdata = clientdata;
|
1942
|
+
int init;
|
1957
1943
|
|
1958
1944
|
/* check to see if the circular list has been setup, if not, set it up */
|
1959
1945
|
if (swig_module.next==0) {
|
@@ -1972,27 +1958,23 @@ SWIG_InitializeModule(void *clientdata) {
|
|
1972
1958
|
/* This is the first module loaded for this interpreter */
|
1973
1959
|
/* so set the swig module into the interpreter */
|
1974
1960
|
SWIG_SetModule(clientdata, &swig_module);
|
1975
|
-
module_head = &swig_module;
|
1976
1961
|
} else {
|
1977
1962
|
/* the interpreter has loaded a SWIG module, but has it loaded this one? */
|
1978
|
-
found=0;
|
1979
1963
|
iter=module_head;
|
1980
1964
|
do {
|
1981
1965
|
if (iter==&swig_module) {
|
1982
|
-
|
1983
|
-
|
1966
|
+
/* Our module is already in the list, so there's nothing more to do. */
|
1967
|
+
return;
|
1984
1968
|
}
|
1985
1969
|
iter=iter->next;
|
1986
1970
|
} while (iter!= module_head);
|
1987
1971
|
|
1988
|
-
/*
|
1989
|
-
if (found) return;
|
1990
|
-
/* otherwise we must add out module into the list */
|
1972
|
+
/* otherwise we must add our module into the list */
|
1991
1973
|
swig_module.next = module_head->next;
|
1992
1974
|
module_head->next = &swig_module;
|
1993
1975
|
}
|
1994
1976
|
|
1995
|
-
/* When multiple
|
1977
|
+
/* When multiple interpreters are used, a module could have already been initialized in
|
1996
1978
|
a different interpreter, but not yet have a pointer in this interpreter.
|
1997
1979
|
In this case, we do not want to continue adding types... everything should be
|
1998
1980
|
set up already */
|
@@ -2006,7 +1988,7 @@ SWIG_InitializeModule(void *clientdata) {
|
|
2006
1988
|
swig_type_info *type = 0;
|
2007
1989
|
swig_type_info *ret;
|
2008
1990
|
swig_cast_info *cast;
|
2009
|
-
|
1991
|
+
|
2010
1992
|
#ifdef SWIGRUNTIME_DEBUG
|
2011
1993
|
printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
|
2012
1994
|
#endif
|
@@ -2033,7 +2015,7 @@ SWIG_InitializeModule(void *clientdata) {
|
|
2033
2015
|
/* Insert casting types */
|
2034
2016
|
cast = swig_module.cast_initial[i];
|
2035
2017
|
while (cast->type) {
|
2036
|
-
|
2018
|
+
|
2037
2019
|
/* Don't need to add information already in the list */
|
2038
2020
|
ret = 0;
|
2039
2021
|
#ifdef SWIGRUNTIME_DEBUG
|
@@ -2189,6 +2171,8 @@ SWIGEXPORT void Init_gdalconst(void) {
|
|
2189
2171
|
rb_define_const(mGdalconst, "GRA_CUBIC", SWIG_From_int((int)(GRA_Cubic)));
|
2190
2172
|
rb_define_const(mGdalconst, "GRA_CUBICSPLINE", SWIG_From_int((int)(GRA_CubicSpline)));
|
2191
2173
|
rb_define_const(mGdalconst, "GRA_LANCZOS", SWIG_From_int((int)(GRA_Lanczos)));
|
2174
|
+
rb_define_const(mGdalconst, "GRA_AVERAGE", SWIG_From_int((int)(GRA_Average)));
|
2175
|
+
rb_define_const(mGdalconst, "GRA_MODE", SWIG_From_int((int)(GRA_Mode)));
|
2192
2176
|
rb_define_const(mGdalconst, "GPI_GRAY", SWIG_From_int((int)(GPI_Gray)));
|
2193
2177
|
rb_define_const(mGdalconst, "GPI_RGB", SWIG_From_int((int)(GPI_RGB)));
|
2194
2178
|
rb_define_const(mGdalconst, "GPI_CMYK", SWIG_From_int((int)(GPI_CMYK)));
|
@@ -2219,6 +2203,7 @@ SWIGEXPORT void Init_gdalconst(void) {
|
|
2219
2203
|
rb_define_const(mGdalconst, "DMD_EXTENSION", SWIG_FromCharPtr(GDAL_DMD_EXTENSION));
|
2220
2204
|
rb_define_const(mGdalconst, "DMD_CREATIONOPTIONLIST", SWIG_FromCharPtr(GDAL_DMD_CREATIONOPTIONLIST));
|
2221
2205
|
rb_define_const(mGdalconst, "DMD_CREATIONDATATYPES", SWIG_FromCharPtr(GDAL_DMD_CREATIONDATATYPES));
|
2206
|
+
rb_define_const(mGdalconst, "DMD_SUBDATASETS", SWIG_FromCharPtr(GDAL_DMD_SUBDATASETS));
|
2222
2207
|
rb_define_const(mGdalconst, "DCAP_CREATE", SWIG_FromCharPtr(GDAL_DCAP_CREATE));
|
2223
2208
|
rb_define_const(mGdalconst, "DCAP_CREATECOPY", SWIG_FromCharPtr(GDAL_DCAP_CREATECOPY));
|
2224
2209
|
rb_define_const(mGdalconst, "DCAP_VIRTUALIO", SWIG_FromCharPtr(GDAL_DCAP_VIRTUALIO));
|