eumap.datasets.eo.s2mosaic.s2tiler.S2Tiler

class S2Tiler(source, band, tile_name, satimgs, bucket, tmp_folder, data_folder, out_parent_folder, out_folder_prefix, debug=False, verbose=False, **kwargs)[source]

Bases: object

Class that calculates one s2 tile of mosaic

param: source: Source of images param: band: Band name (‘B02’,’B03’, …) param: tile_name: Name of tile thats going to be mosaicked param: satimgs: Pandas DataFrame with all images to be mosaicked param: bucket: name of the bucket where result will be saved param: tmp_folder: temporary folder param: data_folder: folder for downloading source images param: out_arent_folder: param: out_folder_prefix: param: debug: If true then there is no uploading to AWS S3 param: verbose: param: kwargs: Additional arguments

returns:

Methods

geolocation_from_metadata

Read geolocation of source image from metadata.xml

get_relative_orbit_tileInfo

Read information on relative orbit from “tileInfo”

log

make_tile

Main procedure to make tile

mask_scl_s2l2a

Read mask raster from SCL file

move_tmp_to_s3

Move result image from temporary folder to S3

s3_path

tmp_path

Attributes

LOG

bd

output_filename

s3_path_cnt

scl_masked_values

tile_nodata

tmp_path_cnt

verbose

__call__()[source]

Entry point for procedure

geolocation_from_metadata(fn_metadata, resolution=None)[source]

Read geolocation of source image from metadata.xml

static get_relative_orbit_tileInfo(fn_tileInfo)[source]

Read information on relative orbit from “tileInfo”

make_tile()[source]

Main procedure to make tile

mask_scl_s2l2a(fn_scl, vrt_options)[source]

Read mask raster from SCL file

param: fn_scl: File name of SCL layer param: vrt_options: Options for WarpedVRT

returns: numy array with mask according to ‘scl_masked_values’

move_tmp_to_s3()[source]

Move result image from temporary folder to S3