0
     UˆÌËÐ644ÈÄÍ „    U‹      Õ—QoÓ0Çß÷)Œxk/IË]4šITÛºj+B¡Ê�ÝÄZbG¶ÛP>=N“Ñµ�¡ÊÓ�“¿/÷³ïÇ^&ŸÆçèýäê�?¼»n|ì ÂIXÝè¶à|„NŒÉ{ EQ´‹N[ª&7�˜,í‚6ŠG¦MÅÁ‘_^Ž�Ÿ0B­E¾á&eÁPPöÉ9¹0šSfç­4P¶äÓ¥oXË¤ZÕÆíx $eDùÂõ¡
dCCÛŸIº*é>Exe�.™­ŸRº*ðM‚–$å±èc#sø<‹‘VQ�¤Ð0K‰¸kÇ|ŽIM®¿X˜¤œø%ŠÍûøí ?:½î‡8‘Œù@vk®¬æ—D”IÊçœÑ½âÛJ|Ë¿íVš�éHñÜp)6R°ˆÛ¨‘LuN,ë+K�¨mU%¡¿[=XŒñÙÍùhoª%¡eˆMv²Y8Å„A!W,2ö^�SÅ~)f:?½¢:YÅãÄà ¡Ú©|á\¦”©mÆ}t‰fó­ìv–?¥å9ÞqËu[îäžôœ„ž1ÿ…¸²Û ¶ v(¢“©�†iK±4@ñäuzîë½(öÕrñoP¦ÚvËžõ•C�j^_Tñ%S¶Àj§y…?k…5'˜s•¶›§ek[�‡ã†;âõï@xiòt[’{ï)ªêï2Ü¿e+{(5õˆV—"åÂ6xeo€Ó=�¶Îe±îêÊ6Û ›÷P
H/fõÿP
©9‡�/S¯,Æ÷?üˆ/ØÒž–pPÙ§Ø†_·CÃÓ$ÔçlÖ‡xªÿ†ï^-°ñš    8   Wˆl–Ðz¾”d
eJeAà�q�)‹Fÿ�þZ+‚Y¹Yx‰¢3+ÀþÒ„ ãŸÑÂÅÎ ?÷     W# !/usr/bin/env python3
###############################################################################
# $Id$
#
# Project:  GDAL utils
# Purpose:  Query information about a pixel given its location
#           A direct port of apps/gdallocationinfo.cpp
# Author:   Idan Miara <idan@miara.com>
#
###############################################################################
# Copyright (c) 2010, Even Rouault <even@spatialys.com>
# Copyright (c) 2021, Idan Miara <idan@miara.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
###############################################################################
import sys
import textwrap
from enum import Enum, auto
from numbers import Real
from typing import Optional, Sequence, Tuple, Union

import numpy as np

from osgeo import gdal, gdalconst, osr
from osgeo.gdal_array import BandRasterIONumPy
from osgeo_utils.auxiliary.array_util import ArrayLike, ArrayOrScalarLike
from osgeo_utils.auxiliary.base import is_path_like
from osgeo_utils.auxiliary.gdal_argparse import GDALArgumentParser, GDALScript
from osgeo_utils.auxiliary.numpy_util import GDALTypeCodeAndNumericTypeCodeFromDataSet
from osgeo_utils.auxiliary.osr_util import (
    OAMS_AXIS_ORDER,
    AnySRS,
    get_axis_order_from_gis_order,
    get_srs,
    get_transform,
    transform_points,
)
from osgeo_utils.auxiliary.util import (
    PathOrDS,
    get_band_nums,
    get_bands,
    get_scales_and_offsets,
    open_ds,
)


class LocationInfoSRS(Enum):
    PixelLine = auto()
    SameAsDS_SRS = auto()
    SameAsDS_SRS_GeogCS = auto()


class LocationInfoOutput(Enum):
    PixelLineVal = auto()
    PixelLineValVerbose = auto()
    ValOnly = auto()
    XML = auto()
    LifOnly = auto()
    Quiet = auto()


CoordinateTransformationOrSRS = Optional[
    Union[osr.CoordinateTransformation, LocationInfoSRS, AnySRS]
]


def gdallocationinfo(
    filename_or_ds: PathOrDS,
    x: ArrayOrScalarLike,
    y: ArrayOrScalarLike,
    srs: CoordinateTransformationOrSRS = None,
    axis_order: Optional[OAMS_AXIS_ORDER] = None,
    open_options: Optional[dict] = None,
    ovr_idx: Optional[int] = None,
    band_nums: Optional[Sequence[int]] = None,
    inline_xy_replacement: bool = False,
    return_ovr_pixel_line: bool = False,
    transform_round_digits: Optional[float] = None,
    allow_xy_outside_extent: bool = Tru