module GDAL::VersionInfo

Public Instance Methods

build_info() click to toggle source

Options used when building GDAL.

@return [Hash{String => String}]

# File lib/gdal/version_info.rb, line 36
def build_info
  key_value_pairs = FFI::GDAL.GDALVersionInfo("BUILD_INFO")
  key_value_pairs.split.each_with_object({}) do |kv, obj|
    key, value = kv.split("=", 2)
    obj[key] = value
  end
end
check_version(major, minor) click to toggle source

@param major [Integer] @param minor [Integer] @return [Boolean] true if the runtime GDAL library matches the given

version params.
# File lib/gdal/version_info.rb, line 53
def check_version(major, minor)
  FFI::GDAL.GDALCheckVersion(major, minor, "FFI::GDAL")
end
license() click to toggle source

The long licensing info.

@return [String]

# File lib/gdal/version_info.rb, line 29
def license
  FFI::GDAL.GDALVersionInfo("LICENSE")
end
long_version() click to toggle source

@return [String]

# File lib/gdal/version_info.rb, line 45
def long_version
  FFI::GDAL.GDALVersionInfo("--version")
end
release_date() click to toggle source

@return [Date]

# File lib/gdal/version_info.rb, line 15
def release_date
  Date.parse(FFI::GDAL.GDALVersionInfo("RELEASE_DATE"))
end
release_name() click to toggle source

Version in the form “1.1.7”.

@return [String]

# File lib/gdal/version_info.rb, line 22
def release_name
  FFI::GDAL.GDALVersionInfo("RELEASE_NAME")
end
version_num() click to toggle source

Version in the form “1170”.

@return [String]

# File lib/gdal/version_info.rb, line 10
def version_num
  FFI::GDAL.GDALVersionInfo("VERSION_NUM")
end