spatial_features 0.0.1 → 0.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c42265b78f3d41490bf8e89691d57f1cab48d9b2
4
- data.tar.gz: bdc3542a36c9584b6f18bceddda2b7e175997a2e
3
+ metadata.gz: ebe5139b0ac443b8695418ee063bc4159d77fd90
4
+ data.tar.gz: 359c137fe020fafd1bd1c3305c7cf9d2411e18ea
5
5
  SHA512:
6
- metadata.gz: a17091a2662a74ac313c47059ac13f63a220a45fbce3c11aedffc7ccc6c74c8425b07aec89ccc0a1b00772c5405bcaa5432ac39bd20aa8398d93ac405d7407eb
7
- data.tar.gz: 7a15bb57318905523faa487ff24ac34b48a331e893d4088dfa77aff0c8dda933604599428f2030263d9b67bf287cfd4e316486b007c893978c51ab9cd263ea0d
6
+ metadata.gz: 4ae9db0d8dffdf9957e839dceb75c627ce815b79866f1bfe127ecdb9329c02159606378bf33b4da68bd96557b34c6bfd475e6dc7ed111acf7de02f490d3fa0fa
7
+ data.tar.gz: b0a6f1f503188e9b71304792b00ad1e82a58c0b824a4b49784a07f487cee34bc7072f1cbd649b744109270ed8e28148bd0a68b417bbab5852fc2f36c99fddcf5
@@ -9,7 +9,7 @@ module SpatialFeatures
9
9
 
10
10
  extend SpatialFeatures::ClassMethods
11
11
  include SpatialFeatures::InstanceMethods
12
- end
12
+ end
13
13
  end
14
14
 
15
15
  module ClassMethods
@@ -37,9 +37,9 @@ module SpatialFeatures
37
37
  .select("#{table_name}.*")
38
38
  .group("#{table_name}.#{primary_key}")
39
39
 
40
- scope = scope.where('ST_DWithin(features_for.geog_lowres, features_for_other.geog_lowres, ?)', buffer_in_meters) if buffer_in_meters
41
- scope = scope.select("MIN(ST_Distance(features_for.geog_lowres, features_for_other.geog_lowres)) AS distance_in_meters") if options[:distance]
42
- scope = scope.select("SUM(ST_Area(ST_Intersection(features_for.geog_lowres, features_for_other.geog_lowres))) AS intersection_area_in_square_meters") if options[:intersection_area]
40
+ scope = scope.where('ST_DWithin(features_for.geog, features_for_other.geog, ?)', buffer_in_meters) if buffer_in_meters
41
+ scope = scope.select("MIN(ST_Distance(features_for.geog, features_for_other.geog)) AS distance_in_meters") if options[:distance]
42
+ scope = scope.select("SUM(ST_Area(ST_Intersection(features_for.geog, features_for_other.geog))) AS intersection_area_in_square_meters") if options[:intersection_area]
43
43
  end
44
44
 
45
45
  return scope
@@ -155,4 +155,4 @@ module SpatialFeatures
155
155
  end
156
156
  end
157
157
  end
158
- end
158
+ end
@@ -1,3 +1,3 @@
1
1
  module SpatialFeatures
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  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: 0.0.1
4
+ version: 0.0.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: 2014-08-26 00:00:00.000000000 Z
12
+ date: 2014-09-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails