|
Server : Apache System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64 User : njnconst ( 1116) PHP Version : 8.4.18 Disable Function : NONE Directory : /usr/lib64/python2.7/site-packages/django/contrib/gis/utils/ |
Upload File : |
�
r�\c @ s# d Z d d l m Z d � Z d S( s+
Utilities for manipulating Geometry WKT.
i����( t sixc s� t | t � r d | } n! t | t j � r7 | } n t � d j | | g � � � f d � � � f d � � � � � f d � � d j g � | � D] } | ^ q� � S( s�
Returns WKT text of the geometry according to the given precision (an
integer or a string). If the precision is an integer, then the decimal
places of coordinates WKT will be truncated to that number:
>>> pnt = Point(5, 23)
>>> pnt.wkt
'POINT (5.0000000000000000 23.0000000000000000)'
>>> precision(geom, 1)
'POINT (5.0 23.0)'
If the precision is a string, it must be valid Python format string
(e.g., '%20.7f') -- thus, you should know what you're doing.
s %%.%dft c s( d j g | D] } � | d ^ q
� S( Nt ,i ( t join( t coordst c( t coord_fmt( s>