TerriaJS / terriajs

A library for building rich, web-based geospatial data platforms.
https://terria.io
Apache License 2.0
1.16k stars 360 forks source link

Support geohash queries #4785

Open MatthewJA opened 3 years ago

MatthewJA commented 3 years ago

Feature request to support spatial queries by geohash. This would be really useful for projects which name polygons or points by their location.

rowanwins commented 3 years ago

Hey @MatthewJA

Thanks for the suggestion, can you perhaps just expand how you'd envisage this working?

Thanks, Rowan

MatthewJA commented 3 years ago

Hi @rowanwins, sure thing. The search box could take geohash queries: image which would resolve as locations: image

Here's an image of a dataset that makes use of geohashes already as identifiers: image

The current workflow for using geohashes is to first convert them with a service like http://geohash.co/ into lat/lon and then search for that instead, which resolves to a coordinate location.

rowanwins commented 3 years ago

Yeah cool, the search box was the easy (ier) thing that came to mind. Thanks for the clarification.

KeyboardSounds commented 3 years ago

We should be able to support this relatively easily using the new Web Feature Service search provider since there's a WFS version of this layer.

rowanwins commented 3 years ago

Or pull in an npm package like ngeohash or latlon-geohash which does the decoding clientside

KeyboardSounds commented 3 years ago

@rowanwins I like your idea better, because it's much more generic. The WFS search provider approach is layer-specific, but decoding a geohash isn't.