BHoM / BHoM/OpenStreetMap_Toolkit

Wrap GeoSearch queries into a single method

Open
#68 0 comments 0 reactions 0 assignees View on GitHub
type:feature
Dominant language
C#
Stars
4
Forks
2
Avg merge
10d 18h
Merged PRs (30d)
1

Description

Anticipating #67 (name based queries) that will add to the existing OpenStreetMap type queries based on key value pairs the proposal here is to consider generalising the geospatial search.
The goal is to make a user friendly `GeoSearch` that returns a `GetRequest` ready for the `HTTPAdapter` to Pull (or maybe the HTTPAdapter part is also wrapped up and return results?)
![image](https://user-images.githubusercontent.com/6618854/132545495-d2be8124-015f-40a9-af3b-c882a6d1f9f2.png)
4 simple inputs are the input basic requirement:
1. searchFor (mandatory)
2. searchIn (optional)
3. settings (optional)
4. active (run)

### Mandatory **what to search for**
- OSM objects (defined by standard OSM key or **category** and type (if no type all types in category))
- Addresses (or part addresses)
- Free form queries (taking advantage of [Nominatim special phrases](https://wiki.openstreetmap.org/wiki/Nominatim/Special_Phrases/EN))
![image](https://user-images.githubusercontent.com/6618854/132541720-da3bad44-d287-4946-a129-fa699b829e48.png)
### Optional **where to search in** (default is the world):
- latitude, longitude point and radius string
- point (as per[ geojson point spec](https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.2)) and radius
- boundingbox (as per [geojson spec](https://datatracker.ietf.org/doc/html/rfc7946#section-5))
- polygon (as per [geojson spec](https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.6))
![image](https://user-images.githubusercontent.com/6618854/132542019-18c23a39-bf27-4bc9-b5fb-02d52968bfe3.png)
### Optional **settings** (default is to return geojson formatted data + polygons, limit result to 50, provide all details, search all countries)
![image](https://user-images.githubusercontent.com/6618854/132543131-957c3859-67a3-4992-9cf9-84920c239644.png)

At most simple this could unlock the potential of a search like this:
![image](https://user-images.githubusercontent.com/6618854/132547836-8a9c67b6-3119-46aa-8938-13466e94c350.png)

Steps towards this (each an individual PR):
1. Merge PR #66
2. Add basic unwrapped Nominatin requests #67
3. Add prototype GeoJson objects (just in the OpenStreetMap_Toolkit as a start)
4. Add converts ToGeoJson and FromGeoJson (including extending the ToUTM converts to convert GeoJson to Universal Transverse Mercator)
5. Add OpenStreetMap_Toolkit request builder to return a correctly configured `GetRequest`.
6. Wrap the GeoSearch as described above.

@rwemay @al-fisher any further thoughts on this one?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.