gdal3 3.0.0
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 +7 -0
- data/.gitignore +19 -0
- data/.travis.yml +10 -0
- data/CHANGELOG.md +8 -0
- data/Gemfile +3 -0
- data/LICENSE +28 -0
- data/Makefile +12 -0
- data/README.md +14 -0
- data/Rakefile +38 -0
- data/ext/gdal-ruby/LICENSE +253 -0
- data/ext/gdal-ruby/gdal/extconf.rb +30 -0
- data/ext/gdal-ruby/gdal/gdal.cpp +19064 -0
- data/ext/gdal-ruby/gdalconst/extconf.rb +24 -0
- data/ext/gdal-ruby/gdalconst/gdalconst.c +2248 -0
- data/ext/gdal-ruby/ogr/extconf.rb +29 -0
- data/ext/gdal-ruby/ogr/ogr.cpp +20050 -0
- data/ext/gdal-ruby/osr/extconf.rb +29 -0
- data/ext/gdal-ruby/osr/osr.cpp +10266 -0
- data/ext/gdal-ruby/ruby-2.2-patch.rb +58 -0
- data/gdal3.gemspec +23 -0
- data/lib/gdal-ruby/version.rb +5 -0
- data/lib/gdal.rb +5 -0
- data/spec/gdal_spec.rb +10 -0
- metadata +112 -0
@@ -0,0 +1,58 @@
|
|
1
|
+
# This is monkeypatch for Ruby 2.2.0+
|
2
|
+
# Method pkg_config is broken on Ubuntu 12.04, so I replace it to method from Ruby 2.1.5
|
3
|
+
|
4
|
+
if RUBY_VERSION >= '2.2.0'
|
5
|
+
|
6
|
+
module MakeMakefile
|
7
|
+
def pkg_config(pkg, option=nil)
|
8
|
+
if pkgconfig = with_config("#{pkg}-config") and find_executable0(pkgconfig)
|
9
|
+
# iff package specific config command is given
|
10
|
+
elsif ($PKGCONFIG ||=
|
11
|
+
(pkgconfig = with_config("pkg-config", ("pkg-config" unless CROSS_COMPILING))) &&
|
12
|
+
find_executable0(pkgconfig) && pkgconfig) and
|
13
|
+
system("#{$PKGCONFIG} --exists #{pkg}")
|
14
|
+
# default to pkg-config command
|
15
|
+
pkgconfig = $PKGCONFIG
|
16
|
+
get = proc {|opt|
|
17
|
+
opt = IO.popen("#{$PKGCONFIG} --#{opt} #{pkg}", err:[:child, :out], &:read)
|
18
|
+
opt.strip if $?.success?
|
19
|
+
}
|
20
|
+
elsif find_executable0(pkgconfig = "#{pkg}-config")
|
21
|
+
# default to package specific config command, as a last resort.
|
22
|
+
else
|
23
|
+
pkgconfig = nil
|
24
|
+
end
|
25
|
+
if pkgconfig
|
26
|
+
get ||= proc {|opt|
|
27
|
+
opt = IO.popen("#{pkgconfig} --#{opt}", err:[:child, :out], &:read)
|
28
|
+
opt.strip if $?.success?
|
29
|
+
}
|
30
|
+
end
|
31
|
+
orig_ldflags = $LDFLAGS
|
32
|
+
if get and option
|
33
|
+
get[option]
|
34
|
+
elsif get and try_ldflags(ldflags = get['libs'])
|
35
|
+
if incflags = get['cflags-only-I']
|
36
|
+
$INCFLAGS << " " << incflags
|
37
|
+
cflags = get['cflags-only-other']
|
38
|
+
else
|
39
|
+
cflags = get['cflags']
|
40
|
+
end
|
41
|
+
libs = get['libs-only-l'] || ''
|
42
|
+
ldflags = (Shellwords.shellwords(ldflags) - Shellwords.shellwords(libs)).quote.join(" ")
|
43
|
+
$CFLAGS += " " << cflags
|
44
|
+
$CXXFLAGS += " " << cflags
|
45
|
+
$LDFLAGS = [orig_ldflags, ldflags].join(' ')
|
46
|
+
$libs += " " << libs
|
47
|
+
Logging::message "package configuration for %s\n", pkg
|
48
|
+
Logging::message "cflags: %s\nldflags: %s\nlibs: %s\n\n",
|
49
|
+
cflags, ldflags, libs
|
50
|
+
[cflags, ldflags, libs]
|
51
|
+
else
|
52
|
+
Logging::message "package configuration for %s is not found\n", pkg
|
53
|
+
nil
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
end
|
data/gdal3.gemspec
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/gdal-ruby/version', __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |gem|
|
5
|
+
gem.authors = ["Zac McCormick"]
|
6
|
+
gem.email = ["zac.mccormick@gmail.com"]
|
7
|
+
gem.description = %q{GDAL/OGR bindings for ruby}
|
8
|
+
gem.summary = %q{GDAL/OGR bindings for ruby. Currently contains native extensions for GDAL 1.9.1}
|
9
|
+
gem.homepage = "https://github.com/zhm/gdal-ruby"
|
10
|
+
|
11
|
+
gem.files = `git ls-files`.split($\)
|
12
|
+
gem.extensions = ['ext/gdal-ruby/gdal/extconf.rb', 'ext/gdal-ruby/gdalconst/extconf.rb',
|
13
|
+
'ext/gdal-ruby/ogr/extconf.rb', 'ext/gdal-ruby/osr/extconf.rb']
|
14
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
15
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
16
|
+
gem.name = "gdal3"
|
17
|
+
gem.require_paths = ["lib"]
|
18
|
+
gem.version = Gdal::Ruby::VERSION
|
19
|
+
|
20
|
+
gem.add_development_dependency 'rake', ['>= 0']
|
21
|
+
gem.add_development_dependency 'rake-compiler', ['>= 0']
|
22
|
+
gem.add_development_dependency 'rspec', ['>= 0']
|
23
|
+
end
|
data/lib/gdal.rb
ADDED
data/spec/gdal_spec.rb
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
require 'gdal-ruby/ogr'
|
2
|
+
|
3
|
+
describe "Gdal" do
|
4
|
+
it "converts WKT to GeoJSON" do
|
5
|
+
valid_wkt = 'POINT (30 10)'
|
6
|
+
valid_json = '{ "type": "Point", "coordinates": [ 30.0, 10.0 ] }'
|
7
|
+
|
8
|
+
Gdal::Ogr.create_geometry_from_wkt(valid_wkt).export_to_json.should eq(valid_json)
|
9
|
+
end
|
10
|
+
end
|
metadata
ADDED
@@ -0,0 +1,112 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: gdal3
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 3.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Zac McCormick
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2024-07-03 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rake
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake-compiler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: GDAL/OGR bindings for ruby
|
56
|
+
email:
|
57
|
+
- zac.mccormick@gmail.com
|
58
|
+
executables: []
|
59
|
+
extensions:
|
60
|
+
- ext/gdal-ruby/gdal/extconf.rb
|
61
|
+
- ext/gdal-ruby/gdalconst/extconf.rb
|
62
|
+
- ext/gdal-ruby/ogr/extconf.rb
|
63
|
+
- ext/gdal-ruby/osr/extconf.rb
|
64
|
+
extra_rdoc_files: []
|
65
|
+
files:
|
66
|
+
- ".gitignore"
|
67
|
+
- ".travis.yml"
|
68
|
+
- CHANGELOG.md
|
69
|
+
- Gemfile
|
70
|
+
- LICENSE
|
71
|
+
- Makefile
|
72
|
+
- README.md
|
73
|
+
- Rakefile
|
74
|
+
- ext/gdal-ruby/LICENSE
|
75
|
+
- ext/gdal-ruby/gdal/extconf.rb
|
76
|
+
- ext/gdal-ruby/gdal/gdal.cpp
|
77
|
+
- ext/gdal-ruby/gdalconst/extconf.rb
|
78
|
+
- ext/gdal-ruby/gdalconst/gdalconst.c
|
79
|
+
- ext/gdal-ruby/ogr/extconf.rb
|
80
|
+
- ext/gdal-ruby/ogr/ogr.cpp
|
81
|
+
- ext/gdal-ruby/osr/extconf.rb
|
82
|
+
- ext/gdal-ruby/osr/osr.cpp
|
83
|
+
- ext/gdal-ruby/ruby-2.2-patch.rb
|
84
|
+
- gdal3.gemspec
|
85
|
+
- lib/gdal-ruby/version.rb
|
86
|
+
- lib/gdal.rb
|
87
|
+
- spec/gdal_spec.rb
|
88
|
+
homepage: https://github.com/zhm/gdal-ruby
|
89
|
+
licenses: []
|
90
|
+
metadata: {}
|
91
|
+
post_install_message:
|
92
|
+
rdoc_options: []
|
93
|
+
require_paths:
|
94
|
+
- lib
|
95
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
96
|
+
requirements:
|
97
|
+
- - ">="
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: '0'
|
100
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - ">="
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '0'
|
105
|
+
requirements: []
|
106
|
+
rubygems_version: 3.4.6
|
107
|
+
signing_key:
|
108
|
+
specification_version: 4
|
109
|
+
summary: GDAL/OGR bindings for ruby. Currently contains native extensions for GDAL
|
110
|
+
1.9.1
|
111
|
+
test_files:
|
112
|
+
- spec/gdal_spec.rb
|