rgeo 0.3.14 → 0.3.15
Sign up to get free protection for your applications and to get access to all the features.
- data/History.rdoc +4 -0
- data/Version +1 -1
- data/lib/rgeo/geos/capi_feature_classes.rb +10 -10
- data/lib/rgeo/geos/interface.rb +9 -7
- data/test/geos_capi/tc_factory.rb +7 -0
- data/test/geos_capi/tc_point.rb +12 -0
- data/test/geos_capi/tc_zmfactory.rb +7 -0
- data/test/geos_ffi/tc_factory.rb +7 -0
- data/test/geos_ffi/tc_point.rb +12 -0
- data/test/geos_ffi/tc_zmfactory.rb +7 -0
- metadata +2 -2
data/History.rdoc
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
=== 0.3.15 / 2012-08-02
|
2
|
+
|
3
|
+
* The class shuffle in 0.3.14 broke RGeo::Geos.is_geos? and similar. Fixed.
|
4
|
+
|
1
5
|
=== 0.3.14 / 2012-07-08
|
2
6
|
|
3
7
|
* Compatibility note: The class names for some of the factory and feature implementations, as well as the superclass relationships, have changed in this release. These class names and hierarchy are internal, and clients should not depend on them. That is, RGeo types are generally duck-types. If you need to interrogate type, see the documentation for the ::RGeo::Feature::Type module.
|
data/Version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.15
|
@@ -96,7 +96,7 @@ module RGeo
|
|
96
96
|
end
|
97
97
|
|
98
98
|
|
99
|
-
class CAPIGeometryImpl
|
99
|
+
class CAPIGeometryImpl # :nodoc:
|
100
100
|
|
101
101
|
|
102
102
|
include CAPIGeometryMethods
|
@@ -107,7 +107,7 @@ module RGeo
|
|
107
107
|
end
|
108
108
|
|
109
109
|
|
110
|
-
class CAPIPointImpl
|
110
|
+
class CAPIPointImpl # :nodoc:
|
111
111
|
|
112
112
|
|
113
113
|
include CAPIGeometryMethods
|
@@ -119,7 +119,7 @@ module RGeo
|
|
119
119
|
end
|
120
120
|
|
121
121
|
|
122
|
-
class CAPILineStringImpl
|
122
|
+
class CAPILineStringImpl # :nodoc:
|
123
123
|
|
124
124
|
|
125
125
|
include CAPIGeometryMethods
|
@@ -131,7 +131,7 @@ module RGeo
|
|
131
131
|
end
|
132
132
|
|
133
133
|
|
134
|
-
class CAPILinearRingImpl
|
134
|
+
class CAPILinearRingImpl # :nodoc:
|
135
135
|
|
136
136
|
|
137
137
|
include CAPIGeometryMethods
|
@@ -144,7 +144,7 @@ module RGeo
|
|
144
144
|
end
|
145
145
|
|
146
146
|
|
147
|
-
class CAPILineImpl
|
147
|
+
class CAPILineImpl # :nodoc:
|
148
148
|
|
149
149
|
|
150
150
|
include CAPIGeometryMethods
|
@@ -157,7 +157,7 @@ module RGeo
|
|
157
157
|
end
|
158
158
|
|
159
159
|
|
160
|
-
class CAPIPolygonImpl
|
160
|
+
class CAPIPolygonImpl # :nodoc:
|
161
161
|
|
162
162
|
|
163
163
|
include CAPIGeometryMethods
|
@@ -169,7 +169,7 @@ module RGeo
|
|
169
169
|
end
|
170
170
|
|
171
171
|
|
172
|
-
class CAPIGeometryCollectionImpl
|
172
|
+
class CAPIGeometryCollectionImpl # :nodoc:
|
173
173
|
|
174
174
|
|
175
175
|
include CAPIGeometryMethods
|
@@ -181,7 +181,7 @@ module RGeo
|
|
181
181
|
end
|
182
182
|
|
183
183
|
|
184
|
-
class CAPIMultiPointImpl
|
184
|
+
class CAPIMultiPointImpl # :nodoc:
|
185
185
|
|
186
186
|
|
187
187
|
include CAPIGeometryMethods
|
@@ -194,7 +194,7 @@ module RGeo
|
|
194
194
|
end
|
195
195
|
|
196
196
|
|
197
|
-
class CAPIMultiLineStringImpl
|
197
|
+
class CAPIMultiLineStringImpl # :nodoc:
|
198
198
|
|
199
199
|
|
200
200
|
include CAPIGeometryMethods
|
@@ -207,7 +207,7 @@ module RGeo
|
|
207
207
|
end
|
208
208
|
|
209
209
|
|
210
|
-
class CAPIMultiPolygonImpl
|
210
|
+
class CAPIMultiPolygonImpl # :nodoc:
|
211
211
|
|
212
212
|
|
213
213
|
include CAPIGeometryMethods
|
data/lib/rgeo/geos/interface.rb
CHANGED
@@ -67,9 +67,10 @@ module RGeo
|
|
67
67
|
# the given factory is a CAPI GEOS factory.
|
68
68
|
|
69
69
|
def is_capi_geos?(object_)
|
70
|
-
|
70
|
+
CAPI_SUPPORTED &&
|
71
|
+
(CAPIFactory === object_ || CAPIGeometryMethods === object_ ||
|
71
72
|
ZMFactory === object_ && CAPIFactory === object_.z_factory ||
|
72
|
-
|
73
|
+
ZMGeometryMethods === object_ && CAPIGeometryMethods === object_.z_geometry)
|
73
74
|
end
|
74
75
|
|
75
76
|
|
@@ -77,9 +78,10 @@ module RGeo
|
|
77
78
|
# the given factory is an FFI GEOS factory.
|
78
79
|
|
79
80
|
def is_ffi_geos?(object_)
|
80
|
-
|
81
|
+
FFI_SUPPORTED &&
|
82
|
+
(FFIFactory === object_ || FFIGeometryMethods === object_ ||
|
81
83
|
ZMFactory === object_ && FFIFactory === object_.z_factory ||
|
82
|
-
|
84
|
+
ZMGeometryMethods === object_ && FFIGeometryMethods === object_.z_geometry)
|
83
85
|
end
|
84
86
|
|
85
87
|
|
@@ -87,9 +89,9 @@ module RGeo
|
|
87
89
|
# factory is a GEOS factory. Does not distinguish between CAPI and FFI.
|
88
90
|
|
89
91
|
def is_geos?(object_)
|
90
|
-
CAPIFactory === object_ ||
|
91
|
-
FFIFactory === object_ ||
|
92
|
-
ZMFactory === object_ ||
|
92
|
+
CAPI_SUPPORTED && (CAPIFactory === object_ || CAPIGeometryMethods === object_) ||
|
93
|
+
FFI_SUPPORTED && (FFIFactory === object_ || FFIGeometryMethods === object_) ||
|
94
|
+
ZMFactory === object_ || ZMGeometryMethods === object_
|
93
95
|
end
|
94
96
|
|
95
97
|
|
@@ -56,6 +56,13 @@ module RGeo
|
|
56
56
|
include ::RGeo::Tests::Common::FactoryTests
|
57
57
|
|
58
58
|
|
59
|
+
def test_is_geos_factory
|
60
|
+
assert_equal(true, ::RGeo::Geos.is_geos?(@factory))
|
61
|
+
assert_equal(true, ::RGeo::Geos.is_capi_geos?(@factory))
|
62
|
+
assert_equal(false, ::RGeo::Geos.is_ffi_geos?(@factory))
|
63
|
+
end
|
64
|
+
|
65
|
+
|
59
66
|
end
|
60
67
|
|
61
68
|
end
|
data/test/geos_capi/tc_point.rb
CHANGED
@@ -58,6 +58,18 @@ module RGeo
|
|
58
58
|
include ::RGeo::Tests::Common::PointTests
|
59
59
|
|
60
60
|
|
61
|
+
def test_is_geos
|
62
|
+
point_ = @factory.point(21, -22)
|
63
|
+
assert_equal(true, ::RGeo::Geos.is_geos?(point_))
|
64
|
+
assert_equal(true, ::RGeo::Geos.is_capi_geos?(point_))
|
65
|
+
assert_equal(false, ::RGeo::Geos.is_ffi_geos?(point_))
|
66
|
+
point2_ = @zmfactory.point(21, -22, 0, 0)
|
67
|
+
assert_equal(true, ::RGeo::Geos.is_geos?(point2_))
|
68
|
+
assert_equal(true, ::RGeo::Geos.is_capi_geos?(point2_))
|
69
|
+
assert_equal(false, ::RGeo::Geos.is_ffi_geos?(point2_))
|
70
|
+
end
|
71
|
+
|
72
|
+
|
61
73
|
def test_has_no_projection
|
62
74
|
point_ = @factory.point(21, -22)
|
63
75
|
assert(!point_.respond_to?(:projection))
|
@@ -56,6 +56,13 @@ module RGeo
|
|
56
56
|
include ::RGeo::Tests::Common::FactoryTests
|
57
57
|
|
58
58
|
|
59
|
+
def test_is_geos_factory
|
60
|
+
assert_equal(true, ::RGeo::Geos.is_geos?(@factory))
|
61
|
+
assert_equal(true, ::RGeo::Geos.is_capi_geos?(@factory))
|
62
|
+
assert_equal(false, ::RGeo::Geos.is_ffi_geos?(@factory))
|
63
|
+
end
|
64
|
+
|
65
|
+
|
59
66
|
def test_factory_parts
|
60
67
|
assert_equal(1000, @factory.srid)
|
61
68
|
assert_equal(1000, @factory.z_factory.srid)
|
data/test/geos_ffi/tc_factory.rb
CHANGED
@@ -56,6 +56,13 @@ module RGeo
|
|
56
56
|
include ::RGeo::Tests::Common::FactoryTests
|
57
57
|
|
58
58
|
|
59
|
+
def test_is_geos_factory
|
60
|
+
assert_equal(true, ::RGeo::Geos.is_geos?(@factory))
|
61
|
+
assert_equal(false, ::RGeo::Geos.is_capi_geos?(@factory))
|
62
|
+
assert_equal(true, ::RGeo::Geos.is_ffi_geos?(@factory))
|
63
|
+
end
|
64
|
+
|
65
|
+
|
59
66
|
end
|
60
67
|
|
61
68
|
end
|
data/test/geos_ffi/tc_point.rb
CHANGED
@@ -64,6 +64,18 @@ module RGeo
|
|
64
64
|
# END_TEMP
|
65
65
|
|
66
66
|
|
67
|
+
def test_is_geos
|
68
|
+
point_ = @factory.point(21, -22)
|
69
|
+
assert_equal(true, ::RGeo::Geos.is_geos?(point_))
|
70
|
+
assert_equal(false, ::RGeo::Geos.is_capi_geos?(point_))
|
71
|
+
assert_equal(true, ::RGeo::Geos.is_ffi_geos?(point_))
|
72
|
+
point2_ = @zmfactory.point(21, -22, 0, 0)
|
73
|
+
assert_equal(true, ::RGeo::Geos.is_geos?(point2_))
|
74
|
+
assert_equal(false, ::RGeo::Geos.is_capi_geos?(point2_))
|
75
|
+
assert_equal(true, ::RGeo::Geos.is_ffi_geos?(point2_))
|
76
|
+
end
|
77
|
+
|
78
|
+
|
67
79
|
def test_has_no_projection
|
68
80
|
point_ = @factory.point(21, -22)
|
69
81
|
assert(!point_.respond_to?(:projection))
|
@@ -57,6 +57,13 @@ module RGeo
|
|
57
57
|
include ::RGeo::Tests::Common::FactoryTests
|
58
58
|
|
59
59
|
|
60
|
+
def test_is_geos_factory
|
61
|
+
assert_equal(true, ::RGeo::Geos.is_geos?(@factory))
|
62
|
+
assert_equal(false, ::RGeo::Geos.is_capi_geos?(@factory))
|
63
|
+
assert_equal(true, ::RGeo::Geos.is_ffi_geos?(@factory))
|
64
|
+
end
|
65
|
+
|
66
|
+
|
60
67
|
def test_factory_parts
|
61
68
|
assert_equal(1000, @factory.srid)
|
62
69
|
assert_equal(1000, @factory.z_factory.srid)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rgeo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.15
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-08-03 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: RGeo is a geospatial data library for Ruby. It provides an implementation
|
15
15
|
of the Open Geospatial Consortium's Simple Features Specification, used by most
|