auto-sync: 2026-05-02 23:20:01

This commit is contained in:
Stream
2026-05-02 23:20:01 +03:00
parent 547796444a
commit cc7c306045
2 changed files with 16 additions and 9 deletions

View File

@@ -15,3 +15,4 @@
{"ts":"2026-05-02T14:28:08Z","session":"20260426-113247_mva154_plane-nginx-ssl_5ad8","host":"mva154","status":"success","agent":"stream"}
{"ts":"2026-05-02T14:36:28Z","session":"20260502-142827_mva154_enduro-trails-ycoord-fix_bcfb","host":"mva154","status":"success","agent":"stream","files":["/home/slin/openclaw/config/tasks/enduro-trails/prototype/docker-compose.yml"]}
{"ts":"2026-05-02T14:44:02Z","session":"20260502-144136_mva154_enduro-quantize-fix_1482","host":"mva154","status":"success","agent":"stream","files":["/home/slin/openclaw/config/tasks/enduro-trails/prototype/app.py"]}
{"ts":"2026-05-02T20:19:00Z","session":"20260502-201802_mva154_enduro-zoom-consistency_7250","host":"mva154","status":"success","agent":"stream","files":["/home/slin/openclaw/config/tasks/enduro-trails/prototype/app.py"]}

View File

@@ -196,15 +196,19 @@ async def get_tile(z: int, x: int, y: int):
q_south = south - buf_y
q_north = north + buf_y
# Лимиты по зуму
if z <= 6:
limit = 500
elif z <= 8:
limit = 3000
elif z <= 10:
limit = 8000
# Минимальная длина трека по зуму — короткие треки не показываем на обзорных зумах.
# Это даёт консистентную картину: трек либо виден на всех зумах >= порога, либо нет.
# Значения подобраны эмпирически для ЦФО (~300км на z9, ~75км на z11).
if z <= 7:
min_length = 5000 # только треки длиннее 5 км
elif z <= 9:
min_length = 2000 # длиннее 2 км
elif z <= 11:
min_length = 500 # длиннее 500 м
else:
limit = 15000
min_length = 0 # все треки
limit = 20000 # единый высокий лимит — фильтрация по длине важнее
try:
conn = get_db()
@@ -215,8 +219,10 @@ async def get_tile(z: int, x: int, y: int):
FROM trails
WHERE min_lon <= ? AND max_lon >= ?
AND min_lat <= ? AND max_lat >= ?
AND (length_m IS NULL OR length_m >= ?)
ORDER BY length_m DESC
LIMIT ?
""", (q_east, q_west, q_north, q_south, limit))
""", (q_east, q_west, q_north, q_south, min_length, limit))
trails_rows = cur.fetchall()
cur.execute("""