Added readme

This commit is contained in:
MarStr 2024-08-19 15:17:15 +02:00
parent 89d43be66d
commit 4526e7b5fb

38
repoinfo Normal file
View File

@ -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.