
    |LeK              
      R   d dl mZ edk    rd dlmZ d dlmZ d dlmZm	Z	 d dl
mZ d dlZd dlZd dlmZ d dlmZ d	 Zd
 ZdZ ej        e          a e eg g g g g g                     at6                              de           dZdZdZdZ dZ!dZ eee fee!fddd          Z"de"_#        e"$                     ed          d             e	e ee"t6                              e"j%        _&         e	e ee"t6                              e"j'        _&        de"j(        _)        d e"j*        _+        d e"_,        d e"_-        d e"_.        d e"_/         e eg g g g g                     Z0e"1                    e0dd d!d"d#d$            e            2                    e"           dS dS )%    )annotations__main__)curdoc)Figure)ColumnDataSourceCustomJS)get_providerN)Hotc                "    t                       d S )N)update_image)attroldnews      :lib/python3.11/site-packages/datashader/examples/raster.pyon_dims_changer      s        c                    t           j        } | d         r| d         sd S t          | d         d         t          j        j                  }t          | d         d         t          j        j                  }t          | d         d         t          j        j                  }t          | d         d         t          j        j	                  }t          j        | d         d         | d         d         ||f||f          }|                    t                    }t          j        |t          d	
          }i }|j        g|d<   |g|d<   |g|d<   ||z
  g|d<   ||z
  g|d<   t                               |d           d S )Nwidthheightxminr   yminxmaxymax)
plot_widthplot_heightx_rangey_rangelinear)cmaphowimagexydhdw   )dimsdatamaxraster_databoundsleftbottomminrighttopdsCanvasrastertfshader
   image_sourcestream)		dims_datar   r   r   r   canvasaggimgnew_datas	            r   r   r      sn    I	! 	8)< 	F9V$Q');)@AA9V$Q');)BCC9V$Q');)ABB9V$Q');)?@@i&8&;'0':1'=$($<$($<1 1 1
 mmK((hs(333 XJ++Ha(((((r   z./data/projected.tif)r   r   r   r   r   r   )r(   r(   a  
    var update_dims = function () {
        var new_data = {
            height: [plot.frame.height],
            width: [plot.frame.width],
            xmin: [plot.x_range.start],
            ymin: [plot.y_range.start],
            xmax: [plot.x_range.end],
            ymax: [plot.y_range.end]
        };
        dims.data = new_data;
    };

    if (typeof throttle != 'undefined' && throttle != null) {
        clearTimeout(throttle);
    }

    throttle = setTimeout(update_dims, 100, "replace");
    g?5^o_g5^ɞRAg\f_gX9RAiX  i  zpan,wheel_zoom)r   r   r   r   toolsblackSTAMEN_TONER)alpha)plotr'   )codeargsF)r!   r"   r#   r%   r$   r!   r"   r#   r%   r$   )sourcer!   r"   r#   r%   r$   dilate)3
__future__r   __name__bokeh.ior   bokeh.plottingr   bokeh.modelsr   r   bokeh.tile_providersr	   rasteriorio
datashaderr1   datashader.transfer_functionstransfer_functionsr4   datashader.colorsr
   r   r   pathopenr*   dictr'   	on_changedims_jscoder   r   r   r   figbackground_fill_coloradd_tiler   callbackr   axisvisiblegridgrid_line_alphamin_border_leftmin_border_rightmin_border_topmin_border_bottomr6   
image_rgbaadd_root r   r   <module>rf      s   " " " " " "z%%%%%%77777777111111......%%%%%%  ) ) )> "D#(4..K BrRT[]!^!^!^___DNN6>***K* DDDD!D
&$ '	) ) )C
 !(CLLn--QL777#844St;T;T;TUUUCK#844St;T;T;TUUUCKCH CHCCCC##DDrR2"$L$L$LMMLNN,   ! ! ! FHHcQ r   