Dive site tags [was: IMPORTANT information about current master: dive site management]

Dirk Hohndel dirk at hohndel.org
Sat Feb 14 20:34:05 PST 2015


On Sat, Feb 14, 2015 at 06:55:18PM -0800, Dirk Hohndel wrote:
> On Sat, Feb 14, 2015 at 05:43:38PM +0100, Henrik Brautaset Aronsen wrote:
> > On 14 Feb 2015, at 16:51, Henrik Brautaset Aronsen <subsurface at henrik.synth.no> wrote:
> > > 
> > > On 14 Feb 2015, at 17:03, Dirk Hohndel <dirk at hohndel.org> wrote:
> > >> Here's a completely crazy idea... if sites have GPS we can do a reverse
> > >> lookup and figure out the country. And we can even display that (as
> > >> derived information, not something the user enters). And then, if the
> > >> (localized) country string appears in the dive site name, drop that part.
> > >> 
> > >> What do you think?
> > > 
> > > Not important to me, but it sounds good.
> > 
> > After dinner and a glass of wine, I can upgrade my praise:  Reverse
> > lookup sounds great!  Let's just hope we can keep up to date with
> > ever-changing border disputes ;)
> 
> So I know how to do this and have tested it and have an idea how to
> implement it... BUT... in which language would you like that response to
> be? It's easy to have it respond in your UI language. But that may not be
> the language in which you fill out these fields. So this is not a perfect
> solution... and it may not be able to reliably detect a country component
> in your site name in order to strip that... are you saying "US"? Or "USA"?
> Or "United States of America" (I sure hope not). Etc.
> 
> Oh, and of course there's the problem that these are web service request
> and the internet may be down or blocked or slow or... so I need to figure
> out how to work around that, too.
> 
> I still like the idea :-)

And because I do and because I had some spare time this evening... I just
created a crude proof of concept and pushed it out.

This has a few warts:
- only works for XML
- since we don't have Tags yet, it adds a "countrytag:" to the notes instead
- it is slow (I have 127 distinct GPS fixes in my dive log and it took
  about 20 seconds to open a V2 export of that logfile). I have no idea
  how horribly slow it will be in other geos / for people with slow
  internet connection. I haven't even tested what it does with no internet
  connection... I bet it's horrible

Mostly I want to know what people think about this idea. It would be
trivial to add this whenever someone adds (from whatever source) a GPS fix
to a dive site.

This does try to be smart and asks for the country in your UI language. So
if you are running Subsurface in Norwegian, you should get Norwegian
country names :-)

So, comments? Suggestions? Flames?

/D


More information about the subsurface mailing list