spatial_features 2.17.1 → 2.17.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/lib/spatial_features/has_spatial_features.rb +6 -2
- data/lib/spatial_features/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86e67798202370af90674a888afbf1ac4f7847fa24385e1457ebe14e3ff6d4bc
|
4
|
+
data.tar.gz: 75e5c07bb3dc7c3f969f36919d7a468046fec0fcb3683e28f2c862dce9bcee11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc4d1aeb966cc2623bd8d324e6ef1bf1fc8e3b4f4bdffddaf123f30e76d827461b0b2277b141ae57a501fd26dc47105aa289771c70f302d1119f5d7270d9ff96
|
7
|
+
data.tar.gz: 41a82aebeef10ff3445348a0859e2db72f42e4b5041fd27b8b72d1368b12d4294e8ec9b270bcf570280f28b23819ed3ad80b066803c0997eca9777f361a778e2
|
@@ -203,7 +203,7 @@ module SpatialFeatures
|
|
203
203
|
|
204
204
|
def bounds
|
205
205
|
if association(:aggregate_feature).loaded?
|
206
|
-
aggregate_feature
|
206
|
+
aggregate_feature&.feature_bounds
|
207
207
|
else
|
208
208
|
result = aggregate_features.pluck(:north, :east, :south, :west).first
|
209
209
|
[:north, :east, :south, :west].zip(result.map {|bound| BigDecimal(bound) }).to_h.with_indifferent_access if result
|
@@ -217,7 +217,11 @@ module SpatialFeatures
|
|
217
217
|
end
|
218
218
|
|
219
219
|
def features_area_in_square_meters
|
220
|
-
aggregate_feature
|
220
|
+
if association(:aggregate_feature).loaded?
|
221
|
+
aggregate_feature&.area
|
222
|
+
else
|
223
|
+
aggregate_features.pluck(:area).first
|
224
|
+
end
|
221
225
|
end
|
222
226
|
|
223
227
|
def total_intersection_area_in_square_meters(other)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spatial_features
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.17.
|
4
|
+
version: 2.17.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Wallace
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-09-
|
12
|
+
date: 2021-09-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|