Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Euroscope Coordinates Reducer

An optimization tool for TopSky and GroundRadar map files. This tool applies the Ramer-Douglas-Peucker (RDP) algorithm to significantly reduce coordinate density in large map sectors while maintaining logical integrity and visual precision.

Key Features

  • Safety Guards:
    • Chain Detection: Detects connected lines and only simplifies them if they form a significant chain (>3 segments).
    • Infrastructure Protection: Isolated segments (like runway lines) and small polygons (<5 points) are preserved exactly as they appear in the source.
  • Redundant Data Cleaning: Automatically removes zero-length segments and duplicate points that often bloat exported SCT data.

Performance Benchmark

File Type Original Size Optimized Size Reduction
SKBO TMA 6.6 KB 3.2 KB ~50.8%
SKRG 547.0 KB 123.3 KB ~77.5%

Usage

  1. Place your source files in the Input folder.
  2. Run the optimization script:
    python CoordinateReducer.py
    To use a custom simplification threshold (epsilon):
    python CoordinateReducer.py --epsilon 0.00005
  3. Find your optimized, high-performance files in the Output folder.

Configuration

You can fine-tune the simplification threshold (epsilon) directly from the command line. The default is 0.00001 (approximately 1 meter). Higher values will simplify the paths more aggressively, while lower values will preserve more detail.

You can also specify custom input/output directories:

python CoordinateReducer.py --input MySourceDir --output MyResultDir

Technical Details

The tool uses a non-destructive parsing approach. Any lines that are NOT coordinates or lines (like COLOR:, FOLDER:, ZOOM:, or comments) are passed through exactly as they were. When a segment is small enough to not require simplification, the script reuses the original string from the file to ensure 100% precision and zero floating-point drift.

About

Optimization tool for TopSky and GroundRadar map files

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages