Skip to content

iklelukas/sat_mapping

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sentinel 2 Data Fetcher

pypi

Installation

  • Create a Virtual Environment and activate it.

    python3 -m venv venv
    . venv/bin/activate
  • Install the Package via pip.

    pip install sat-mapping-cyborg-ai

Usage

  • Import the Library

    from sat_mapping import FolderData, folders_time_frame, Paths, download
  • Set the Path to where you want to store the Satellite Data.

    paths = Paths("<ANY/VALID/PATH>")
  • Start the Download. (Note: One year needs around 110 GB Disk Space.)

    The download uses gsutil so if there is no gsutil configuration (.boto) in your home directory, gsutil config will be called to generate one. Gsutil config asks the user for a token and a project id.

    download(paths, years=[2019], tiles=["32TMT"], months=[7])
  • Load a folder.

    folder_name = paths.folders[0]
    upper_left = (100000.0, 0.0)       # Postion on tile in [m]
    lower_right = (109800.0, 10000.0)  # Postion on tile in [m]
    data = FolderData(join(paths.data_path, folder_name), upper_left, lower_right)
  • Display the image. (if matplotlib is not installed use pip install matplotlib)

    import matplotlib.pyplot as plt
    
    picture = data.data[:, :, [3, 1, 2]]  # NIR, GREEN, BLUE
    fig: plt.Figure = plt.figure()
    plt.imshow(picture)
    plt.show()

About

A package to fetch sentinel 2 Satellite data from Google.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages