OwlCyberSecurity - MANAGER
Edit File: ogrinfo.cpython-39.pyc
a ���e� � @ s* d Z ddlmZ ddlmZ ddd�ZdS ) z� This module includes some utility functions for inspecting the layout of a GDAL data source -- the functionality is analogous to the output produced by the `ogrinfo` utility. � )� DataSource)�GEO_CLASSES� c C sf t | t�rt| �} nt | t�r ntd��t| �D �].\}}td| j � td| � tdt|jj j � tdt|� � td|j � |j j}td|dd � |d d � f � td| � ttt|j�� }d| }t|d |� �D ]z\}}td| � |jD ]^} || j} || | f }|�| �}|�rLt |t��r:d} nd} || | 7 }n|d7 }t|� q�q�q0d S )z� Walk the available layers in the supplied `data_source`, displaying the fields for the first `num_features` features. z>Data source parameter must be a string or a DataSource object.zdata source : %sz ==== layer %sz shape type: %sz # features: %sz srs: %sz extent: %s - %sr � � z%Displaying the first %s features ====z %%%ss: %%sNz=== Feature %sz ("%s")z (%s)z (None))� isinstance�strr � Exception� enumerate�print�namer Z geom_type�num�__name__�lenZsrsZextent�tuple�max�map�fields� type_name�get)Zdata_sourceZnum_features�i�layerZ extent_tup�width�fmt�j�featureZfld_namer �output�valZval_fmt� r �a/home/gouroczh/virtualenv/pat/3.9/lib/python3.9/site-packages/django/contrib/gis/utils/ogrinfo.py�ogrinfo s>