Skip to content

OpenArCloud/SCD-FastAPI-Tile38

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


SCD-FastAPI-Tile38

OSCP Spatial Content Discovery using FastAPI and Tile38.

About The Project

Update of OSCP Spatial Service Discovery to support prototype development in the MSF Real/Virtual World Inte gration Working Group. Adapted from FastAPI-Tile38.

Getting Started

Installation

  1. Clone and install
    git clone https://github.com/OpenArCloud/SCD-FastAPI-Tile38.git
    cd SCD-FastAPI-Tile38
    poetry install
  2. Setup environment
    cp .env.dist .env
  3. Start your local stack
    docker-compose up

Usage

Once the application is started you can checkout and interact with it via on localhost:8002/docs.

Or you can use it with http/curl:

echo '{ "data": { "type": "Feature", "geometry": {"type": "Point", "coordinates": [-1.472761207099694,50.93965177660982]}, "properties": {"id": "uuid1", "content":[{"geopose": {"position": {"lat": 50.93965177660982, "lon": -1.472761207099694, "h": 1000}, "quaternion": {"x": 0.0, "y": 0.0, "z": 0.0, "w": 0.0}},
 "metatype": "model3D", "contenttype": "model/gltf+json", "description": "test model","url": "http://path_to_model", "tags": {"name1": "value1", "name2": "value2"}}]}}}' \
      | http post http://localhost:8002/scr x-api-key:test
HTTP/1.1 201 Created
content-length: 34
content-type: application/json
date: Mon, 03 Feb 2025 03:00:50 GMT
server: uvicorn

{
    "elapsed": "3.054657ms",
    "ok": true
}


http get http://localhost:8002/search/nearby lat==50.937876 lon==-1.471582 radius==1000   x-api-key:test
HTTP/1.1 200 OK
content-length: 490
content-type: application/json
date: Mon, 03 Feb 2025 03:02:45 GMT
server: uvicorn

{
    "data": [
        {
            "distance": 214.04799872062975,
            "id": "uuid1",
            "object": {
                "geometry": {
                    "coordinates": [
                        -1.472761207099694,
                        50.93965177660982
                    ],
                    "type": "Point"
                },
                "properties": {
                    "content": [
                        {
                            "contenttype": "model/gltf+json",
                            "description": "test model",
                            "geopose": {
                                "position": {
                                    "h": 1000.0,
                                    "lat": 50.93965177660982,
                                    "lon": -1.472761207099694
                                },
                                "quaternion": {
                                    "w": 0.0,
                                    "x": 0.0,
                                    "y": 0.0,
                                    "z": 0.0
                                }
                            },
                            "metatype": "model3D",
                            "tags": {
                                "name1": "value1",
                                "name2": "value2"
                            },
                            "url": "http://path_to_model"
                        }
                    ],
                    "id": "uuid1"
                },
                "type": "Feature"
            }
        }
    ]
}

License

Distributed under the MIT License. See LICENSE for more information.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors