
    !\i              	           S SK r S SKrS SKr\R                  " SS9\R                  " SSSSS9\R
                  " S	S
SSS9\R                  S 5       5       5       5       rg)    NzSample a dataset.)
short_helpfilesTzFILE "[x, y]")nargsrequiredmetavarz-bz--bidxzIndexes of input file bands.)defaulthelpc           
      <   [        U5      nUR                  S5      nU(       a  UR                  S5      OSn [        R                  " U5      R	                  5       nU R                  S      [        R                  " U5       nUc  UR                  nOnSU;   a@  [        S UR                  S5      5      u  pUc  SnUR                  [        US-
  U	5         nO([        [        [        UR                  S5      5      5      nUR                  S	 U 5       US
9 H;  n
[        R                  " [         R"                  " U
R%                  5       5      5        M=     SSS5        SSS5        g! [
         a    U/n GNf = f! , (       d  f       N+= f! , (       d  f       g= f)a  Sample a dataset at one or more points

Sampling points (x, y) encoded as JSON arrays, in the coordinate
reference system of the dataset, are read from the second
positional argument or stdin. Values of the dataset's bands
are also encoded as JSON arrays and are written to stdout.

Example:


    $ cat << EOF | rio sample tests/data/RGB.byte.tif
    > [220650, 2719200]
    > [219650, 2718200]
    > EOF
    [28, 29, 27]
    [25, 29, 19]

By default, rio-sample will sample all bands. Optionally, bands
may be specified using a simple syntax:

  --bidx N samples the Nth band (first band is 1).

  --bidx M,N,0 samples bands M, N, and O.

  --bidx M..O samples bands M-O, inclusive.

  --bidx ..N samples all bands up to and including N.

  --bidx N.. samples all bands from N to the end.

Example:


    $ cat << EOF | rio sample tests/data/RGB.byte.tif --bidx ..2
    > [220650, 2719200]
    > [219650, 2718200]
    > EOF
    [28, 29]
    [25, 29]

r   -envNz..c                 *    U (       a  [        U 5      $ S $ N)int)xs    V/var/www/html/kml_chatgpt/mouzaenv/lib/python3.13/site-packages/rasterio/rio/sample.py<lambda>sample.<locals>.<lambda>E   s    aCF,AT,A       ,c              3   N   #    U  H  n[         R                  " U5      v   M     g 7fr   )jsonloads).0lines     r   	<genexpr>sample.<locals>.<genexpr>M   s     5fdD!!fs   #%)indexes)listpopclick	open_file	readlinesOSErrorobjrasterioopenr   mapsplitslicer   sampleechor   dumpstolist)ctxr   bidxsource_pathinputpointssrcr   startstopvalss              r   r,   r,      s@   \ KE))A,K!EIIaLsE'113 
]];'3|++!"A4::dCST=E++eEAIt&<=s3

389

5f5w #  

4::dkkm45 ( 
   (' 
s6   $E( +FCE<F(E98E9<
F
	F
F)r   r"   r'   commandargumentoptionpass_contextr,    r   r   <module>r>      sm       -.rD/JdHd1OPC6  Q K /C6r   