Module: FFI::GDAL
- Extended by:
- Library
- Defined in:
- lib/ffi/gdal.rb,
lib/ffi/gdal/alg.rb,
lib/ffi/gdal/gcp.rb,
lib/ffi/gdal/vrt.rb,
lib/ffi/gdal/gdal.rb,
lib/ffi/gdal/grid.rb,
lib/ffi/gdal/warper.rb,
lib/ffi/gdal/version.rb,
lib/ffi/gdal/matching.rb,
lib/ffi/gdal/rpc_info.rb,
lib/ffi/gdal/exceptions.rb,
lib/ffi/gdal/color_entry.rb,
lib/ffi/gdal/warp_options.rb,
lib/ffi/gdal/transformer_info.rb,
lib/ffi/extensions/gdal/extensions.rb,
lib/ffi/gdal/grid_data_metrics_options.rb,
lib/ffi/gdal/grid_moving_average_options.rb,
lib/ffi/gdal/grid_nearest_neighbor_options.rb,
lib/ffi/gdal/grid_inverse_distance_to_a_power_options.rb
Defined Under Namespace
Modules: Alg, Extensions, GDAL, Grid, Matching, VRT, Warper Classes: ColorEntry, GCP, GridDataMetricsOptions, GridInverseDistanceToAPowerOptions, GridMovingAverageOptions, GridNearestNeighborOptions, LibraryNotFound, RPCInfo, TransformerInfo, WarpOptions
Constant Summary collapse
- VERSION =
"1.0.4"
Class Method Summary collapse
-
._file_with_constants(file_name) ⇒ String
Locates one of the files that has constants.
-
._files_with_constants ⇒ Array<String>
Related files that contain C constants.
- .gdal_library_path ⇒ String
Methods included from Library
attach_function, old_attach_function, unsupported_gdal_functions
Class Method Details
._file_with_constants(file_name) ⇒ String
Locates one of the files that has constants.
55 56 57 |
# File 'lib/ffi/gdal.rb', line 55 def self._file_with_constants(file_name) _files_with_constants.find { |f| f.end_with?(file_name) } end |
._files_with_constants ⇒ Array<String>
Returns Related files that contain C constants.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/ffi/gdal.rb', line 35 def self._files_with_constants header_files = %w[ cpl_conv.h cpl_error.h cpl_port.h cpl_string.h cpl_vsi.h gdal.h gdal_alg.h gdal_vrt.h gdalwarper.h ogr_core.h ogr_srs_api.h ] header_search_paths = %w[/usr/local/include /usr/include /usr/include/gdal] header_files.map do |file| dir = header_search_paths.find do |d| File.exist?("#{d}/#{file}") end dir ? "#{dir}/#{file}" : nil end.compact end |
.gdal_library_path ⇒ String
30 31 32 |
# File 'lib/ffi/gdal.rb', line 30 def self.gdal_library_path @gdal_library_path ||= ENV.fetch("GDAL_LIBRARY_PATH", "gdal") end |