MushroomObserver / mushroom-observer

A website for sharing observations of mushrooms.
https://mushroomobserver.org
MIT License
77 stars 25 forks source link

Replace observation search param `has_location` with `has_public_lat_lng`, fix search instructions #2095

Closed nimmolo closed 3 months ago

nimmolo commented 3 months ago

Until now, we don't have a parameter to search for obs with geolocation. We do however have a query param has_location which is currently not very useful. Addresses #2093.

Now incorporates #2096, renaming long to lng everywhere, because it's tangentially relevant to this PR.

Questions:

coveralls commented 3 months ago

Coverage Status

coverage: 94.395% (-0.01%) from 94.409% when pulling 5352d83aca75c4d2b5037c89105f375d35d91101 on search-has-lat-long into 2be0832145b6d3c8fc4e7757f8c8b9af98a8e3d5 on main.

nimmolo commented 3 months ago

Please vote for a name for this param:

pellaea commented 3 months ago

My 2¢ = has_public_lat_long because that is least ambiguous.

nimmolo commented 3 months ago

Per email conversation with @pellaea it seems the has_location param is only useful for finding undefined Locations. That query returns only one observation in the entire database with an undefined location currently (and it's from the town I live in!)

nimmolo commented 3 months ago

@JoeCohen should we retire has_location?

JoeCohen commented 3 months ago

param name: I'm good with whatever others like. If it were up to me I'd use something without "has" (will avoid one rubocop issue). maybe with_public_geolocation

I'm OK with retiring has_location.

nimmolo commented 3 months ago

@mo-nathan is the has_location query param useful for projects, or anything you're working on?

In case you missed the discussion on this, has_location only checks for an associated location, which of course could be "Alabama, USA", so it's not so useful, except for finding obs with undefined location.

The current use people seem to have for something like this, however, is trying to find observations that "have a precise and public GPS lat/long". Until now, the search instructions for the has_location param erroneously suggested this was what it did.