advance 0.3.7 → 0.3.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/advance/version.rb +1 -1
- data/lib/clip_to_region.rb +10 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4210114f31a5e3b5a9f8d98c5a2c9ac0838392400e5a4c171e3b990d70c04e71
|
4
|
+
data.tar.gz: 66f6dc642aebf8578dccd0941c7aceeed7e191ca49ba30b4f1058bcdea9ea56a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85b0df76cd8a24848672b1e0da5830561612e318ed1275306fc05536212cf23277b0cedc00ab87953bbafaa7ae0440cd20332b4b082a2849fec3bf1668803d23
|
7
|
+
data.tar.gz: e3f1f71219d8b270bbf53b32981e0ce1a5df2b364329b127f76647d6e25edde32270be57cf012c4d7841eed4695d14a3e1e46e3310d0db19ef5a0198bb50742f
|
data/Gemfile.lock
CHANGED
data/lib/advance/version.rb
CHANGED
@@ -0,0 +1,10 @@
|
|
1
|
+
def clip_to_region(p1, p2, lat_column_name, lon_column_name)
|
2
|
+
min_lat = [p1[0], p2[0]].min
|
3
|
+
max_lat = [p1[0], p2[0]].max
|
4
|
+
min_lon = [p1[1], p2[1]].min
|
5
|
+
max_lon = [p1[1], p2[1]].max
|
6
|
+
%Q|'(row[#{c0(lat_column_name)}]>=#{min_lat} && |+
|
7
|
+
%Q|row[#{c0(lat_column_name)}]<=#{max_lat}) && |+
|
8
|
+
%Q|(row[#{c0(lon_column_name)}]>=#{min_lon} && |+
|
9
|
+
%Q|row[#{c0(lon_column_name)}]<=#{max_lon})'|
|
10
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: advance
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- janemacfarlane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: team_effort
|
@@ -104,6 +104,7 @@ files:
|
|
104
104
|
- bin/split_csv.rb
|
105
105
|
- lib/advance.rb
|
106
106
|
- lib/advance/version.rb
|
107
|
+
- lib/clip_to_region.rb
|
107
108
|
- lib/file_path_generator.rb
|
108
109
|
homepage: https://github.com/doctorjane/advance
|
109
110
|
licenses:
|
@@ -125,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
126
|
version: '0'
|
126
127
|
requirements: []
|
127
128
|
rubyforge_project:
|
128
|
-
rubygems_version: 2.7.
|
129
|
+
rubygems_version: 2.7.9
|
129
130
|
signing_key:
|
130
131
|
specification_version: 4
|
131
132
|
summary: A framework for building data transformation pipelines
|