Django

Code

Show
Ignore:
Timestamp:
11/17/07 15:38:36 (1 year ago)
Author:
jbronn
Message:

gis: gdal: refactor of the GDAL ctypes interface

(1) All interactions with the GDAL library take place through predefined ctypes prototypes, abstracting away error-checking.
(2) Fixed memory leaks by properly freeing pointers allocated w/in GDAL.
(3) Improved OFTField support, and added support for the OGR date/time fields.
(4) Significantly improved the OGRGeometry tests.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/gis/django/contrib/gis/gdal/envelope.py

    r6436 r6686  
    11""" 
    22 The GDAL/OGR library uses an Envelope structure to hold the bounding 
    3   box information for a geometry.  The envelope (bounding box) contains 
    4   two pairs of coordinates, one for the lower left coordinate and one 
    5   for the upper right coordinate: 
     3 box information for a geometry.  The envelope (bounding box) contains 
     4 two pairs of coordinates, one for the lower left coordinate and one 
     5 for the upper right coordinate: 
    66 
    7                             +----------o Upper right; (max_x, max_y) 
    8                             |          | 
    9                             |          | 
    10                             |          | 
    11   Lower left (min_x, min_y) o----------+ 
    12    
     7                           +----------o Upper right; (max_x, max_y) 
     8                           |          | 
     9                           |          | 
     10                           |          | 
     11 Lower left (min_x, min_y) o----------+ 
    1312""" 
    1413from ctypes import Structure, c_double 
     
    3029    """ 
    3130    The Envelope object is a C structure that contains the minimum and 
    32     maximum X, Y coordinates for a rectangle bounding box.  The naming 
    33     of the variables is compatible with the OGR Envelope structure. 
     31    maximum X, Y coordinates for a rectangle bounding box.  The naming 
     32    of the variables is compatible with the OGR Envelope structure. 
    3433    """ 
    3534 
     
    3736        """ 
    3837        The initialization function may take an OGREnvelope structure, 4-element 
    39         tuple or list, or 4 individual arguments. 
     38        tuple or list, or 4 individual arguments. 
    4039        """ 
    4140