spatial_features 3.6.2 → 3.7.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: 301894cdb34ba62e4176add97fdd2462e4618cabdc7d86af8ff28113ea35fe13
|
4
|
+
data.tar.gz: 2d89a66243c80d8333f3825721c7fe0da008302d097a6f4033e97231b2052433
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d483dddd5d794a4a1cacee046abb80d1ac91301e48f4b108adb9cc7b8bdc7ba72cb0aee80a559fbdecb8896094ee51fc957d41ee8dfb069ffc51d101efffd8d
|
7
|
+
data.tar.gz: 3500d719c5c216a5667e70ba85460b72bfcfd62a3fc0a9351f67f7627baa94461c836bf315defeeb00f3de5ee5bc3ff1e4aea128cfb642905fc1400347a1b45d
|
@@ -8,6 +8,12 @@ module SpatialExtensions
|
|
8
8
|
end
|
9
9
|
end
|
10
10
|
|
11
|
+
def abstract_clear_feature_update_errors(models)
|
12
|
+
Array.wrap(models).each do |model|
|
13
|
+
model.clear_feature_update_error_status
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
11
17
|
def abstract_proximity_action(scope, target, distance, &block)
|
12
18
|
@nearby_records = scope_for_search(scope).within_buffer(target, distance, :distance => true, :intersection_area => true).order('distance_in_meters ASC, intersection_area_in_square_meters DESC, id ASC')
|
13
19
|
@target = target
|
@@ -29,6 +29,12 @@ module SpatialFeatures
|
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
32
|
+
def clear_feature_update_error_status
|
33
|
+
with_lock do
|
34
|
+
SpatialFeatures::QueuedSpatialProcessing.update_cached_status(self, :update_features!, nil) if updating_features_failed?
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
32
38
|
def updating_features_failed?
|
33
39
|
spatial_processing_status(:update_features!) == :failure
|
34
40
|
end
|
@@ -10,7 +10,7 @@ module SpatialFeatures
|
|
10
10
|
# -118.1,50.9,NaN
|
11
11
|
# -118.1,50.9,0
|
12
12
|
# -118.1,50.9
|
13
|
-
COORDINATES_WITH_ALTITUDE = /((
|
13
|
+
COORDINATES_WITH_ALTITUDE = /(?<lng>\S+),(?<lat>\S+),(?<alt>\S+)/.freeze
|
14
14
|
|
15
15
|
def initialize(data, base_dir: nil, **options)
|
16
16
|
@base_dir = base_dir
|
@@ -117,8 +117,7 @@ module SpatialFeatures
|
|
117
117
|
|
118
118
|
def strip_altitude(kml)
|
119
119
|
kml.css('coordinates').each do |coordinates|
|
120
|
-
|
121
|
-
coordinates.content = coordinates.content.gsub(COORDINATES_WITH_ALTITUDE, '\2')
|
120
|
+
coordinates.content = coordinates.content.gsub(COORDINATES_WITH_ALTITUDE, '\k<lng>,\k<lat>')
|
122
121
|
end
|
123
122
|
end
|
124
123
|
end
|
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: 3.
|
4
|
+
version: 3.7.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: 2024-
|
12
|
+
date: 2024-05-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|