Skip to content

MLP-Hub/MLP_image_prep

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

Mountain Legacy Project Image Prep

Python script for preparing MLP images for use in the field

Python 3.9 GNU License

Requirements

Intructions for Running

STEP 1 : Download the code

  1. Press the green button that says Code and select download as zip.
  2. Unzip the folder and move to location of choice (usually better to keep it on the local drive rather than anywhere on the cloud)
  3. Keep the name MLP_img_prep for the folder (and make sure it’s not nested from unzipping it)

STEP 2: Install Python

  1. Check whether Python is installed (instructions here)
  2. If Python is not installed, install it from the Python website (instructions here)

STEP 3: Set Up Virtual Environment

The virtual environment will allow you to install Python libraries without risking conflict with other projects.

  1. Open File Explorer or Finder and navigate to the folder with your code.

  2. Open Command Line or Terminal (from start, type Command Line for Windows or Terminal for Mac and open the first result)

  3. Type the following:

    Windows:

    py -m venv MLP_img_prep

    Mac:

    python3 -m venv MLP_img_prep

STEP 4: Activate the Virtual Environment

  1. Open Command Line or Terminal (from start, type Command Line for Windows or Terminal for Mac and open the first result)

  2. Type the following:

    Windows:

    MLP_img_prep\Scripts\activate

    Mac:

    source MLP_img_prep/bin/activate

Your command prompt should now have MLP_image_prep in brackets before the cursor.

STEP 5: Install Dependencies

  1. Upgrade pip (type the following in command line)

    Windows:

    py -m pip install --upgrade pip

    Mac:

    Python3 -m pip install --upgrade pip
  2. Install numpy

    Windows:

    py -m pip install numpy

    Mac:

    Python3 -m pip install numpy
  3. Install pillow

    Windows:

    py -m pip install pillow

    Mac:

    Python3 -m pip install pillow
  4. Install tkinter

    Windows:

    py -m pip install tk

    Mac:

    Python3 -m pip install tk

STEP 6: Set up the image folder

  1. Download all images from Explorer
  2. Edit in Affinity Photo
  3. Store all images from one station in a folder, each station should have its own folder
  4. Images should be named to correspond to their name in Explorer (e-copy number is best)

STEP 7: Run the program

MAKE SURE YOUR ENVIRONMENT IS ACTIVE BEFORE DOING THIS, IF NOT, RETURN TO STEP 4.

  1. In the command line, navigate to the directory for the code (notice the different slashes on Windows vs Mac). Replace the words Folder with the correct path to your MLP_image_prep folder.

    • To find the path on Windows, navigate to the MLP_image_prep.py file in File Explorer, right click, choose properties, and check the File location under details

    • To find the path on Mac, navigate to the MLP_image_prep.py file in Finder, right click, choose Get Info, and check Where

    Windows:

    cd C:\Folder\Folder\MLP_img_prep

    Mac:

    cd /Folder/Folder/MLP_img_prep
  2. Run the script

    Windows:

    py MLP_image_prep.py

    Mac:

    Python3 MLP_image_prep.py
  3. Fill in the surveyor name, survey year, and station name when prompted

  4. A window will pop up: Navigate to the folder containing your images

  5. After a minute, a second window will pop up: Navigate to the folder where you want to save the completed PDF

About

Script for gridding and saving Mountain Legacy Project images for use in the field

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages