mirror of
https://github.com/zvx-echo6/recon.git
synced 2026-06-10 08:54:34 +02:00
cleanup: remove /api/landclass handler + lib/landclass.py (extraction #4 shadow)
/api/landclass is edge-shadowed since extraction #4 — navi-landclass :8424 serves the route via nginx. Cleanup #4 removed the last in-process consumer (netsyms_api._reverse_landclass), so lib/landclass.py is now fully orphaned. - api.py: drop the @app.route('/api/landclass') handler + the `from .landclass import lookup_landclass, format_summary` import. - DELETE lib/landclass.py (only consumer was the deleted handler). - DELETE lib/landclass_test.py (SUT gone). PADUS_DB_* vars in /opt/recon/.env are now dead in recon — flagged for an out-of-band post-merge cleanup, not touched here (data, not code). Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
d7292c4cc7
commit
1f05d4b4d6
3 changed files with 0 additions and 332 deletions
33
lib/api.py
33
lib/api.py
|
|
@ -25,7 +25,6 @@ from werkzeug.utils import secure_filename
|
|||
from .utils import get_config, content_hash, clean_filename_to_title, derive_source_and_category, generate_download_url, setup_logging
|
||||
from .status import StatusDB
|
||||
from .deployment_config import get_deployment_config
|
||||
from .landclass import lookup_landclass, format_summary
|
||||
|
||||
logger = setup_logging('recon.api')
|
||||
|
||||
|
|
@ -1170,38 +1169,6 @@ def api_knowledge_stats():
|
|||
return jsonify(_cache['knowledge_stats'])
|
||||
|
||||
|
||||
@app.route('/api/landclass')
|
||||
def api_landclass():
|
||||
"""PAD-US land classification lookup for a point."""
|
||||
config = get_deployment_config()
|
||||
if not config.get('features', {}).get('has_landclass'):
|
||||
return jsonify({'error': 'Land classification not available'}), 404
|
||||
|
||||
try:
|
||||
lat = float(request.args.get('lat', ''))
|
||||
lon = float(request.args.get('lon', ''))
|
||||
except (ValueError, TypeError):
|
||||
return jsonify({'error': 'lat and lon required as numbers'}), 400
|
||||
|
||||
if not (-90 <= lat <= 90) or not (-180 <= lon <= 180):
|
||||
return jsonify({'error': 'lat must be -90..90, lon must be -180..180'}), 400
|
||||
|
||||
classifications = lookup_landclass(lat, lon)
|
||||
is_public = len(classifications) > 0
|
||||
is_private = len(classifications) == 0
|
||||
summary = format_summary(classifications)
|
||||
|
||||
return jsonify({
|
||||
'lat': lat,
|
||||
'lon': lon,
|
||||
'classifications': classifications,
|
||||
'count': len(classifications),
|
||||
'is_public': is_public,
|
||||
'is_private': is_private,
|
||||
'summary': summary,
|
||||
})
|
||||
|
||||
|
||||
@app.route('/api/health')
|
||||
def api_health():
|
||||
"""Health check endpoint for monitoring."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue