MapColonies / MapColonies/geocoding

Location query - reverse search (lat-lon to location)

Open
#54 0 comments 0 reactions 0 assignees View on GitHub

@NivGreenstein is already working on this.

Since Nov 28, 2024.

  • #71 by @NivGreenstein — open
enhancement
Dominant language
TypeScript
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

We would like to add a support to our API that for a given `WGS84` coordinates, it will response with whats in that location.
For example, for a given `(-118.30724539059837, 33.71618286284796)` coordinates, It will response with geojson like so:
```
{
"type": "FeatureCollection",
"geocoding": {
"version": "0.1.0",
"query": {
"query": "school",
"disable_fuzziness": false,
"geo_context": { "bbox": [2.34509596673945, 48.87896264245859, 2.3502230438252525, 48.881502327359925] },
"geo_context_mode": "filter",
"limit": 5
},
"response": {
"results_count": 1,
"max_score": 1.2880917,
"match_latency_ms": 7,
"name": "",
"place_types": [ "education" ],
"sub_place_types": [ "school" ],
"hierarchies": []
}
},
"features": [
{
"type": "Feature",
"geometry": {
"coordinates": [ [ [ -118.30812263653988, 33.71684417247593 ],
[ -118.30861990876181, 33.71674433152869 ],
[ -118.30879709771484, 33.71635922964194 ],
[ -118.30619642115158, 33.71550819588987 ],
[ -118.30586490633668, 33.715921827872904 ],
[ -118.30587062210924, 33.716183318328746 ],
[ -118.30812263653988, 33.71684417247593 ]
]
],
"type": "Polygon"
},
"properties": {
"score": 1.2880917,
"matches": [ { "layer": "osm_schools", "source": "OSM", "source_id": [ "1a5b981b-bb0e-44dd-b9e2-424b92f2de49" ] } ],
"names": { "en": [ "White Point Elementary School" ], "fr": [ "Escuela Primaria White Point" ], "default": [ "White Point Elementary School" ], "display": "White Point Elementary School" },
"placetype": "education",
"sub_placetype": "school",
"regions": [ { "region": "USA", "sub_region_names": [ "Los Angeles" ] } ]
}
}
]
}
```

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the open pull request #71, which is already linked to this issue. Compare its implementation with the requested WGS84 coordinate input and example GeoJSON response. Done means the API supports reverse location lookup and returns the requested response shape.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.