Skip to content

Commit 2d382db

Browse files
committed
Restrict location area padding
1 parent 36698f7 commit 2d382db

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

app/models/sample_set.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,13 @@ def locations_area(min = 0.1, pad = 0.5)
102102
end
103103
end
104104

105-
[rng[:lat][0], rng[:lon][0], rng[:lat][1], rng[:lon][1]]
105+
106+
[
107+
[rng[:lat][0], -90.0].max,
108+
[rng[:lon][0], -180.0].max,
109+
[rng[:lat][1], 90.0].min,
110+
[rng[:lon][1], 180.0].min
111+
]
106112
end
107113

108114
def known_biosamples

0 commit comments

Comments
 (0)