<s> from ctypes import c_char_p , c_int , c_void_p , POINTER <EOL> from django . contrib . gis . gdal . libgdal import lgdal , std_call <EOL> from django . contrib . gis . gdal . prototypes . generation import const_string_output , double_output , int_output , srs_output , string_output , void_output <EOL> def srs_double ( f ) : <EOL> """<STR_LIT>""" <EOL> return double_output ( f , [ c_void_p , POINTER ( c_int ) ] , errcheck = True ) <EOL> def units_func ( f ) : <EOL> """<STR_LIT>""" <EOL> return double_output ( f , [ c_void_p , POINTER ( c_char_p ) ] , strarg = True ) <EOL> clone_srs = srs_output ( std_call ( '<STR_LIT>' ) , [ c_void_p ] ) <EOL> new_srs = srs_output ( std_call ( '<STR_LIT>' ) , [ c_char_p ] ) <EOL> release_srs = void_output ( lgdal . OSRRelease , [ c_void_p ] , errcheck = False ) <EOL> destroy_srs = void_output ( std_call ( '<STR_LIT>' ) , [ c_void_p ] , errcheck = False ) <EOL> srs_validate = void_output ( lgdal . OSRValidate , [ c_void_p ] ) <EOL> semi_major = srs_double ( lgdal . OSRGetSemiMajor ) <EOL> semi_minor = srs_double ( lgdal . OSRGetSemiMinor ) <EOL> invflattening = srs_double ( lgdal . OSRGetInvFlattening ) <EOL> from_wkt = void_output ( lgdal . OSRImportFromWkt , [ c_void_p , POINTER ( c_char_p ) ] ) <EOL> from_proj = void_output ( lgdal . OSRImportFromProj4 , [ c_void_p , c_char_p ] ) <EOL> from_epsg = void_output ( std_call ( '<STR_LIT>' ) , [ c_void_p , c_int ] ) <EOL> from_xml = void_output ( lgdal . OSRImportFromXML , [ c_void_p , c_char_p ] ) <EOL> from_user_input = void_output ( std_call ( '<STR_LIT>' ) , [ c_void_p , c_char_p ] ) <EOL> morph_to_esri = void_output ( lgdal . OSRMorphToESRI , [ c_void_p ] ) <EOL> morph_from_esri = void_output ( lgdal . OSRMorphFromESRI , [ c_void_p ] ) <EOL> identify_epsg = void_output ( lgdal . OSRAutoIdentifyEPSG , [ c_void_p ] ) <EOL> linear_units = units_func ( lgdal . OSRGetLinearUnits ) <EOL> angular_units = units_func ( lgdal . OSRGetAngularUnits ) <EOL> to_wkt = string_output ( std_call ( '<STR_LIT>' ) , [ c_void_p , POINTER ( c_char_p ) ] ) <EOL> to_proj = string_output ( std_call ( '<STR_LIT>' ) , [ c_void_p , POINTER ( c_char_p ) ] ) <EOL> to_pretty_wkt = string_output ( std_call ( '<STR_LIT>' ) , [ c_void_p , POINTER ( c_char_p ) , c_int ] , offset = - <NUM_LIT:2> ) <EOL> to_xml = string_output ( lgdal . OSRExportToXML , [ c_void_p , POINTER ( c_char_p ) , c_char_p ] , offset = - <NUM_LIT:2> ) <EOL> get_attr_value = const_string_output ( std_call ( '<STR_LIT>' ) , [ c_void_p , c_char_p , c_int ] ) <EOL> get_auth_name = const_string_output ( lgdal . OSRGetAuthorityName , [ c_void_p , c_char_p ] ) <EOL> get_auth_code = const_string_output ( lgdal . OSRGetAuthorityCode , [ c_void_p , c_char_p ] ) <EOL> isgeographic = int_output ( lgdal . OSRIsGeographic , [ c_void_p ] ) <EOL> islocal = int_output ( lgdal . OSRIsLocal , [ c_void_p ] ) <EOL> isprojected = int_output ( lgdal . OSRIsProjected , [ c_void_p ] ) <EOL> new_ct = srs_output ( std_call ( '<STR_LIT>' ) , [ c_void_p , c_void_p ] ) <EOL> destroy_ct = void_output ( std_call ( '<STR_LIT>' ) , [ c_void_p ] , errcheck = False ) </s>
