Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow spatial searching on WKT (HG) for specimens #919

Closed
mkoo opened this issue Aug 1, 2016 · 2 comments
Closed

Allow spatial searching on WKT (HG) for specimens #919

mkoo opened this issue Aug 1, 2016 · 2 comments
Labels

Comments

@mkoo
Copy link
Member

mkoo commented Aug 1, 2016

Use case: searching for specimens that intersect a polygon like Yosemite NP using the footprint or WKT polygon even if specimen does not reference Yosemite in the locality description. Can we leverage Google Maps API or BerkeleyMapper perhaps?

@mkoo mkoo added Priority-High (Needed for work) High because this is causing a delay in important collection work.. Function-Locality/Event/Georeferencing Function-SearchOrDownload labels Aug 1, 2016
@dustymc dustymc added this to the Wish List milestone Oct 7, 2016
@dustymc
Copy link
Contributor

dustymc commented Oct 7, 2016

We don't have Oracle Spatial, so I don't think that back-end polygon intersection queries are possible. (Perhaps there's some tool I haven't found though??)

The only way I see to leverage a service would be to pass it all of our (currently 733,197) localities along with the "search shape," which doesn't seem practical.

Perhaps I could narrow that down and grab the coordinates within {a few degrees or something} of our "yosemite" polygon and check those. (That code, which leverages Google APIs, exists as the "Find specimens with coordinates "outside" the WKT shape (new window)" widget from edit geography.) I'd expect that to be a fairly slow and somewhat wonky operation not particularly practical for public specimen search, at best.

You can SORT OF get at the idea with the cached reverse georeferencing data, but that relies on Google's shape for Yosemite (which we can't see). Results of....

create table temp as 
select 
  higher_geog,
  spec_locality,
  S$GEOGRAPHY
from 
  locality,
  geog_auth_rec 
where 
  locality.geog_auth_rec_id=geog_auth_rec.geog_auth_rec_id and 
  upper(higher_geog) not like '%YOSEMITE%' and 
  upper(spec_locality) not like '%YOSEMITE%' and 
  upper(S$GEOGRAPHY) like '%YOSEMITE NATIONAL PARK%'
;

.... not attached, because GitHub doesn't like CSV?!?

https://docs.google.com/spreadsheets/d/1PpiuJ3XPyjTeZc3U9OUowh4J3pNeMq-nRnJV_2dDCzg/edit?usp=sharing

Moving to wish list - we have a place for these data, we have a fair bit of data in place, finding tools to do this seems extremely useful.

@dustymc
Copy link
Contributor

dustymc commented Jul 1, 2020

Merge-->#2660

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants