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

Geospatial search #139

Merged
merged 4 commits into from
Mar 15, 2024
Merged

Geospatial search #139

merged 4 commits into from
Mar 15, 2024

Conversation

richard-epsilla
Copy link
Contributor

Create table with geo_point field:

POST http://localhost:8888/api/MyDB/schema/tables
{
    "name": "MyTable1301",
    "returnTableId": true,
    "fields": [
        {
            "name": "Location",
            "dataType": "GEO_POINT"
        },
        ...
    ]
}

Insert data:

POST http://localhost:8888/api/MyDB/data/insert
{
    "table": "MyTable1301",
    "data": [
        {
            "Location": {
                "latitude": 36.7783,
                "longitude": -119.4179
            }
            ...
        },
        ...
    ]
}

Query data with geo filter:

POST http://localhost:8888/api/MyDB/data/get
{
        "table": "MyTable1301",
        "filter": "... and (NEARBY(Location, 34.0522, -118.2437, 150))",
        "limit": 50000
}

@richard-epsilla richard-epsilla merged commit cc02d8e into main Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants