Starlite-tile38 - Showcase using Tile38 via pyle38 in a Starlite application

Overview

Starlite-Tile38

Showcase using Tile38 via pyle38 in a Starlite application.
Report Bug · Request Feature

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. License
  5. Contact

About The Project

Showcase of using Tile38 with Pyle38 in a Starlite application. Can be used as is, or be extended upon with other methods in the pyle38 repertoire of commands.

Built With

Getting Started

Installation

  1. Clone and install
    git clone https://github.com/iwpnd/starlite-tile38.git
    poetry install
  2. Setup environment
    mv .env.dist .env
  3. Start your local stack
    poe up
  4. Test it!
    poe test

Usage

Once the application is started you can checkout and interact with it via on localhost:8001/schema/redoc.

Or you can use it with http/curl:

Create a vehicle

{data:"type":"Feature","geometry":{"type":"Point","coordinates":[13.37, 52.25]},"properties":{"id":"truck"}}">
echo '{ "data": { "type": "Feature", "geometry": {"type": "Point", "coordinates": [13.37, 52.25]}, "properties": {"id": "truck"}}}' \
      | http post http://localhost:8001/vehicles

> {data:"type":"Feature","geometry":{"type":"Point","coordinates":[13.37, 52.25]},"properties":{"id":"truck"}}

Get vehicle by id

http get http://localhost:8001/vehicles/truck

> {data:"type":"Feature","geometry":{"type":"Point","coordinates":[13.37, 52.25]},"properties":{"id":"truck"}}

Get all vehicles

http get http://localhost:8001/vehicles

> { data: ["type":"Feature","geometry":{"type": "Point", "coordinates": [13.37, 52.25]},"properties":{"id":"truck"}]}

Get vehicles within radius

http get http://localhost:8001/search?lat=13.37&lon=52.25&radius=1000

> { data: ["type":"Feature","geometry":{"type": "Point", "coordinates": [13.37, 52.25]},"properties":{"id":"truck"}]}

Or you use it with httpx/requests:

{ data: ["type":"Feature","geometry":{"type": "Point", "coordinates": [13.37, 52.25]},"properties":{"id":"truck"}]} # get a vehicle r = httpx.get( url="http://localhost:8001/vehicles/truck", ) print(r.json()) > {"data": {"type":"Feature","geometry": {"coordinates": [13.37,52.25],"type": "Point"},"properties": {"id": "truck"}}}">
import httpx

vehicle = {
    "type": "Feature",
    "geometry": {"type": "Point", "coordinates": [13.37, 52.25]},
    "properties": {"id": "truck"},
}

# store a vehicle
r = httpx.post(
      url="http://localhost:8001/vehicles",
      json={"data": vehicle}
      )

print(r.json())
> { data: ["type":"Feature","geometry":{"type": "Point", "coordinates": [13.37, 52.25]},"properties":{"id":"truck"}]}

# get a vehicle
r = httpx.get(
      url="http://localhost:8001/vehicles/truck",
      )

print(r.json())

> {"data": {"type":"Feature","geometry": {"coordinates": [13.37,52.25],"type": "Point"},"properties": {"id": "truck"}}}

You get the idea. And can use the rest.

License

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

Contact

Benjamin Ramser - @imwithpanda - [email protected]
Project Link: https://github.com/iwpnd/starlite-tile38

Owner
Ben
geographer turned spatial engineer turned data-something turned software developer
Ben
A compilation of several single-beam bathymetry surveys of the Caribbean

Caribbean - Single-beam bathymetry This dataset is a compilation of several single-beam bathymetry surveys of the Caribbean ocean displaying a wide ra

Fatiando a Terra Datasets 0 Jan 20, 2022
iNaturalist observations along hiking trails

This tool reads the route of a hike and generates a table of iNaturalist observations along the trails. It also shows the observations and the route of the hike on a map. Moreover, it saves waypoints

7 Nov 11, 2022
Geospatial web application developed uisng earthengine, geemap, and streamlit.

geospatial-streamlit Geospatial web applications developed uisng earthengine, geemap, and streamlit. App 1 - Land Surface Temperature A simple, code-f

13 Nov 27, 2022
Read images to numpy arrays

mahotas-imread: Read Image Files IO with images and numpy arrays. Mahotas-imread is a simple module with a small number of functions: imread Reads an

Luis Pedro Coelho 67 Jan 07, 2023
Python project to generate Kerala's distrcit level panchayath map.

Kerala-Panchayath-Maps Python project to generate Kerala's distrcit level panchayath map. As of now, geojson files of Kollam and Kozhikode are added t

Athul R T 2 Jan 10, 2022
Python package for earth-observing satellite data processing

Satpy The Satpy package is a python library for reading and manipulating meteorological remote sensing data and writing it to various image and data f

PyTroll 882 Dec 27, 2022
Spectral decomposition for characterizing long-range interaction profiles in Hi-C maps

Inspectral Spectral decomposition for characterizing long-range interaction prof

Nezar Abdennur 6 Dec 13, 2022
A service to auto provision devices in Aruba Central based on the Geo-IP location

Location Based Provisioning Service for Aruba Central A service to auto provision devices in Aruba Central based on the Geo-IP location Geo-IP auto pr

Will Smith 3 Mar 22, 2022
This GUI app was created to show the detailed information about the weather in any city selected by user

WeatherApp Content Brief description Tools Features Hotkeys How it works Screenshots Ways to improve the project Installation Brief description This G

TheBugYouCantFix 5 Dec 30, 2022
Specification for storing geospatial vector data (point, line, polygon) in Parquet

GeoParquet About This repository defines how to store geospatial vector data (point, lines, polygons) in Apache Parquet, a popular columnar storage fo

Open Geospatial Consortium 449 Dec 27, 2022
GebPy is a Python-based, open source tool for the generation of geological data of minerals, rocks and complete lithological sequences.

GebPy is a Python-based, open source tool for the generation of geological data of minerals, rocks and complete lithological sequences. The data can be generated randomly or with respect to user-defi

Maximilian Beeskow 16 Nov 29, 2022
Logging the position of the car on an sdcard

audi-mmi-3g-gps-logging Logging the position of the car on an sdcard, startup script origin not clear to me, logging setup and time change is what I d

2 May 31, 2022
EOReader is a multi-satellite reader allowing you to open optical and SAR data.

Remote-sensing opensource python library reading optical and SAR sensors, loading and stacking bands, clouds, DEM and index.

ICube-SERTIT 152 Dec 30, 2022
Calculate the area inside of any GeoJSON geometry. This is a port of Mapbox's geojson-area for Python

geojson-area Calculate the area inside of any GeoJSON geometry. This is a port of Mapbox's geojson-area for Python. Installation $ pip install area U

Alireza 87 Dec 14, 2022
Constraint-based geometry sketcher for blender

Geometry Sketcher Constraint-based sketcher addon for Blender that allows to create precise 2d shapes by defining a set of geometric constraints like

1.7k Jan 02, 2023
Python tools for geographic data

GeoPandas Python tools for geographic data Introduction GeoPandas is a project to add support for geographic data to pandas objects. It currently impl

GeoPandas 3.5k Jan 03, 2023
Python library to visualize circular plasmid maps

Plasmidviewer Plasmidviewer is a Python library to visualize plasmid maps from GenBank. This library provides only the function to visualize circular

Mori Hideto 9 Dec 04, 2022
Build, deploy and extract satellite public constellations with one command line.

SatExtractor Build, deploy and extract satellite public constellations with one command line. Table of Contents About The Project Getting Started Stru

Frontier Development Lab 70 Nov 18, 2022
r.cfdtools 7 Dec 28, 2022
Open Data Cube analyses continental scale Earth Observation data through time

Open Data Cube Core Overview The Open Data Cube Core provides an integrated gridded data analysis environment for decades of analysis ready earth obse

Open Data Cube 410 Dec 13, 2022