rgeo 2.2.0 → 2.3.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 +4 -4
- data/README.md +27 -11
- data/ext/geos_c_impl/geometry.c +7 -6
- data/lib/rgeo/geos/interface.rb +0 -1
- data/lib/rgeo/impl_helper/basic_geometry_collection_methods.rb +6 -0
- data/lib/rgeo/version.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e86885f1c2a19a3b89ea73784add4644f6cbfa6afb1cf73dc0f1dda22151923
|
4
|
+
data.tar.gz: 83690993b988a200dc689750e31f8aabdb78fc7aade2af339a068f5adb41b9a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 733c109fc5858536ca56a18bac9d9ab78204365a1ea5cd2e4eb7f9d06eaf833cafb28907a547698954c5b5963be921b415b9e5cc881f7235d644be2619de482f
|
7
|
+
data.tar.gz: 7ab29b70bcfb8f7a58832271245a6a125861c5298db870a3ecad3ff2869aa56045fb42213b44609b44edcf7531349a205ef0e688773bab1f652508c66925730d
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
## RGeo
|
2
2
|
|
3
3
|
[](http://badge.fury.io/rb/rgeo)
|
4
|
-
[](https://github.com/rgeo/rgeo/actions?query=workflow%3ACI+branch%3Amaster+event%3Apush)
|
5
5
|
|
6
6
|
RGeo is a geospatial data library for Ruby.
|
7
7
|
|
@@ -67,7 +67,7 @@ or include it in your Gemfile:
|
|
67
67
|
gem "rgeo"
|
68
68
|
```
|
69
69
|
|
70
|
-
If you are using proj.4 extensions, include
|
70
|
+
If you are using proj.4 extensions, include
|
71
71
|
[`rgeo-proj4`](https://github.com/rgeo/rgeo-proj4):
|
72
72
|
|
73
73
|
```ruby
|
@@ -108,25 +108,41 @@ ActiveRecord connection adapter for SpatiaLite, based on sqlite3 (*not maintaine
|
|
108
108
|
|
109
109
|
RDoc Documentation is available at https://www.rubydoc.info/gems/rgeo
|
110
110
|
|
111
|
-
Contributions are welcome. Please read the
|
111
|
+
Contributions are welcome. Please read the
|
112
112
|
[Contributing guidelines](https://github.com/rgeo/rgeo/blob/master/CONTRIBUTING.md).
|
113
113
|
|
114
|
-
Support may be available on the
|
114
|
+
Support may be available on the
|
115
115
|
[rgeo-users google group](https://groups.google.com/forum/#!forum/rgeo-users)
|
116
116
|
or on [Stack Overflow](https://stackoverflow.com/questions/tagged/rgeo).
|
117
117
|
|
118
|
+
### Documentation
|
118
119
|
|
119
|
-
|
120
|
+
You can see more in-depth documentation in the `doc` folder. Factories and
|
121
|
+
methods are documented inline, you should consider checking
|
122
|
+
https://rubydoc.info/gems/rgeo with the version you are currently using. Or
|
123
|
+
generate documentation locally if you're working on RGeo: `yardoc server`.
|
124
|
+
|
125
|
+
Here's the current list of available topics:
|
120
126
|
|
121
|
-
|
122
|
-
[
|
127
|
+
- [An introduction to Spatial Programming With RGeo](https://github.com/rgeo/rgeo/blob/master/doc/An-Introduction-to-Spatial-Programming-With-RGeo.md)
|
128
|
+
- [Enable GEOS and Proj4 on Heroku](https://github.com/rgeo/rgeo/blob/master/doc/Enable-GEOS-and-Proj4-on-Heroku.md)
|
129
|
+
- [Installing GEOS](https://github.com/rgeo/rgeo/blob/master/doc/Installing-GEOS.md)
|
130
|
+
- [Factory Compatibility](https://github.com/rgeo/rgeo/blob/master/doc/Factory-Compatibility.md)
|
131
|
+
- [Which factory should I use?](https://github.com/rgeo/rgeo/blob/master/doc/Which-factory-should-I-use.md)
|
132
|
+
- [Examples](https://github.com/rgeo/rgeo/blob/master/doc/Examples.md)
|
133
|
+
- [Who uses `rgeo`?](https://github.com/rgeo/rgeo/blob/master/doc/Gallery.md)
|
134
|
+
|
135
|
+
You can see an exhaustive and up to date list at https://rubydoc.info/gems/rgeo/index.
|
136
|
+
### Acknowledgments
|
123
137
|
|
124
|
-
|
125
|
-
|
138
|
+
[Daniel Azuma](http://www.daniel-azuma.com) created RGeo.
|
139
|
+
[Tee Parham](http://twitter.com/teeparham) is a former maintainer.
|
140
|
+
[Keith Doggett](http://www.github.com/keithdoggett), [Ulysse Buonomo](http://www.github.com/BuonOmo) are current maintainers.
|
126
141
|
|
127
|
-
|
142
|
+
Development is supported by:
|
128
143
|
|
129
|
-
|
144
|
+
- [Klaxit](https://www.github.com/klaxit)
|
145
|
+
- Goldfish Ads
|
130
146
|
|
131
147
|
RGeo calls the GEOS library to handle most Cartesian geometric calculations,
|
132
148
|
and the Proj4 library to handle projections and coordinate transformations.
|
data/ext/geos_c_impl/geometry.c
CHANGED
@@ -1045,12 +1045,13 @@ static VALUE method_geometry_invalid_reason(VALUE self)
|
|
1045
1045
|
self_geom = self_data->geom;
|
1046
1046
|
if (self_geom) {
|
1047
1047
|
str = GEOSisValidReason_r(self_data->geos_context, self_geom);
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
1051
|
-
|
1052
|
-
|
1053
|
-
|
1048
|
+
// Per documentation, a valid geometry should give an empty string.
|
1049
|
+
// However it seems not to be the case. Hence the comparison against
|
1050
|
+
// the string that is really given: `"Valid Geometry"`.
|
1051
|
+
// See https://github.com/libgeos/geos/issues/431.
|
1052
|
+
if (str) result = (str[0] == '\0' || !strcmp(str, "Valid Geometry")) ? Qnil : rb_str_new2(str);
|
1053
|
+
else result = rb_str_new2("Exception");
|
1054
|
+
GEOSFree_r(self_data->geos_context, str);
|
1054
1055
|
}
|
1055
1056
|
return result;
|
1056
1057
|
}
|
data/lib/rgeo/geos/interface.rb
CHANGED
@@ -174,7 +174,6 @@ module RGeo
|
|
174
174
|
# operation that would benefit from it is called. The latter
|
175
175
|
# never automatically generates a prepared geometry (unless you
|
176
176
|
# generate one explicitly using the <tt>prepare!</tt> method).
|
177
|
-
|
178
177
|
def factory(opts = {})
|
179
178
|
if supported?
|
180
179
|
native_interface = opts[:native_interface] || Geos.preferred_native_interface
|
@@ -9,6 +9,8 @@
|
|
9
9
|
module RGeo
|
10
10
|
module ImplHelper # :nodoc:
|
11
11
|
module BasicGeometryCollectionMethods # :nodoc:
|
12
|
+
include Enumerable
|
13
|
+
|
12
14
|
attr_reader :elements
|
13
15
|
|
14
16
|
def initialize(factory, elements)
|
@@ -37,6 +39,10 @@ module RGeo
|
|
37
39
|
@elements.each(&block)
|
38
40
|
end
|
39
41
|
|
42
|
+
def geometries
|
43
|
+
@elements
|
44
|
+
end
|
45
|
+
|
40
46
|
def dimension
|
41
47
|
@dimension ||= @elements.map(&:dimension).max || -1
|
42
48
|
end
|
data/lib/rgeo/version.rb
CHANGED
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: 2.
|
4
|
+
version: 2.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Azuma
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2021-04-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ffi-geos
|
@@ -45,14 +45,14 @@ dependencies:
|
|
45
45
|
requirements:
|
46
46
|
- - "~>"
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version: '
|
48
|
+
version: '13.0'
|
49
49
|
type: :development
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
53
|
- - "~>"
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: '
|
55
|
+
version: '13.0'
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: rake-compiler
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
@@ -73,14 +73,14 @@ dependencies:
|
|
73
73
|
requirements:
|
74
74
|
- - "~>"
|
75
75
|
- !ruby/object:Gem::Version
|
76
|
-
version:
|
76
|
+
version: 1.8.1
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
79
|
version_requirements: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
81
|
- - "~>"
|
82
82
|
- !ruby/object:Gem::Version
|
83
|
-
version:
|
83
|
+
version: 1.8.1
|
84
84
|
description: RGeo is a geospatial data library for Ruby. It provides an implementation
|
85
85
|
of the Open Geospatial Consortium's Simple Features Specification, used by most
|
86
86
|
standard spatial/geographic data storage systems such as PostGIS. A number of add-on
|
@@ -201,14 +201,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
201
201
|
requirements:
|
202
202
|
- - ">="
|
203
203
|
- !ruby/object:Gem::Version
|
204
|
-
version: 2.
|
204
|
+
version: 2.5.0
|
205
205
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
206
206
|
requirements:
|
207
207
|
- - ">="
|
208
208
|
- !ruby/object:Gem::Version
|
209
209
|
version: '0'
|
210
210
|
requirements: []
|
211
|
-
rubygems_version: 3.
|
211
|
+
rubygems_version: 3.2.3
|
212
212
|
signing_key:
|
213
213
|
specification_version: 4
|
214
214
|
summary: RGeo is a geospatial data library for Ruby.
|