From 4526e7b5fbffc18537e17069fe377ce234cb5dc9 Mon Sep 17 00:00:00 2001 From: MarStr Date: Mon, 19 Aug 2024 15:17:15 +0200 Subject: [PATCH] Added readme --- repoinfo | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 repoinfo diff --git a/repoinfo b/repoinfo new file mode 100644 index 0000000..6c49352 --- /dev/null +++ b/repoinfo @@ -0,0 +1,38 @@ +[section]Orthographic API[/section] + +A small PHP script offering an API endpoint to my (upcoming) Orthographic Python tool, to acquire OpenStreetMap XML files and its associated data. While the Orthographic tool (which will be posted in my repository as well) manages the access to this API automatically, I am still posting this script here to show how the tool acquires the OSM data. + +In addition, using this approach eliminates the need for any Orthographic user to store huge amounts of OSM data in a local cache folder - instead all of these files are stored on my server. + +Should a specific OSM tile for Orthographic be older than 30 days, it will be re-acquired and refreshed to always have up to date information. + + +[section]Endpoint[/section] + +[code]https://marstr.online/osm/v1/ + +Method: POST[/code] + + +[section]Content[/section] + +A short JSON specifiying the bounding box and the Orthographic tile. This is automatically populated by the Python tool and sends it to this endpoint. + +Example: + +[code]{ + "bbox": { + "lat": 51, + "lng": 7, + "lat_b": 51.0101, + "lng_b": 7.016 + }, + "tile_lat": 51, + "tile_lng": 7, + "square_lat": 1, + "square_lng": 1 +}[/code] + +[section]Result[/section] + +The response is the content of the acquired OSM data, in XML format. Orthographic will process the content of this data further. -- 2.30.2