geo_magic 0.2.1.3 → 0.2.1.4
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.
- data/VERSION +1 -1
- data/geo_magic.gemspec +1 -1
- data/lib/geo_magic/util.rb +1 -1
- data/spec/geo_magic/select_nearest_spec.rb +15 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.1.
|
1
|
+
0.2.1.4
|
data/geo_magic.gemspec
CHANGED
data/lib/geo_magic/util.rb
CHANGED
@@ -75,6 +75,20 @@ describe "GeoMagic closest" do
|
|
75
75
|
center_person = Person.new 'Man in the center', @center_point
|
76
76
|
|
77
77
|
people_within = persons.as_map_points.within_distance 5.km, :from => center_person
|
78
|
-
puts "
|
78
|
+
puts "People within 4 km of Man in the center: #{people_within.inspect}"
|
79
|
+
end
|
80
|
+
|
81
|
+
it "should select all people in rectangle" do
|
82
|
+
|
83
|
+
points = @radius.create_points_in_square 4
|
84
|
+
persons = Person.random_at points
|
85
|
+
|
86
|
+
center_person = Person.new 'Man in the center', @center_point
|
87
|
+
|
88
|
+
rectangle = GeoMagic::Rectangle.create_from_coords -115, 50, -100, 20
|
89
|
+
|
90
|
+
people_in_rectangle = persons.as_map_points.within_rectangle rectangle
|
91
|
+
puts "People in the rectangular area: #{people_in_rectangle.inspect}"
|
79
92
|
end
|
93
|
+
|
80
94
|
end
|
metadata
CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
|
|
6
6
|
- 0
|
7
7
|
- 2
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.2.1.
|
9
|
+
- 4
|
10
|
+
version: 0.2.1.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Kristian Mandrup
|
@@ -193,7 +193,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
193
193
|
requirements:
|
194
194
|
- - ">="
|
195
195
|
- !ruby/object:Gem::Version
|
196
|
-
hash:
|
196
|
+
hash: 1418808152282982370
|
197
197
|
segments:
|
198
198
|
- 0
|
199
199
|
version: "0"
|