Skip to contents

This helper function is needed on some WCS services from which an mht file is downloaded rather than a tif file; returns the path to the tif

Usage

unpack_mht(path)

Arguments

path

A path to the mht file

Value

tif_path the path to the extracted geoTIFF.

Details

Need three ways to read in the mht file to get the tif file out. read_lines() cannot read all lines due to embedded nulls. Therefore, also read_lines_raw() needed for positioning of tif part in file. write_lines() does not work correctly on lines_raw[start:end] possibly a bug or edge case in write_lines() Therefore, also read_file_raw() needed to extract from the raw vector