ost.helpers.helpers

This script provides core helper functions for the OST package.

Functions

check_out_dimap

check_out_tiff

check_zipfile

delete_dimap

Removes both dim and data from a Snap dimap file

delete_shapefile

Removes the shapefile and all its associated files

move_dimap

Function to move dimap's data and dim another locations

remove_folder_content

A helper function that cleans the content of a folder

resolution_in_degree

Convert resolution in meters to degree based on Latitude

run_command

param command

timer

A helper function to print a time elapsed statement

ost.helpers.helpers.check_out_dimap(dimap_prefix, test_stats=True)[source]
ost.helpers.helpers.check_out_tiff(file, test_stats=True)[source]
ost.helpers.helpers.check_zipfile(filename)[source]
ost.helpers.helpers.delete_dimap(dimap_prefix)[source]

Removes both dim and data from a Snap dimap file

ost.helpers.helpers.delete_shapefile(shapefile)[source]

Removes the shapefile and all its associated files

ost.helpers.helpers.move_dimap(infile_prefix, outfile_prefix, to_tif)[source]

Function to move dimap’s data and dim another locations

ost.helpers.helpers.remove_folder_content(folder)[source]

A helper function that cleans the content of a folder

Parameters

folder

ost.helpers.helpers.resolution_in_degree(latitude, meters)[source]

Convert resolution in meters to degree based on Latitude

Parameters
  • latitude

  • meters

Returns

ost.helpers.helpers.run_command(command, logfile=None, elapsed=True)[source]
Parameters
  • command

  • logfile

  • elapsed

Returns

ost.helpers.helpers.timer(start)[source]

A helper function to print a time elapsed statement

Parameters

start

Returns

Return type

str