MapColonies / MapColonies/geocoding

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

未关闭
#54 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

@NivGreenstein 已经在做这个了。

开始于 2024年11月28日。

  • #71 来自 @NivGreenstein —— 未关闭
enhancement
主要语言
TypeScript
星标
0
派生
0
PR 合并指标
30 天内没有已合并 PR

描述

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" ] } ]
            }
        }
    ]
}

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先审查已与此 issue 关联的开放 pull request #71。将其实现与所请求的 WGS84 坐标输入和示例 GeoJSON 响应进行比较。当 API 支持反向位置查询并返回所请求的响应结构时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
typescript
领域
api, backend
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。