ffi-gdal 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/History.md +8 -0
- data/lib/ffi/gdal/version.rb +1 -1
- data/lib/ffi-gdal/dataset.rb +6 -2
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 647e3eeffef3a444a35f32abcc8918172685030f
|
4
|
+
data.tar.gz: 0b30d6ff25a55d01d8859ea2f679a78ecf04cb5b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f59779cfb110c9e8eae87a8731df55a78437df2d2e495c138cffaa5054231c22ea69373afae68cc6bdb4814261fcd767da3b964300d4f6db152246351642405
|
7
|
+
data.tar.gz: 62d6225c376ced220a3270f0ca31f3c3b54a4761ed3df3cc5cde46e36c3295493ac7c0da9293975db2f0e5d78357599785e96beb1874670ba3bb08f6c0a40bef
|
data/History.md
ADDED
data/lib/ffi/gdal/version.rb
CHANGED
data/lib/ffi-gdal/dataset.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'uri'
|
1
2
|
require_relative '../ffi/gdal'
|
2
3
|
require_relative '../ffi-gdal'
|
3
4
|
require_relative 'driver'
|
@@ -21,10 +22,13 @@ module GDAL
|
|
21
22
|
'w' => :GA_Update
|
22
23
|
}
|
23
24
|
|
24
|
-
# @param path [String] Path to the file that contains the dataset.
|
25
|
+
# @param path [String] Path to the file that contains the dataset. Can be
|
26
|
+
# a local file or a URL.
|
25
27
|
# @param access_flag [String] 'r' or 'w'.
|
26
28
|
def self.open(path, access_flag)
|
27
|
-
|
29
|
+
uri = URI.parse(path)
|
30
|
+
file_path = u.scheme.nil? ? ::File.expand_path(path) : path
|
31
|
+
|
28
32
|
pointer = FFI::GDAL.GDALOpen(file_path, ACCESS_FLAGS[access_flag])
|
29
33
|
raise OpenFailure.new(file_path) if pointer.null?
|
30
34
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ffi-gdal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steve Loveless
|
@@ -132,6 +132,7 @@ files:
|
|
132
132
|
- ".gitignore"
|
133
133
|
- ".rspec"
|
134
134
|
- Gemfile
|
135
|
+
- History.md
|
135
136
|
- LICENSE.txt
|
136
137
|
- README.md
|
137
138
|
- Rakefile
|