
    \i                     T    S r SSKrSSKrS rS rS r      S	S jrS
S jrSS jr	g)zPlot single geometries using Matplotlib.

Note: this module is experimental, and mainly targeting (interactive)
exploration, debugging and illustration purposes.

    Nc                  v    SS K Jn   U R                  5       nUR                  S5        UR	                  S5        U$ )Nr   Tequal)matplotlib.pyplotpyplotgcagrid
set_aspect)pltaxs     S/var/www/html/kml_chatgpt/mouzaenv/lib/python3.13/site-packages/shapely/plotting.py_default_axr      s,    #	BGGDMMM'I    c                    SSK Jn  SSKJn  [	        U [
        R                  5      (       a3  UR                  " U R                   Vs/ s H  n[        U5      PM     sn6 $ U" U 5      n UR                  " U" [        R                  " U R                  R                  5      S S 2S S24   5      /U R                   Vs/ s H1  oA" [        R                  " UR                  5      S S 2S S24   5      PM3     snQ76 $ s  snf s  snf )Nr   Path)orient   )matplotlib.pathr   shapely.opsr   
isinstanceshapelyMultiPolygonmake_compound_pathgeoms_path_from_polygonnpasarrayexteriorcoords	interiors)polygonr   r   polyrings        r   r   r      s    $"'7//00&&3:==A=4 &=A
 	
 /&&G,,334QU;<
?F?P?PQ?Ptd2::dkk*1bqb512?PQ
 	
	 B Rs   C8:8C=
c                 2    SSK Jn  U" [        U 5      40 UD6$ )a  Get a Matplotlib patch from a (Multi)Polygon.

Note: this function is experimental, and mainly targeting (interactive)
exploration, debugging and illustration purposes.

Parameters
----------
polygon : shapely.Polygon or shapely.MultiPolygon
    The polygon to convert to a Matplotlib Patch.
**kwargs
    Additional keyword arguments passed to the matplotlib Patch.

Returns
-------
Matplotlib artist (PathPatch)

r   	PathPatch)matplotlib.patchesr&   r   )r!   kwargsr&   s      r   patch_from_polygonr)   '   s    $ -'0;F;;r   c                 &   SSK Jn  Uc
  [        5       nUc  SnUR                  U5      nUc  [	        U5      nSUS'   [        U5      nUc  Un[        U 4XEUS.UD6n	UR                  U	5        UR                  5         U(       a  [        XUS9n
X4$ U	$ )a  Plot a (Multi)Polygon.

Note: this function is experimental, and mainly targeting (interactive)
exploration, debugging and illustration purposes.

Parameters
----------
polygon : shapely.Polygon or shapely.MultiPolygon
    The polygon to plot.
ax : matplotlib Axes, default None
    The axes on which to draw the plot. If not specified, will get the
    current active axes or create a new figure.
add_points : bool, default True
    If True, also plot the coordinates (vertices) as points.
color : matplotlib color specification
    Color for both the polygon fill (face) and boundary (edge). By default,
    the fill is using an alpha of 0.3. You can specify `facecolor` and
    `edgecolor` separately for greater control.
facecolor : matplotlib color specification
    Color for the polygon fill.
edgecolor : matplotlib color specification
    Color for the polygon boundary.
linewidth : float
    The line width for the polygon boundary.
**kwargs
    Additional keyword arguments passed to the matplotlib Patch.

Returns
-------
Matplotlib artist (PathPatch), if `add_points` is false.
A tuple of Matplotlib artists (PathPatch, Line2D), if `add_points` is true.

r   )colorsC0g333333?	facecolor	edgecolor	linewidthr   color)

matplotlibr+   r   to_rgbalisttupler)   	add_patchautoscale_viewplot_points)r!   r   
add_pointsr3   r/   r0   r1   r(   r+   patchlines              r   plot_polygonr>   >   s    V "	z]}NN5!EK		")$		$YRXE LL77{Lr   c                    SSK Jn  SSKJn  Uc
  [	        5       nUc  Sn[        U [        R                  5      (       aW  UR                  " U R                   Vs/ s H1  o" [        R                  " UR                  5      SS2SS24   5      PM3     sn6 n	O/U" [        R                  " U R                  5      SS2SS24   5      n	U" U	4SX4S.UD6n
UR                  U
5        UR                  5         U(       a  [        XUS	9n X4$ U
$ s  snf )
a  Plot a (Multi)LineString/LinearRing.

Note: this function is experimental, and mainly targeting (interactive)
exploration, debugging and illustration purposes.

Parameters
----------
line : shapely.LineString or shapely.LinearRing
    The line to plot.
ax : matplotlib Axes, default None
    The axes on which to draw the plot. If not specified, will get the
    current active axes or create a new figure.
add_points : bool, default True
    If True, also plot the coordinates (vertices) as points.
color : matplotlib color specification
    Color for the line (edgecolor under the hood) and points.
linewidth : float, default 2
    The line width for the polygon boundary.
**kwargs
    Additional keyword arguments passed to the matplotlib Patch.

Returns
-------
Matplotlib artist (PathPatch)

r   r%   r   Nr,   r   noner.   r2   )r'   r&   r   r   r   r   r   MultiLineStringr   r   r   r   r   r8   r9   r:   )r=   r   r;   r3   r1   r(   r&   r   mlinepathr<   s              r   	plot_linerD      s    6 -$	z]}$//00&&AELd2::ell+ArrE23L
 BJJt{{+ArrE23%HNE LL4e4{L Ms   8Dc                     Uc
  [        5       n[        R                  " U 5      nUR                  " USS2S4   USS2S4   4SX2S.UD6u  nU$ )a  Plot a Point/MultiPoint or the vertices of any other geometry type.

Parameters
----------
geom : shapely.Geometry
    Any shapely Geometry object, from which all vertices are extracted
    and plotted.
ax : matplotlib Axes, default None
    The axes on which to draw the plot. If not specified, will get the
    current active axes or create a new figure.
color : matplotlib color specification
    Color for the filled points. You can use `markeredgecolor` and
    `markerfacecolor` to have different edge and fill colors.
marker : str, default "o"
    The matplotlib marker for the points.
**kwargs
    Additional keyword arguments passed to matplotlib `plot` (Line2D).

Returns
-------
Matplotlib artist (Line2D)

Nr       )	linestylemarkerr3   )r   r   get_coordinatesplot)geomr   r3   rI   r(   r   r=   s          r   r:   r:      s^    0 
z]$$T*Fggq!tfQTl.0PVGT Kr   )NTNNNN)NTNr   )NNo)
__doc__numpyr   r   r   r   r)   r>   rD   r:    r   r   <module>rQ      sG     
"<2 
FR5pr   