Django

Code

Changeset 6914

Show
Ignore:
Timestamp:
12/11/07 10:18:48 (7 months ago)
Author:
jbronn
Message:

gis: gdal: removed errcheck_flag, not needed after all (I misread the C header file).

Files:

Legend:

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

    r6862 r6914  
    88    from django.conf import settings 
    99    lib_name = settings.GDAL_LIBRARY_PATH 
    10 except (AttributeError, EnvironmentError): 
     10except (AttributeError, EnvironmentError, ImportError): 
    1111    lib_name = None 
    1212 
     
    1616    # Windows NT shared library 
    1717    lib_name = 'libgdal-1.dll' 
    18     errcheck_flag = False 
    1918elif os.name == 'posix': 
    2019    platform = os.uname()[0] 
     
    2524        # Attempting to use .so extension for all other platforms. 
    2625        lib_name = 'libgdal.so' 
    27     errcheck_flag = True 
    2826else: 
    2927    raise OGRException('Unsupported OS "%s"' % os.name) 
  • django/branches/gis/django/contrib/gis/gdal/prototypes/ds.py

    r6707 r6914  
    66from ctypes import c_char_p, c_int, c_long, c_void_p, POINTER 
    77from django.contrib.gis.gdal.envelope import OGREnvelope 
    8 from django.contrib.gis.gdal.libgdal import lgdal, errcheck_flag 
     8from django.contrib.gis.gdal.libgdal import lgdal 
    99from django.contrib.gis.gdal.prototypes.generation import \ 
    1010    const_string_output, double_output, geom_output, int_output, \ 
     
    4848### Feature Routines ### 
    4949clone_feature = voidptr_output(lgdal.OGR_F_Clone, [c_void_p]) 
    50 destroy_feature = void_output(lgdal.OGR_F_Destroy, [c_void_p], errcheck=errcheck_flag
     50destroy_feature = void_output(lgdal.OGR_F_Destroy, [c_void_p], errcheck=False
    5151feature_equal = int_output(lgdal.OGR_F_Equal, [c_void_p, c_void_p]) 
    5252get_feat_geom_ref = geom_output(lgdal.OGR_F_GetGeometryRef, [c_void_p]) 
  • django/branches/gis/django/contrib/gis/gdal/prototypes/geom.py

    r6707 r6914  
    11from ctypes import c_char, c_char_p, c_double, c_int, c_ubyte, c_void_p, POINTER 
    22from django.contrib.gis.gdal.envelope import OGREnvelope 
    3 from django.contrib.gis.gdal.libgdal import lgdal, errcheck_flag 
     3from django.contrib.gis.gdal.libgdal import lgdal 
    44from django.contrib.gis.gdal.prototypes.errcheck import check_bool, check_envelope 
    55from django.contrib.gis.gdal.prototypes.generation import \ 
     
    7373get_point_count = int_output(lgdal.OGR_G_GetPointCount, [c_void_p]) 
    7474get_point = void_output(lgdal.OGR_G_GetPoint, [c_void_p, c_int, POINTER(c_double), POINTER(c_double), POINTER(c_double)], errcheck=False) 
    75 geom_close_rings = void_output(lgdal.OGR_G_CloseRings, [c_void_p], errcheck=errcheck_flag
     75geom_close_rings = void_output(lgdal.OGR_G_CloseRings, [c_void_p], errcheck=False
    7676 
    7777# Topology routines. 
     
    8686 
    8787# Transformation routines. 
    88 geom_transform = void_output(lgdal.OGR_G_Transform, [c_void_p, c_void_p], errcheck=True
    89 geom_transform_to = void_output(lgdal.OGR_G_TransformTo, [c_void_p, c_void_p], errcheck=True
     88geom_transform = void_output(lgdal.OGR_G_Transform, [c_void_p, c_void_p]
     89geom_transform_to = void_output(lgdal.OGR_G_TransformTo, [c_void_p, c_void_p]
    9090 
    9191# For retrieving the envelope of the geometry. 
  • django/branches/gis/django/contrib/gis/gdal/prototypes/srs.py

    r6707 r6914  
    11from ctypes import c_char_p, c_int, c_void_p, POINTER 
    2 from django.contrib.gis.gdal.libgdal import lgdal, errcheck_flag 
     2from django.contrib.gis.gdal.libgdal import lgdal 
    33from django.contrib.gis.gdal.prototypes.generation import \ 
    44    const_string_output, double_output, int_output, \ 
     
    2323clone_srs = srs_output(lgdal.OSRClone, [c_void_p]) 
    2424new_srs = srs_output(lgdal.OSRNewSpatialReference, [c_char_p]) 
    25 release_srs = void_output(lgdal.OSRRelease, [c_void_p], errcheck=errcheck_flag
    26 destroy_srs = void_output(lgdal.OSRDestroySpatialReference, [c_void_p], errcheck=errcheck_flag
     25release_srs = void_output(lgdal.OSRRelease, [c_void_p], errcheck=False
     26destroy_srs = void_output(lgdal.OSRDestroySpatialReference, [c_void_p], errcheck=False
    2727srs_validate = void_output(lgdal.OSRValidate, [c_void_p]) 
    2828 
     
    6969# Coordinate transformation 
    7070new_ct= srs_output(lgdal.OCTNewCoordinateTransformation, [c_void_p, c_void_p]) 
    71 destroy_ct = void_output(lgdal.OCTDestroyCoordinateTransformation, [c_void_p], errcheck=errcheck_flag
     71destroy_ct = void_output(lgdal.OCTDestroyCoordinateTransformation, [c_void_p], errcheck=False