Requests¶
imageserver_export.request ¶
exportImage: the query and the check of the answer, pure.
export_params ¶
export_params(bounds: Bounds, *, width: int, height: int, crs: int, pixel_type: str = 'U8', interpolation: Interpolation = 'RSP_NearestNeighbor') -> dict[str, str]
The query string of GET <service>/exportImage for one tile, as a GeoTIFF.
check_image ¶
check_image(status_code: int, content_type: str, body: bytes) -> bytes
The GeoTIFF bytes, or :class:ImageServerError with the service's message.
An ImageServer answers a bad request with HTTP 200 and a JSON error: without this check the JSON would reach the TIFF reader as a corrupt file, hiding the message that says what was wrong.