Finding the longest unobstructed great circle view from the UK coastline to any landmass on Earth.
find_longest_view_systematic.py - Main analysis script
- Systematically scans the entire UK coastline
- Uses two-phase ray-casting for efficiency
- Configurable spacing and check intervals
- Outputs timestamped JSON results
# Run with custom parameters
python find_longest_view_systematic.py --spacing 0.1 --check-interval 250 --threshold 7000
# Or use the logging wrapper
./run_with_log.sh --spacing 0.1 --check-interval 250 --threshold 7000Parameters:
--spacing: Coastline sampling interval in km (default: 100.0)--check-interval: Fine-grain checking interval in meters (default: 50)--threshold: Minimum distance threshold in km (default: 5000.0)
cartopy_viz.py - High-quality publication map
- Robinson projection with Natural Earth raster relief
- Inset showing start point detail
- Info box with coordinates and distance
- 300 DPI output suitable for printing
python cartopy_viz.pycheck_route_viz.py - Interactive verification map
- Folium-based interactive HTML map
- Shows top 10 longest views with markers
- Great circle routes for each view
- Click markers for detailed information
python check_route_viz.pyrun_with_log.sh - Wrapper for timestamped logging
- Automatically adds timestamps to each output line
- Saves to dated log files
- Useful for monitoring long-running analyses
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt- Load Data: Natural Earth 10m coastline and country polygons
- Sample Coastline: Generate points at specified intervals along UK coast
- Calculate Directions: Determine perpendicular outward direction from each point
- Two-Phase Checking:
- Phase 1: Coarse check every 100km to quickly filter paths < threshold
- Phase 2: Fine-grain check at specified intervals for promising paths
- Find Longest: Identify the maximum unobstructed distance
Results are saved with descriptive filenames including parameters:
longest_view_result_YYYYMMDD_HHMMSS_spacingXkm_checkYm_threshZkm.json
Each result file contains:
- Longest view details (coordinates, distance, azimuth, destination)
- Top 10 views for reference
- Metadata (parameters, processing time, cores used)