ffi-gdal 1.0.0.beta1 → 1.0.0.beta3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b085e002a7e05915f5335245a0a316090d927c38
4
- data.tar.gz: c5e22d016ba55c3c421c03ad2e043befba56b8e6
3
+ metadata.gz: 9e43588d5789cf95019883b698d2b68b67281f35
4
+ data.tar.gz: b9b2ab12a3e3c9014ff2bb7d21b8bed1e899fffc
5
5
  SHA512:
6
- metadata.gz: ebeace61156bee523ef19aa7d4babd67fc0274e85b105d9bf54b5086c886615bcee9532c1e5b238dd611bcaac2e6eb209276da046a99581511e35a8aeecbaed0
7
- data.tar.gz: d0586998a7010b8f41d20018764f6daa06e0be1a3f563d5ad4e7dc6251ef7d2b5d38238e7b4d80203fff21f4eed4f11e1a14dbb9679e909927c9dcd049f9919f
6
+ metadata.gz: 9295b6fb9a37c545603887b71cc59b68013b1601543a6623f4a681adb816b7320ca100b7b4de0313ae236d6db3965a0c2b1d03e05eebab6cf25bb00ae5cbe591
7
+ data.tar.gz: 22947cf2a0b33db1ef198ac73fcc182259f0746061687cc727ffceeb8f471c17ae1e598966cc34536d41177601ea1dacdc8305af105a814053682f878fee5cef
data/History.md CHANGED
@@ -1,3 +1,35 @@
1
+ ### 1.0.0.beta3 / 2014-11-11
2
+
3
+ * Bug fixes
4
+ * `ogr/exceptions` wasn't being required for `ext/error_symbols.rb`, thus
5
+ any use of an OGR exception was causing a `NameError`.
6
+
7
+ ### 1.0.0.beta2 / 2014-10-23
8
+
9
+ * Improvements
10
+ * Added more documentation
11
+ * Uncommented `attach_function` calls that had been commented out due to
12
+ lack of support in versions I'd tested on. These get handled now on load.
13
+
14
+ ### 1.0.0.beta1 / 2014-10-23
15
+
16
+ * Lots of changes, so just the highlights here...
17
+ * API Improvements
18
+ * Added C and Ruby wrapper for most of OGR.
19
+ * Better handling of CPLErr return values.
20
+ * Allow loading, even when C functions aren't defined in the version of
21
+ GDAL that you're using.
22
+ * Split out additions to GDAL/OGR in `*_extensions.rb` modules. Methods
23
+ contained in `Extentions` modules don't directly wrap GDAL/OGR functions,
24
+ but either provide new functionality or attempt to make library usage more
25
+ Rubyesque.
26
+ * Added `#as_json`, `#to_json` to many classes.
27
+ * Internal Improvements
28
+ * Lots of cleanup of class internals.
29
+ * `autoload` child GDAL and OGR Ruby classes.
30
+ * Renamed files under ffi/ that were derived from GDAL/OGR header files to
31
+ include `_h` in the name.
32
+
1
33
  ### 0.0.4 / 2014-09-27
2
34
 
3
35
  * Bug fixes
@@ -1,4 +1,4 @@
1
- Copyright (c) 2014 Steve Loveless
1
+ Copyright (c) 2014 Agrian, Inc.
2
2
 
3
3
  MIT License
4
4
 
data/TODO.md CHANGED
@@ -1,7 +1,5 @@
1
- * Use autoload for C wrappers
2
1
  * Documentation
3
2
  * add more OGR::StyleTable
4
- * normalize c_pointer instance variable names
5
3
  * set attributes to instance variables
6
4
  * more GDALDriver
7
5
  * Finish MajorObject
@@ -0,0 +1,81 @@
1
+ require 'bundler/setup'
2
+ require 'pry'
3
+ require 'ffi-gdal'
4
+
5
+ GDAL::Logger.logging_enabled = true
6
+
7
+ colors = %w[644d1e 745924 856728 95742b a5812d b69930 c8b22d d8cb3c e8e65a
8
+ f4ee79 e0e457 c8da42 afd135 97b73c 7e993c 657e36 4b612c 314441 23295e
9
+ 282973]
10
+
11
+ floyd_path = File.join(__dir__, '../spec/support/images/Floyd/Floyd_1058_20140612_NRGB.tif')
12
+ floyd = GDAL::Dataset.open(floyd_path, 'r')
13
+
14
+ #---
15
+ # Extracting...
16
+ #---
17
+
18
+ # NIR
19
+ floyd.extract_nir('nir.tif', 1).close
20
+
21
+ # Natural Color
22
+ floyd.extract_natural_color('nc.tif', band_order: %i[nir red green blue]).close
23
+
24
+ # NDVI as Float32
25
+ floyd.extract_ndvi('ndvi_float.tif', band_order: %i[nir red green blue],
26
+ data_type: :GDT_Float32,
27
+ remove_negatives: true
28
+ ).close
29
+
30
+ # NDVI as Byte
31
+ floyd.extract_ndvi('ndvi_byte.tif', band_order: %i[nir red green blue],
32
+ data_type: :GDT_Byte,
33
+ remove_negatives: true,
34
+ photometric: 'PALETTE'
35
+ ).close
36
+
37
+ # NDVI as UInt16
38
+ floyd.extract_ndvi('ndvi_uint16.tif', band_order: %i[nir red green blue],
39
+ data_type: :GDT_UInt16,
40
+ remove_negatives: true,
41
+ photometric: 'PALETTE'
42
+ ).close
43
+
44
+ # GNDVI as Byte
45
+ floyd.extract_gndvi('gndvi_byte.tif', band_order: %i[nir red green blue],
46
+ data_type: :GDT_Byte,
47
+ remove_negatives: true,
48
+ photometric: 'PALETTE'
49
+ ).close
50
+
51
+ # GNDVI as UInt16
52
+ floyd.extract_gndvi('gndvi_uint16.tif', band_order: %i[nir red green blue],
53
+ data_type: :GDT_UInt16,
54
+ remove_negatives: true,
55
+ photometric: 'PALETTE'
56
+ ).close
57
+
58
+ #---
59
+ # Colorize after extraction...
60
+ #---
61
+
62
+ byte_dataset = GDAL::Dataset.open('ndvi_byte.tif', 'w')
63
+ byte_band = byte_dataset.raster_band(1)
64
+ byte_band.colorize!(*colors)
65
+ byte_dataset.close
66
+
67
+ uint16_dataset = GDAL::Dataset.open('ndvi_uint16.tif', 'w')
68
+ uint16_band = uint16_dataset.raster_band(1)
69
+ uint16_band.colorize!(*colors)
70
+ uint16_dataset.close
71
+
72
+ g_byte_dataset = GDAL::Dataset.open('gndvi_byte.tif', 'w')
73
+ g_byte_band = g_byte_dataset.raster_band(1)
74
+ g_byte_band.colorize!(*colors)
75
+ g_byte_dataset.close
76
+
77
+ g_uint16_dataset = GDAL::Dataset.open('gndvi_uint16.tif', 'w')
78
+ g_uint16_band = g_uint16_dataset.raster_band(1)
79
+ g_uint16_band.colorize!(*colors)
80
+ g_uint16_dataset.close
81
+
@@ -43,21 +43,9 @@ multi_polygon = OGR::Geometry.create_from_wkt(multi_polygon_wkt)
43
43
  # boundary: #{boundary}
44
44
  # POINT
45
45
  #
46
- def things(geometry)
47
- geometry = geometry.clone
48
- ls = geometry.to_line_string
49
- mls = geometry.to_multi_line_string
50
- #mpoint = geometry.to_multi_point
51
- #mpolygon = geometry.to_multi_polygon
52
- polygon = geometry.to_polygon
53
-
54
- {
55
- line_string_points: ls ? ls.point_count : nil,
56
- multi_line_string_points: mls ? mls.point_count : nil,
57
- #multi_point_points: mpoint ? mpoint.point_count : nil,
58
- #multi_polygon_points: mpolygon ? mpolygon.point_count : nil,
59
- #polygon_points: polygon ? polygon.point_count : nil
60
- }
61
- end
46
+
47
+ geometry = geometry.clone
48
+ ls = geometry.to_line_string
49
+ mls = geometry.to_multi_line_string
62
50
 
63
51
  binding.pry
@@ -8,7 +8,7 @@ GDAL::Logger.logging_enabled = true
8
8
  # http://pcjericks.github.io/py-gdalogr-cookbook/vector_layers.html#create-a-new-layer-from-the-extent-of-an-existing-layer
9
9
 
10
10
  # Get a Layer's Extent
11
- data_source = OGR::DataSource.open('spec/support/shapefiles/states_21basic/states.shp', 'r')
11
+ data_source = OGR::DataSource.open('../spec/support/shapefiles/states_21basic/states.shp', 'r')
12
12
  layer = data_source.layer(0)
13
13
  extent = layer.extent
14
14
 
@@ -0,0 +1,46 @@
1
+ require 'RMagick'
2
+ require 'bundler/setup'
3
+ require 'pry'
4
+ require 'ffi-gdal'
5
+
6
+ GDAL::Logger.logging_enabled = true
7
+
8
+ floyd_too_big_wkt = 'MULTIPOLYGON (((-87.55634718933241 31.168633650404765, -87.552227316286 31.16870709121005, -87.55234533348232 31.169808696448463, -87.5478606800096 31.1698913163249, -87.54777484932141 31.168679550914895, -87.54380517997858 31.168615290194918, -87.54396611251944 31.16511760526154, -87.55647593536513 31.164906454793982, -87.55634718933241 31.168633650404765)))'
9
+ floyd_wkt = 'MULTIPOLYGON (((-87.5530099868775 31.16710573359053,-87.5530099868775 31.165600160261103,-87.55384683609009 31.16710573359053,-87.5530099868775 31.16710573359053)))'
10
+ floyd_srid = 4326
11
+
12
+ harper_path = '/Users/sloveless/Development/projects/ffi-gdal/spec/support/images/Harper/Harper_1058_20140612_NRGB.tif'
13
+ harper = GDAL::Dataset.open(harper_path, 'r')
14
+
15
+ floyd_path = '/Users/sloveless/Development/projects/ffi-gdal/spec/support/images/Floyd/Floyd_1058_20140612_NRGB.tif'
16
+ floyd = GDAL::Dataset.open(floyd_path, 'r')
17
+
18
+ spatial_ref = OGR::SpatialReference.new(floyd.projection)
19
+ floyd_geometry = OGR::Geometry.create_from_wkt(floyd_wkt, spatial_ref)
20
+
21
+ usg_path = '/Users/sloveless/Development/projects/ffi-gdal/spec/support/images/osgeo/geotiff/usgs/c41078a1.tif'
22
+ usg = GDAL::Dataset.open(usg_path, 'r')
23
+
24
+ world_file_path = "#{__dir__}/spec/support/worldfiles/SR_50M/SR_50M.tif"
25
+ world_file = GDAL::GeoTransform.from_world_file(world_file_path, 'tfw')
26
+
27
+ binding.pry
28
+
29
+ #floyd.image_warp('meow.tif', 'GTiff', 1, cutline: floyd_geometry )
30
+ #extract_ndvi(floyd, 'ndvi.tif', floyd_wkt)
31
+
32
+ def warp_to_geometry(dataset, wkt_geometry)
33
+
34
+ # Create an OGR::Geometry from the WKT and convert to dataset's projection.
35
+ wkt_spatial_ref = OGR::SpatialReference.new_from_epsg(4326)
36
+ geometry = OGR::Geometry.create_from_wkt(wkt_geometry, wkt_spatial_ref)
37
+ geometry.transform_to!(dataset.spatial_reference)
38
+
39
+ binding.pry
40
+ # Create a .shp from the geometry
41
+ shape = geometry.to_vector('geom.shp', 'ESRI Shapefile',
42
+ spatial_reference: dataset.spatial_reference)
43
+ shape.close
44
+ end
45
+
46
+ #warp_to_geometry(floyd, floyd_wkt)
@@ -1,4 +1,5 @@
1
1
  require_relative '../gdal/exceptions'
2
+ require_relative '../ogr/exceptions'
2
3
 
3
4
 
4
5
  class ::Symbol
@@ -109,7 +109,7 @@ module FFI
109
109
  attach_function :CPLCloseShared, %i[pointer], :void
110
110
  attach_function :CPLGetSharedList, %i[pointer], :pointer
111
111
  attach_function :CPLDumpSharedList, %i[pointer], :void
112
- #attach_function :CPLCleanupSharedFileMutex, %i[], :void
112
+ attach_function :CPLCleanupSharedFileMutex, %i[], :void
113
113
 
114
114
  attach_function :CPLDMSToDec, %i[string], :double
115
115
  attach_function :CPLDecToDMS, %i[double string int], :string
@@ -123,21 +123,21 @@ module FFI
123
123
  #---------
124
124
  # Zip Files
125
125
  #---------
126
- #attach_function :CPLCreateZip, %i[string pointer], :pointer
127
- #attach_function :CPLCreateFileInZip, %i[pointer string pointer], CPLErr
128
- #attach_function :CPLWriteFileInZip, %i[pointer pointer int], CPLErr
129
- #attach_function :CPLCloseFileInZip, %i[pointer], CPLErr
130
- #attach_function :CPLCloseZip, %i[pointer], CPLErr
131
- #attach_function :CPLZLibDeflate,
132
- # %i[pointer size_t int pointer size_t pointer],
133
- # :pointer
134
- #attach_function :CPLZLibInflate,
135
- # %i[pointer size_t pointer size_t pointer],
136
- # :pointer
126
+ attach_function :CPLCreateZip, %i[string pointer], :pointer
127
+ attach_function :CPLCreateFileInZip, %i[pointer string pointer], CPLErr
128
+ attach_function :CPLWriteFileInZip, %i[pointer pointer int], CPLErr
129
+ attach_function :CPLCloseFileInZip, %i[pointer], CPLErr
130
+ attach_function :CPLCloseZip, %i[pointer], CPLErr
131
+ attach_function :CPLZLibDeflate,
132
+ %i[pointer size_t int pointer size_t pointer],
133
+ :pointer
134
+ attach_function :CPLZLibInflate,
135
+ %i[pointer size_t pointer size_t pointer],
136
+ :pointer
137
137
 
138
- #attach_function :CPLValidateXML, %i[string string pointer], :int
139
- #attach_function :CPLsetlocale, %i[int string], :string
138
+ attach_function :CPLValidateXML, %i[string string pointer], :int
139
+ attach_function :CPLsetlocale, %i[int string], :string
140
140
 
141
- #attach_function :CPLCleanupSetlocaleMutex, %i[], :void
141
+ attach_function :CPLCleanupSetlocaleMutex, %i[], :void
142
142
  end
143
143
  end
@@ -20,18 +20,18 @@ module FFI
20
20
  #------------------------------------------------------------------------
21
21
  attach_function :CPLError, [CPLErr, :int, :string], :void
22
22
  attach_function :CPLErrorV, [CPLErr, :int, :string, :pointer], :void
23
- #attach_function :CPLEmergencyError, [:void], :void
23
+ attach_function :CPLEmergencyError, [:void], :void
24
24
  attach_function :CPLErrorReset, [:void], :void
25
25
 
26
26
  attach_function :CPLGetLastErrorNo, [:void], :int
27
27
  attach_function :CPLGetLastErrorType, [:void], CPLErr
28
28
  attach_function :CPLGetLastErrorMsg, [:void], :string
29
29
 
30
- #attach_function :CPLGetErrorHandlerUserData, [:void], :pointer
31
- #attach_function :CPLErrorSetState,
32
- #[CPLErr, :int, :string],
33
- #:void
34
- #attach_function :CPLCleanupErrorMutex, [:void], :void
30
+ attach_function :CPLGetErrorHandlerUserData, [:void], :pointer
31
+ attach_function :CPLErrorSetState,
32
+ [CPLErr, :int, :string],
33
+ :void
34
+ attach_function :CPLCleanupErrorMutex, [:void], :void
35
35
  attach_function :CPLLoggingErrorHandler,
36
36
  [CPLErr, :int, :string],
37
37
  :void
@@ -41,20 +41,20 @@ module FFI
41
41
  attach_function :CPLQuietErrorHandler,
42
42
  [CPLErr, :int, :string],
43
43
  :void
44
- #attach_function :CPLTurnFailureIntoWarning, [:int], :void
44
+ attach_function :CPLTurnFailureIntoWarning, [:int], :void
45
45
 
46
46
  attach_function :CPLSetErrorHandler,
47
47
  [:CPLErrorHandler],
48
48
  :CPLErrorHandler
49
- #attach_function :CPLSetErrorHandlerEx,
50
- # [:CPLErrorHandler, :pointer],
51
- # :CPLErrorHandler
49
+ attach_function :CPLSetErrorHandlerEx,
50
+ [:CPLErrorHandler, :pointer],
51
+ :CPLErrorHandler
52
52
  attach_function :CPLPushErrorHandler,
53
53
  [:CPLErrorHandler],
54
54
  :void
55
- #attach_function :CPLPushErrorHandlerEx,
56
- # [:CPLErrorHandler, :pointer],
57
- # :void
55
+ attach_function :CPLPushErrorHandlerEx,
56
+ [:CPLErrorHandler, :pointer],
57
+ :void
58
58
  attach_function :CPLPopErrorHandler, [:void], :void
59
59
 
60
60
  attach_function :CPLDebug, [:string, :string], :void
@@ -32,7 +32,7 @@ module FFI
32
32
  attach_function :CSLInsertString, %i[pointer int string], :pointer
33
33
  attach_function :CSLRemoveStrings, %i[pointer int int pointer], :pointer
34
34
  attach_function :CSLFindString, %i[pointer string], :int
35
- #attach_function :CSLFindStringCaseSensitive, %i[pointer string], :int
35
+ attach_function :CSLFindStringCaseSensitive, %i[pointer string], :int
36
36
  attach_function :CSLPartialFindString, %i[pointer string], :int
37
37
  attach_function :CSLFindName, %i[pointer string], :int
38
38
 
@@ -55,27 +55,27 @@ module FFI
55
55
  attach_function :CPLUnescapeString, %i[string pointer int], :string
56
56
  attach_function :CPLBinaryToHex, %i[int pointer], :string
57
57
  attach_function :CPLHexToBinary, %i[string pointer], :pointer
58
- #attach_function :CPLBase64Encode, %i[int pointer], :string
59
- #attach_function :CPLBase64DecodeInPlace, %i[pointer], :int
58
+ attach_function :CPLBase64Encode, %i[int pointer], :string
59
+ attach_function :CPLBase64DecodeInPlace, %i[pointer], :int
60
60
 
61
61
  attach_function :CPLGetValueType, %i[string], CPLValueType
62
62
  attach_function :CPLStrlcpy, %i[string string size_t], :size_t
63
63
  attach_function :CPLStrlcat, %i[string string size_t], :size_t
64
64
  attach_function :CPLStrnlen, %i[string size_t], :size_t
65
- #attach_function :CPLEncodingCharSize, %i[string], :int
65
+ attach_function :CPLEncodingCharSize, %i[string], :int
66
66
 
67
- #attach_function :CPLClearRecodeWarningFlags, [], :void
67
+ attach_function :CPLClearRecodeWarningFlags, [], :void
68
68
  attach_function :CPLRecode, %i[string string string], :string
69
69
  attach_function :CPLRecodeFromWChar, %i[string string string], :string
70
70
  attach_function :CPLRecodeToWChar, %i[string string string], :string
71
71
 
72
72
  attach_function :CPLIsUTF8, %i[string int], :int
73
73
  attach_function :CPLForceToASCII, %i[string int char], :string
74
- #attach_function :CPLStrlenUTF8, %i[string], :int
74
+ attach_function :CPLStrlenUTF8, %i[string], :int
75
75
 
76
- #attach_function :CPLOPrintf, %i[string varargs], :CPLString
77
- #attach_function :CPLOvPrintf, %i[string varargs], :CPLString
78
- #attach_function :CPLURLGetValue, %i[string string], :CPLString
79
- #attach_function :CPLURLAddKVP, %i[string string string], :CPLString
76
+ attach_function :CPLOPrintf, %i[string varargs], :CPLString
77
+ attach_function :CPLOvPrintf, %i[string varargs], :CPLString
78
+ attach_function :CPLURLGetValue, %i[string string], :CPLString
79
+ attach_function :CPLURLAddKVP, %i[string string string], :CPLString
80
80
  end
81
81
  end
@@ -46,23 +46,23 @@ module FFI
46
46
  attach_function :VSIFTellL, %i[pointer], :vsi_l_offset
47
47
  attach_function :VSIRewindL, %i[pointer], :void
48
48
  attach_function :VSIFReadL, %i[pointer size_t size_t pointer], :size_t
49
- #attach_function :VSIFReadMultiRangeL,
50
- # %i[int pointer pointer pointer pointer],
51
- # :int
49
+ attach_function :VSIFReadMultiRangeL,
50
+ %i[int pointer pointer pointer pointer],
51
+ :int
52
52
  attach_function :VSIFWriteL, %i[pointer size_t size_t pointer], :size_t
53
53
  attach_function :VSIFEofL, %i[pointer], :int
54
- #attach_function :VSIFTruncateL, %i[pointer vsi_l_offset], :int
54
+ attach_function :VSIFTruncateL, %i[pointer vsi_l_offset], :int
55
55
  attach_function :VSIFFlushL, %i[pointer], :int
56
56
  attach_function :VSIFPrintfL, %i[pointer string varargs], :int
57
57
  attach_function :VSIFPutcL, %i[int pointer], :int
58
- #attach_function :VSIIngestFile,
59
- # %i[pointer string pointer pointer GIntBig],
60
- # :int
58
+ attach_function :VSIIngestFile,
59
+ %i[pointer string pointer pointer GIntBig],
60
+ :int
61
61
  attach_function :VSIStatL, %i[string pointer], :int
62
- #attach_function :VSIStatExL, %i[string pointer int], :int
62
+ attach_function :VSIStatExL, %i[string pointer int], :int
63
63
 
64
- #attach_function :VSIIsCaseSensitiveFS, %i[string], :int
65
- #attach_function :VSIFGetNativeFileDescriptorL, %i[pointer], :pointer
64
+ attach_function :VSIIsCaseSensitiveFS, %i[string], :int
65
+ attach_function :VSIFGetNativeFileDescriptorL, %i[pointer], :pointer
66
66
 
67
67
  attach_function :VSICalloc, %i[size_t size_t], :pointer
68
68
  attach_function :VSIMalloc, %i[size_t], :pointer
@@ -73,7 +73,7 @@ module FFI
73
73
  attach_function :VSIMalloc3, %i[size_t size_t size_t], :pointer
74
74
 
75
75
  attach_function :VSIReadDir, %i[string], :pointer
76
- #attach_function :VSIReadDirRecursive, %i[string], :pointer
76
+ attach_function :VSIReadDirRecursive, %i[string], :pointer
77
77
  attach_function :VSIMkdir, %i[string long], :int
78
78
  attach_function :VSIRmdir, %i[string], :int
79
79
  attach_function :VSIUnlink, %i[string], :int
@@ -84,15 +84,15 @@ module FFI
84
84
  attach_function :VSIInstallMemFileHandler, [], :void
85
85
  attach_function :VSIInstallLargeFileHandler, [], :void
86
86
  attach_function :VSIInstallSubFileHandler, [], :void
87
- #attach_function :VSIInstallCurlFileHandler, [], :void
88
- #attach_function :VSIInstallCurlStreamingFileHandler, [], :void
89
- #attach_function :VSIInstallGZipFileHandler, [], :void
90
- #attach_function :VSIInstallZipFileHandler, [], :void
91
- #attach_function :VSIInstallStdinHandler, [], :void
92
- #attach_function :VSIInstallStdoutHandler, [], :void
93
- #attach_function :VSIInstallSparseFileHandler, [], :void
94
- #attach_function :VSIInstallTarFileHandler, [], :void
95
- #attach_function :VSICleanupFileManager, [], :void
87
+ attach_function :VSIInstallCurlFileHandler, [], :void
88
+ attach_function :VSIInstallCurlStreamingFileHandler, [], :void
89
+ attach_function :VSIInstallGZipFileHandler, [], :void
90
+ attach_function :VSIInstallZipFileHandler, [], :void
91
+ attach_function :VSIInstallStdinHandler, [], :void
92
+ attach_function :VSIInstallStdoutHandler, [], :void
93
+ attach_function :VSIInstallSparseFileHandler, [], :void
94
+ attach_function :VSIInstallTarFileHandler, [], :void
95
+ attach_function :VSICleanupFileManager, [], :void
96
96
 
97
97
  attach_function :VSIFileFromMemBuffer,
98
98
  %i[string pointer vsi_l_offset int],
@@ -100,9 +100,9 @@ module FFI
100
100
  attach_function :VSIGetMemFileBuffer,
101
101
  %i[string pointer int],
102
102
  :pointer
103
- # attach_function :VSIStdoutSetRedirection,
104
- # %i[VSIWriteFunction pointer],
105
- # :pointer
103
+ attach_function :VSIStdoutSetRedirection,
104
+ %i[VSIWriteFunction pointer],
105
+ :pointer
106
106
 
107
107
  attach_function :VSITime, %i[pointer], :ulong
108
108
  attach_function :VSICTime, %i[ulong], :string