Skip to content

Scripts for Map Preprocessing (Optional)

jurichterrsl edited this page Jun 9, 2024 · 2 revisions

The Lunar Planner provides several optional scripts to preprocess and create additional layers for your map data. This page describes the available scripts and how to use them.

Merging Scientific Layers

If you have multiple scientific layers available, you can merge them into a single GeoTIFF file using the merge_tif_files.py script: python src/mapdata/merge_tif_files.py path/to/input_geotiff path/to/output_npy

Note: Please review the script and adapt the weights between the different map layers according to your requirements.

Creating Hand-Labeled Scientific Interests

If you want to include hand-labeled scientific interests on your map, you can use the paint_map.py script.

  1. First, create a PNG image of the area using the create_map_image.py script: python src/mapdata/create_map_image.py path/to/input_geotiff path/to/output_image_path
  2. Then, use the paint_map.py script to mark the scientific interests on the map: python src/mapdata/paint_map.py path/to/input_geotiff path/to/input_image_path path/to/output_npy_path

Applying Gradients to Maps

To create a gradient on your binary map image (e.g. a hand-labeled scientific interest), you can use the blur_map.py script: python src/mapdata/blur_map.py path/to/input_npy_path path/to/output_npy_path blur_radius minimal_value

Adjust the blur_radius and minimal_value parameters according to your desired gradient effect.

Additional Resources

If you encounter any issues or have questions, please open an issue on the issue tracker.