geoq 0.0.1.pre → 0.0.1
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 -3
- data/README.md +3 -0
- data/lib/geoq/version.rb +1 -1
- data/test/usage_test.rb +1 -1
- data/usage.md +18 -22
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 370393af98fde48cdbf577971ac0024ef6c36dde
|
4
|
+
data.tar.gz: 5ece21e4e719a0f601fe5a22560d1423d16189e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad791e2f4b9adc2f2056aa871e2bcda2c047b8c09ada892d5607c0aaff05bb060e5147ba7e38bd28ba54bd9841fec8197f1dd04fbf0d585d4eaa5975f7bf8fc8
|
7
|
+
data.tar.gz: aa9d613c4ac743b2c0b32309cbfe60e226a1405f1b3227fe9b0302817a33c71a25c53c72410b0664b03fff90418eb39001c04810a84814fc169ea03218a5fcca
|
data/Gemfile.lock
CHANGED
@@ -37,7 +37,7 @@ GEM
|
|
37
37
|
backports (>= 3.8.0)
|
38
38
|
cucumber-tag_expressions (~> 1.1.0)
|
39
39
|
gherkin (>= 5.0.0)
|
40
|
-
cucumber-expressions (5.0.
|
40
|
+
cucumber-expressions (5.0.18)
|
41
41
|
cucumber-tag_expressions (1.1.1)
|
42
42
|
cucumber-wire (0.0.1)
|
43
43
|
diff-lcs (1.3)
|
@@ -58,7 +58,6 @@ GEM
|
|
58
58
|
coderay (~> 1.1.0)
|
59
59
|
method_source (~> 0.9.0)
|
60
60
|
rake (12.3.1)
|
61
|
-
rdoc (6.0.4)
|
62
61
|
rgeo (1.0.0)
|
63
62
|
rgeo-geojson (2.0.0)
|
64
63
|
rgeo (~> 1.0)
|
@@ -79,7 +78,6 @@ DEPENDENCIES
|
|
79
78
|
minitest-reporters (~> 1.2)
|
80
79
|
pry (~> 0.11)
|
81
80
|
rake (~> 12.3)
|
82
|
-
rdoc (~> 6.0)
|
83
81
|
|
84
82
|
BUNDLED WITH
|
85
83
|
1.16.2
|
data/README.md
CHANGED
data/lib/geoq/version.rb
CHANGED
data/test/usage_test.rb
CHANGED
data/usage.md
CHANGED
@@ -1,67 +1,63 @@
|
|
1
1
|
# Geoq Usage
|
2
2
|
|
3
|
-
|
4
|
-
alias geoqqq="bundle exec geoq" &&
|
5
|
-
```
|
6
|
-
|
7
|
-
## GeoJSON (`geoq gj`)
|
3
|
+
## Generating GeoJSON (`geoq gj`)
|
8
4
|
|
9
5
|
Output a geo feature as a GeoJSON Geometry
|
10
6
|
|
11
7
|
```example
|
12
|
-
echo 9q5 |
|
8
|
+
echo 9q5 | geoq gj geometry
|
13
9
|
=> {"type":"Polygon","coordinates":[[[-119.53125,33.75],[-118.125,33.75],[-118.125,35.15625],[-119.53125,35.15625],[-119.53125,33.75]]]}
|
14
10
|
```
|
15
11
|
|
16
12
|
Output a geo feature as a GeoJSON Feature
|
17
13
|
|
18
14
|
```example
|
19
|
-
echo 9q5 |
|
15
|
+
echo 9q5 | geoq gj feature
|
20
16
|
=> {"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-119.53125,33.75],[-118.125,33.75],[-118.125,35.15625],[-119.53125,35.15625],[-119.53125,33.75]]]}}
|
21
17
|
```
|
22
18
|
|
23
19
|
Combine 1 or more geo features into a GeoJSON Feature Collection
|
24
20
|
|
25
21
|
```example
|
26
|
-
printf "9q5\n9q4\n" |
|
22
|
+
printf "9q5\n9q4\n" | geoq gj fc
|
27
23
|
=> {"type":"FeatureCollection","features":[{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-119.53125,33.75],[-118.125,33.75],[-118.125,35.15625],[-119.53125,35.15625],[-119.53125,33.75]]]}},{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-120.9375,33.75],[-119.53125,33.75],[-119.53125,35.15625],[-120.9375,35.15625],[-120.9375,33.75]]]}}]}
|
28
24
|
```
|
29
25
|
|
30
26
|
Converts Geohashes, WKTs, Lat/Lons, and GeoJSON into GeoJSON
|
31
27
|
|
32
28
|
```example
|
33
|
-
echo 9q5 |
|
29
|
+
echo 9q5 | geoq gj geometry
|
34
30
|
=> {"type":"Polygon","coordinates":[[[-119.53125,33.75],[-118.125,33.75],[-118.125,35.15625],[-119.53125,35.15625],[-119.53125,33.75]]]}
|
35
31
|
```
|
36
32
|
|
37
33
|
```example
|
38
|
-
echo "POINT (1.0 2.0)" |
|
34
|
+
echo "POINT (1.0 2.0)" | geoq gj geometry
|
39
35
|
=> {"type":"Point","coordinates":[1.0,2.0]}
|
40
36
|
```
|
41
37
|
|
42
38
|
```example
|
43
|
-
echo "34.52,-118.3" |
|
39
|
+
echo "34.52,-118.3" | geoq gj geometry
|
44
40
|
=> {"type":"Point","coordinates":[-118.3,34.52]}
|
45
41
|
```
|
46
42
|
|
47
43
|
```example
|
48
|
-
echo '{"type":"Point","coordinates":[-118.3,34.52]}' |
|
44
|
+
echo '{"type":"Point","coordinates":[-118.3,34.52]}' | geoq gj geometry
|
49
45
|
=> {"type":"Point","coordinates":[-118.3,34.52]}
|
50
46
|
```
|
51
47
|
|
52
|
-
## Geohashes (`geoq gh`)
|
48
|
+
## Working with Geohashes (`geoq gh`)
|
53
49
|
|
54
50
|
Convert a point to a geohash at specified level
|
55
51
|
|
56
52
|
```example
|
57
|
-
echo "34,-118" |
|
53
|
+
echo "34,-118" | geoq gh point 4
|
58
54
|
=> 9qh1
|
59
55
|
```
|
60
56
|
|
61
57
|
Get children of a geohash
|
62
58
|
|
63
59
|
```example
|
64
|
-
echo 9qh1 |
|
60
|
+
echo 9qh1 | geoq gh children
|
65
61
|
=> 9qh10
|
66
62
|
9qh11
|
67
63
|
9qh12
|
@@ -99,7 +95,7 @@ echo 9qh1 | bundle exec bin/geoq gh children
|
|
99
95
|
Get neighbors of a geohash
|
100
96
|
|
101
97
|
```example
|
102
|
-
echo 9qh1 |
|
98
|
+
echo 9qh1 | geoq gh neighbors
|
103
99
|
=> 9qh4
|
104
100
|
9qh6
|
105
101
|
9qh3
|
@@ -113,7 +109,7 @@ echo 9qh1 | bundle exec bin/geoq gh neighbors
|
|
113
109
|
Include the original geohash in the neighbors list:
|
114
110
|
|
115
111
|
```example
|
116
|
-
echo 9qh1 |
|
112
|
+
echo 9qh1 | geoq gh neighbors -i
|
117
113
|
=> 9qh1
|
118
114
|
9qh4
|
119
115
|
9qh6
|
@@ -125,26 +121,26 @@ echo 9qh1 | bundle exec bin/geoq gh neighbors -i
|
|
125
121
|
9q5f
|
126
122
|
```
|
127
123
|
|
128
|
-
## WKT (`geoq wkt`)
|
124
|
+
## Generating WKT (`geoq wkt`)
|
129
125
|
|
130
126
|
Converts Geohashes, WKTs, Lat/Lons, and GeoJSON into GeoJSON
|
131
127
|
|
132
128
|
```example
|
133
|
-
echo 9q5 |
|
129
|
+
echo 9q5 | geoq wkt
|
134
130
|
=> POLYGON ((-119.53125 33.75, -118.125 33.75, -118.125 35.15625, -119.53125 35.15625, -119.53125 33.75))
|
135
131
|
```
|
136
132
|
|
137
133
|
```example
|
138
|
-
echo "POINT (1.0 2.0)" |
|
134
|
+
echo "POINT (1.0 2.0)" | geoq wkt
|
139
135
|
=> POINT (1.0 2.0)
|
140
136
|
```
|
141
137
|
|
142
138
|
```example
|
143
|
-
echo "34.52,-118.3" |
|
139
|
+
echo "34.52,-118.3" | geoq wkt
|
144
140
|
=> POINT (-118.3 34.52)
|
145
141
|
```
|
146
142
|
|
147
143
|
```example
|
148
|
-
echo '{"type":"Point","coordinates":[-118.3,34.52]}' |
|
144
|
+
echo '{"type":"Point","coordinates":[-118.3,34.52]}' | geoq wkt
|
149
145
|
=> POINT (-118.3 34.52)
|
150
146
|
```
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: geoq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.1
|
4
|
+
version: 0.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Horace Williams
|
@@ -181,9 +181,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
181
181
|
version: '0'
|
182
182
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
183
183
|
requirements:
|
184
|
-
- - "
|
184
|
+
- - ">="
|
185
185
|
- !ruby/object:Gem::Version
|
186
|
-
version:
|
186
|
+
version: '0'
|
187
187
|
requirements: []
|
188
188
|
rubyforge_project:
|
189
189
|
rubygems_version: 2.6.14.1
|