feat(tactical): add tactical line of sight API, elevation engine, dynamic step resolution, weather module and executive showcase
This commit is contained in:
Executable
+49
@@ -0,0 +1,49 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
# ==============================================================================
|
||||
# Script: revert_boundaries.sh
|
||||
# Purpose: Completely remove custom inserted lines and restore clean original boundaries
|
||||
# ==============================================================================
|
||||
|
||||
echo "================================================================="
|
||||
echo "🔄 Reverting all boundary changes to original clean OSM state..."
|
||||
echo "================================================================="
|
||||
|
||||
if [ -f .env ]; then
|
||||
export $(grep -v '^#' .env | xargs)
|
||||
fi
|
||||
|
||||
DB_USER=${POSTGRES_USER:-postgres}
|
||||
DB_NAME=${POSTGRES_DB:-gis}
|
||||
|
||||
docker exec -i map-db psql -U "$DB_USER" -d "$DB_NAME" << 'EOF'
|
||||
BEGIN;
|
||||
|
||||
-- 1. Remove all custom lines and polygons added
|
||||
DELETE FROM planet_osm_line WHERE osm_id >= 999000;
|
||||
DELETE FROM planet_osm_polygon WHERE osm_id >= 999000;
|
||||
|
||||
-- 2. Restore Jordan & Syria national boundary line directly from the relation polygons
|
||||
INSERT INTO planet_osm_line (osm_id, boundary, admin_level, name, way)
|
||||
SELECT
|
||||
900001,
|
||||
'administrative',
|
||||
'2',
|
||||
p.name,
|
||||
ST_Boundary(p.way)
|
||||
FROM planet_osm_polygon p
|
||||
WHERE p.boundary = 'administrative'
|
||||
AND p.admin_level = '2'
|
||||
AND (p.name ILIKE '%Jordan%' OR p.name ILIKE '%الأردن%' OR p.name ILIKE '%Syria%' OR p.name ILIKE '%سوريا%')
|
||||
ON CONFLICT DO NOTHING;
|
||||
|
||||
COMMIT;
|
||||
EOF
|
||||
|
||||
echo "Restarting Martin..."
|
||||
docker compose restart martin
|
||||
|
||||
echo "================================================================="
|
||||
echo "✅ Reverted successfully to original clean map boundaries!"
|
||||
echo "================================================================="
|
||||
Reference in New Issue
Block a user