spatial_features 2.11.1 → 2.12.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '035228e67c042788f246694fb215346e72303a7eebe7052cec11a01db0b26ab7'
|
4
|
+
data.tar.gz: 4361a0cf3ffa83dfddbe54a35717b2dd31633245fc28438dace60675a2058147
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c0e3d96ed8f19a968fbb1ff9fb583091cd7a6565a86d288977baf87eeea6be0412ee52321a24a911baaeb5326d1aa32bf65c176a992d1357e0055c06ad580bb5
|
7
|
+
data.tar.gz: 796f292feae7681fd6e4f6b3785421932d9a0a00585b17a5506c25f6399047cb04119e2bcae4db48f1418cace52267821a898fcbd84c1460026bb3dd8cabae26
|
@@ -81,6 +81,15 @@ module SpatialFeatures
|
|
81
81
|
end
|
82
82
|
end
|
83
83
|
|
84
|
+
def aggregate_features
|
85
|
+
type = base_class.to_s # Rails stores polymorphic foreign keys as the base class
|
86
|
+
if all == unscoped
|
87
|
+
AggregateFeature.where(:spatial_model_type => type)
|
88
|
+
else
|
89
|
+
AggregateFeature.where(:spatial_model_type => type, :spatial_model_id => all.unscope(:select))
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
84
93
|
# Returns true if the model stores a hash of the features so we don't need to process the features if they haven't changed
|
85
94
|
def has_spatial_features_hash?
|
86
95
|
column_names.include? 'features_hash'
|
@@ -67,9 +67,10 @@ module SpatialFeatures
|
|
67
67
|
private
|
68
68
|
|
69
69
|
def spatial_feature_imports(import_options, make_valid)
|
70
|
-
import_options.
|
71
|
-
|
72
|
-
|
70
|
+
import_options.flat_map do |data_method, importer_name|
|
71
|
+
Array.wrap(send(data_method)).map do |data|
|
72
|
+
spatial_importer_from_name(importer_name).new(data, :make_valid => make_valid) if data.present?
|
73
|
+
end
|
73
74
|
end.compact
|
74
75
|
end
|
75
76
|
|
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.
|
4
|
+
version: 2.12.0
|
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: 2020-06-
|
12
|
+
date: 2020-06-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|