worace / geoq

Geospatial Utility Belt
MIT License
72 stars 8 forks source link

Easy way to find the "root" geohash children #23

Closed b-jazz closed 5 years ago

b-jazz commented 5 years ago

It's easy enough to generate the children of a given geohash:

echo "0" | geoq gh children
00
...
0z

but figuring out the single character doesn't seem to be possible:

echo "" | geoq gh children
Application error: UnknownEntityFormat

There is a hack, but it's a hack:

echo "0" | geoq gh children | cut -c2
0
...
z
worace commented 5 years ago

@b-jazz I think I see what you are saying. What would you think about having a separate command that just lists the roots, something like:

geoq gh roots
0
1
2
3
4
5
6
7
8
9
b
c
d
e
f
g
h
j
k
m
n
p
q
r
s
t
u
v
w
x
y
z

That would be pretty easy to add -- I drafted up a PR for it here: https://github.com/worace/geoq/pull/24. But also open to any other ideas about how the interface should work, so let me know if you have any ideas there.

b-jazz commented 5 years ago

That’s a perfectly acceptable solution. Thanks.

On Sat, Feb 16, 2019 at 10:09 PM Horace Williams notifications@github.com wrote:

@b-jazz https://github.com/b-jazz I think I see what you are saying. What would you think about having a separate command that just lists the roots, something like:

geoq gh roots 0 1 2 3 4 5 6 7 8 9 b c d e f g h j k m n p q r s t u v w x y z

That would be pretty easy to add -- I drafted up a PR for it here: #24 https://github.com/worace/geoq/pull/24. But also open to any other ideas about how the interface should work, so let me know if you have any ideas there.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/worace/geoq/issues/23#issuecomment-464421105, or mute the thread https://github.com/notifications/unsubscribe-auth/AGXAIgoeVTLWb3iWWdhM0gbfQomKbo9Oks5vOPIMgaJpZM4a_PlE .

worace commented 5 years ago

@b-jazz cool, just pushed that as 0.0.12!