generated from Grigo/AndroidTemplate
added subproxy
This commit is contained in:
@@ -264,6 +264,20 @@ def track_elevation_profile(track_id: int):
|
||||
return jsonify(build_elevation_profile(points, step_m or 10.0))
|
||||
|
||||
|
||||
@app.get("/api/elevation/nearest-hill")
|
||||
def elevation_nearest_hill():
|
||||
from core.elevation import find_nearest_hill
|
||||
|
||||
lat = request.args.get("lat", type=float)
|
||||
lon = request.args.get("lon", type=float)
|
||||
if lat is None or lon is None:
|
||||
return jsonify({"ok": False, "error": "lat and lon required"}), 400
|
||||
radius_m = request.args.get("radius_m", 5000, type=float)
|
||||
step_m = request.args.get("step_m", 300, type=float)
|
||||
min_prominence_m = request.args.get("min_prominence_m", 8, type=float)
|
||||
return jsonify(find_nearest_hill(lat, lon, radius_m, step_m, min_prominence_m))
|
||||
|
||||
|
||||
@app.get("/api/health")
|
||||
def health():
|
||||
from core.elevation import elevation_status
|
||||
|
||||
Reference in New Issue
Block a user