bugged stringlengths 4 228k | fixed stringlengths 0 96.3M | __index_level_0__ int64 0 481k |
|---|---|---|
def preload_next_image(self, use_existing_image): if self.preloading_images == True and len(self.image_list) > 1: if use_existing_image == False: if self.curr_img_in_list + 1 <= len(self.image_list)-1: temp_name = str(self.image_list[self.curr_img_in_list+1]) elif self.listwrap_mode > 0: temp_name = str(self.image_list... | def preload_next_image(self, use_existing_image): if self.preloading_images == True and len(self.image_list) > 1: if use_existing_image == False: if self.curr_img_in_list + 1 <= len(self.image_list)-1: temp_name = str(self.image_list[self.curr_img_in_list+1]) elif self.listwrap_mode > 0: temp_name = str(self.image_list... | 37,300 |
def preload_next_image(self, use_existing_image): if self.preloading_images == True and len(self.image_list) > 1: if use_existing_image == False: if self.curr_img_in_list + 1 <= len(self.image_list)-1: temp_name = str(self.image_list[self.curr_img_in_list+1]) elif self.listwrap_mode > 0: temp_name = str(self.image_list... | def preload_next_image(self, use_existing_image): if self.preloading_images == True and len(self.image_list) > 1: if use_existing_image == False: if self.curr_img_in_list + 1 <= len(self.image_list)-1: temp_name = str(self.image_list[self.curr_img_in_list+1]) elif self.listwrap_mode > 0: temp_name = str(self.image_list... | 37,301 |
def expand_directory(self, item, stop_when_image_found, go_buttons_enabled, update_title, print_found_msg): if self.stop_now == False and self.closing_app == False: folderlist = [] filelist = [] if os.access(item, os.R_OK) == False: return False for item2 in os.listdir(item): if item2[0] != '.' and self.closing_app == ... | def expand_directory(self, item, stop_when_image_found, go_buttons_enabled, update_title, print_found_msg): if self.stop_now == False and self.closing_app == False: folderlist = [] filelist = [] if os.access(item, os.R_OK) == False: return False for item2 in os.listdir(item): if item2[0] != '.' and self.closing_app == ... | 37,302 |
def txtToCDF(txtFile, ncFile, varName, attr): # Transfer contents of 'txtFile' to NC.FLOAT variable 'varName' inside # netCDF file 'ncFile'. `attr' is a dictionnary holding attributes # to assign to the variable. | def txtToCDF(txtFile, ncFile, varName, attr): # Transfer contents of 'txtFile' to NC.FLOAT variable 'varName' inside # netCDF file 'ncFile'. `attr' is a dictionnary holding attributes # to assign to the variable. | 37,303 |
def __setitem__(self, elem, data): | def __setitem__(self, elem, data): | 37,304 |
def __buildStartCountStride(self, elem): | def __buildStartCountStride(self, elem): | 37,305 |
def txtToCDF(txtFile, ncFile, varName, attr): # Transfer contents of 'txtFile' to NC.FLOAT variable 'varName' inside # netCDF file 'ncFile'. `attr' is a dictionnary holding attributes # to assign to the variable. | def txtToCDF(txtFile, ncFile, varName, attr): # Transfer contents of 'txtFile' to NC.FLOAT variable 'varName' inside # netCDF file 'ncFile'. `attr' is a dictionnary holding attributes # to assign to the variable. | 37,306 |
def txtToCDF(txtFile, ncFile, varName, attr): # Transfer contents of 'txtFile' to NC.FLOAT variable 'varName' inside # netCDF file 'ncFile'. `attr' is a dictionnary holding attributes # to assign to the variable. | def txtToCDF(txtFile, ncFile, varName, attr): # Transfer contents of 'txtFile' to NC.FLOAT variable 'varName' inside # netCDF file 'ncFile'. `attr' is a dictionnary holding attributes # to assign to the variable. | 37,307 |
def inq(self): """Return information about the variable. Dataset mode: does not matter. | def inq(self): """Return information about the variable. Dataset mode: does not matter. | 37,308 |
def inq_ndims(self): """Get the number of dimensions associated with the variable. Dataset mode: does not matter. | def inq_ndims(self): """Get the number of dimensions; 0 indicates a scalar variable associated with the variable. Dataset mode: does not matter. | 37,309 |
def inq_dimid(self): """Get the index numbers of the dimensions associated with the variable. Dataset mode: does not matter. | def inq_dimid(self): """Get the index numbers of the dimensions associated with the variable. Dataset mode: does not matter. | 37,310 |
def isrecord(self): """Determines whether the variable is a record variable, eg its first dimension refers to the unlimited dimension. | def isrecord(self): """Determines whether the variable is a record variable, eg its first dimension refers to the unlimited dimension. | 37,311 |
def dimensions(self): """Return the names of the variable dimensions. Dataset mode: does not matter. | def dimensions(self): """Return the names of the variable dimensions. Dataset mode: does not matter. | 37,312 |
def shape(self): """Return the variable shape, that is, the length of its dimensions. Dataset mode: does not matter. | def shape(self): """Return the variable shape, that is, the length of its dimensions. Dataset mode: does not matter. | 37,313 |
def Clone(self): o = SpatialReference(obj=_gdal.OSRClone( self._o )) if o is None or o == 'NULL': return None else: return SpatialReference(obj=o) | def Clone(self): o = _gdal.OSRClone( self._o ) if o is None or o == 'NULL': return None else: return SpatialReference(obj=o) | 37,314 |
def Usage(): print 'Usage: tigerpoly.py infile [outfile].shp' print sys.exit(1) | def Usage(): print 'Usage: tigerpoly.py infile [outfile].shp' print sys.exit(1) | 37,315 |
def CreateLayer(self, name, srs = None, geom_type = wkbUnknown, options = [] ): if srs is None: srs_o = 'NULL' else: srs_o = srs._o md_c = _gdal.ListToStringList( options ) obj = _gdal.OGR_DS_CreateLayer( self._o, name, srs_o, geom_type, md_c) _gdal.CSLDestroy(md_c) if obj is None or obj == 'NULL': raise ValueError, gd... | def CreateLayer(self, name, srs = None, geom_type = wkbUnknown, options = [] ): if srs is None: srs_o = 'NULL' else: srs_o = srs._o md_c = _gdal.ListToStringList( options ) obj = _gdal.OGR_DS_CreateLayer( self._o, name, srs_o, geom_type, md_c) _gdal.CSLDestroy(md_c) if obj is None or obj == 'NULL': raise ValueError, gd... | 37,316 |
def GetDriverByName(name): _gdal.GDALAllRegister() driver_count = _gdal.GDALGetDriverCount() for iDriver in range(driver_count): driver_o = _gdal.GDALGetDriver( iDriver ) if _gdal.GDALGetDriverShortName(driver_o) == name: return Driver(driver_o) return None | def GetDriverByName(name): _gdal.GDALAllRegister() driver_o = _gdal.GDALGetDriverByName( name ) if driver_o is None or driver_o == "NULL": return None else: return Driver( driver_o ) | 37,317 |
def GetRasterBand(self, i): if i > 0 & i <= self.RasterCount: return self._band[i-1] else: return None | def GetRasterBand(self, i): if i > 0 and i <= self.RasterCount: return self._band[i-1] else: return None | 37,318 |
def CreateGeometryFromWkb( bin_string, srs = None ): _obj = _gdal.OGR_G_CreateFromWkb( bin_string, srs ) return Geometry( obj = _obj ) | def CreateGeometryFromWkb( bin_string, srs = None ): if srs is not None: srs_o = srs._o else: srs_o = '' _obj = _gdal.OGR_G_CreateFromWkb( bin_string, srs_o ) return Geometry( obj = _obj ) | 37,319 |
def CreateGeometryFromWkt( string, srs = None ): _obj = _Gdal.OGR_G_CreateFromWkt( string, srs ) return Geometry( obj = _obj ) | def CreateGeometryFromWkt( string, srs = None ): if srs is not None: srs_o = srs._o else: srs_o = '' _obj = _gdal.OGR_G_CreateFromWkt( string, srs_o ) return Geometry( obj = _obj ) | 37,320 |
def CloneGeogCS(self): return SpatialReference(obj=_gdal.OSRCloneGeogCS( self._o )) | def CloneGeogCS(self): o = _gdal.OSRCloneGeogCS( self._o ) if o is None: return None else: return SpatialReference(obj=o) | 37,321 |
def Clone(self): return SpatialReference(obj=_gdal.OSRClone( self._o )) | def Clone(self): o = SpatialReference(obj=_gdal.OSRClone( self._o )) if o is None: return None else: return SpatialReference(obj=o) | 37,322 |
def Open( filename, update = 0 ): ds_o = _gdal.OGROpen( filename, update, None ) if ds_o is None: raise ValueError, 'Unable to open: ' + filename else: return DataSource( ds_o ) | def Open( filename, update = 0 ): ds_o = _gdal.OGROpen( filename, update, 'NULL' ) if ds_o is None or ds_o == 'NULL': raise ValueError, 'Unable to open: ' + filename else: return DataSource( ds_o ) | 37,323 |
def GetDriver( driver_index ): dr_o = _gdal.OGRGetDriver( driver_index ) if dr_o is None: raise IndexError else: return Driver( dr_o ) | def GetDriver( driver_index ): dr_o = _gdal.OGRGetDriver( driver_index ) if dr_o is None or dr_o == 'NULL': raise IndexError else: return Driver( dr_o ) | 37,324 |
def Open( self, filename, update = 0 ): ds_o = _gdal.OGR_Dr_Open( self._o, filename, update ) if ds_o is None: return None else: return DataSource( ds_o ) | def Open( self, filename, update = 0 ): ds_o = _gdal.OGR_Dr_Open( self._o, filename, update ) if ds_o is None or ds_o == 'NULL': return None else: return DataSource( ds_o ) | 37,325 |
def CreateDataSource( self, filename, options = None ): ds_o = _gdal.OGR_Dr_CreateDataSource( self._o, filename, "NULL" ) if ds_o is None: return None else: return DataSource( ds_o ) | def CreateDataSource( self, filename, options = None ): ds_o = _gdal.OGR_Dr_CreateDataSource( self._o, filename, "NULL" ) if ds_o is None or ds_o == 'NULL': raise ValueError, CPLGetLastErrorMsg() else: return DataSource( ds_o ) | 37,326 |
def GetLayer(self,iLayer=0): # If given a layer name, scan for it. if type(iLayer).__name__ == 'str': layer_count = self.GetLayerCount() for i in range(layer_count): if self.GetLayer(i).GetName() == iLayer: return self.GetLayer(i) return None l_obj = _gdal.OGR_DS_GetLayer( self._o, iLayer) if l_obj is not None: return... | def GetLayer(self,iLayer=0): # If given a layer name, scan for it. if type(iLayer).__name__ == 'str': return self.GetLayerByName( iLayer ) l_obj = _gdal.OGR_DS_GetLayer( self._o, iLayer) if l_obj is not None: return Layer( l_obj ) else: return None | 37,327 |
def GetLayer(self,iLayer=0): # If given a layer name, scan for it. if type(iLayer).__name__ == 'str': layer_count = self.GetLayerCount() for i in range(layer_count): if self.GetLayer(i).GetName() == iLayer: return self.GetLayer(i) return None l_obj = _gdal.OGR_DS_GetLayer( self._o, iLayer) if l_obj is not None: return... | def GetLayer(self,iLayer=0): # If given a layer name, scan for it. if type(iLayer).__name__ == 'str': layer_count = self.GetLayerCount() for i in range(layer_count): if self.GetLayer(i).GetName() == iLayer: return self.GetLayer(i) return None l_obj = _gdal.OGR_DS_GetLayer( self._o, iLayer) if l_obj is not None and l_o... | 37,328 |
def GetLayer(self,iLayer=0): # If given a layer name, scan for it. if type(iLayer).__name__ == 'str': layer_count = self.GetLayerCount() for i in range(layer_count): if self.GetLayer(i).GetName() == iLayer: return self.GetLayer(i) return None l_obj = _gdal.OGR_DS_GetLayer( self._o, iLayer) if l_obj is not None: return... | def GetLayer(self,iLayer=0): # If given a layer name, scan for it. if type(iLayer).__name__ == 'str': layer_count = self.GetLayerCount() for i in range(layer_count): if self.GetLayer(i).GetName() == iLayer: return self.GetLayer(i) raise IndexError, 'No layer %d on datasource' % iLayer def GetLayerByName(self,name): l... | 37,329 |
def DeleteLayer( self, iLayer ): return _gdal.OGR_DS_DeleteLayer( self._o, iLayer ) | def DeleteLayer( self, iLayer ): return _gdal.OGR_DS_DeleteLayer( self._o, iLayer ) | 37,330 |
def CreateLayer(self, name, srs = None, geom_type = wkbUnknown, options = [] ): obj = _gdal.OGR_DS_CreateLayer( self._o, name, srs, geom_type, options) if obj is None: return None else: return Layer( obj = obj ) | def CreateLayer(self, name, srs = None, geom_type = wkbUnknown, options = [] ): obj = _gdal.OGR_DS_CreateLayer( self._o, name, srs, geom_type, options) if obj is None and obj != 'NULL': raise ValueError, gdal.GetLastErrorMsg() else: return Layer( obj = obj ) | 37,331 |
def ExecuteSQL( self, statement, region = None, dialect = "" ): l_obj = _gdal.OGR_DS_ExecuteSQL( self._o, statement, region, dialect ) if l_obj is not None: return Layer( l_obj ) else: return None | def ExecuteSQL( self, statement, region = 'NULL', dialect = "" ): l_obj = _gdal.OGR_DS_ExecuteSQL( self._o, statement, region, dialect ) if l_obj is not None: return Layer( l_obj ) else: return None | 37,332 |
def ExecuteSQL( self, statement, region = None, dialect = "" ): l_obj = _gdal.OGR_DS_ExecuteSQL( self._o, statement, region, dialect ) if l_obj is not None: return Layer( l_obj ) else: return None | def ExecuteSQL( self, statement, region = None, dialect = "" ): l_obj = _gdal.OGR_DS_ExecuteSQL( self._o, statement, region, dialect ) if l_obj is not None and l_obj != 'NULL': return Layer( l_obj ) else: return None | 37,333 |
def ReleaseResultsSet( self, layer ): _gdal.OGR_DS_ReleaseResultsSet( self._o, layer._o ) | def ReleaseResultsSet( self, layer ): _gdal.OGR_DS_ReleaseResultsSet( self._o, layer._o ) | 37,334 |
def SetSpatialFilter( self, geom ): if geom is None: geom_o = None else: geom_o = geom._o _gdal.OGR_L_SetSpatialFilter( self._o, geom_o ) | def SetSpatialFilter( self, geom ): if geom is None: geom_o = 'NULL' else: geom_o = geom._o _gdal.OGR_L_SetSpatialFilter( self._o, geom_o ) | 37,335 |
def GetSpatialFilter( self ): geom_o = _gdal.OGR_L_GetSpatialGeometry( self._o ) if geom_o is None: return None else: return Geometry( _obj = geom_o ) | def GetSpatialFilter( self ): geom_o = _gdal.OGR_L_GetSpatialGeometry( self._o ) if geom_o is None or geom_o == 'NULL': return None else: return Geometry( _obj = geom_o ) | 37,336 |
def GetFeature( self, fid ): f_o = _gdal.OGR_L_GetFeature( self._o, fid ) if f_o is None: return None else: return Feature( obj = f_o ) | def GetFeature( self, fid ): f_o = _gdal.OGR_L_GetFeature( self._o, fid ) if f_o is None or f_o == 'NULL': return None else: return Feature( obj = f_o ) | 37,337 |
def GetNextFeature( self ): f_o = _gdal.OGR_L_GetNextFeature( self._o ) if f_o is None: return None else: return Feature( obj = f_o ) | def GetNextFeature( self ): f_o = _gdal.OGR_L_GetNextFeature( self._o ) if f_o is None or f_o == 'NULL': return None else: return Feature( obj = f_o ) | 37,338 |
def GetExtent( self, force = 1 ): raise ValueError, 'No implemented yet' | def GetExtent( self, force = 1 ): raise ValueError, 'No implemented yet' | 37,339 |
def SetPoint( self, i, x, y, z ): return _gdal.OGR_G_SetPoint( self._o, i, x, y, z ) | def SetPoint( self, i, x, y, z = 0): return _gdal.OGR_G_SetPoint( self._o, i, x, y, z ) | 37,340 |
def AddPoint( self, x, y, z ): return _gdal.OGR_G_AddPoint( self._o, x, y, z ) | def AddPoint( self, x, y, z = 0 ): return _gdal.OGR_G_AddPoint( self._o, x, y, z ) | 37,341 |
def RGBFile2PCTFile( src_filename, dst_filename ): src_ds = Open(src_filename) if src_ds is None: return 1 ct = ColorTable() err = ComputeMedianCutPCT( src_ds.GetRasterBand(1), src_ds.GetRasterBand(2), src_ds.GetRasterBand(3), 256, ct ) if err <> 0: return err gtiff_driver = GetDriverByName('GTiff') if gtiff_driver i... | def RGBFile2PCTFile( src_filename, dst_filename ): src_ds = Open(src_filename) if src_ds is None or src_ds == 'NULL': return 1 ct = ColorTable() err = ComputeMedianCutPCT( src_ds.GetRasterBand(1), src_ds.GetRasterBand(2), src_ds.GetRasterBand(3), 256, ct ) if err <> 0: return err gtiff_driver = GetDriverByName('GTiff... | 37,342 |
def Create(self, filename, xsize, ysize, bands=1, datatype=GDT_Byte, options = []): target_ds = _gdal.GDALCreate( self._o, filename, xsize, ysize, bands, datatype, options ) | def Create(self, filename, xsize, ysize, bands=1, datatype=GDT_Byte, options = []): target_ds = _gdal.GDALCreate( self._o, filename, xsize, ysize, bands, datatype, options ) | 37,343 |
def CreateCopy(self, filename, source_ds, strict=1, options=[], callback = None, callback_data = None ): target_ds = _gdal.GDALCreateCopy( self._o, filename, source_ds._o, strict, options, callback, callback_data ) if target_ds is None: return None else: _gdal.GDALDereferenceDataset( target_ds ) return Dataset(target_d... | def CreateCopy(self, filename, source_ds, strict=1, options=[], callback = None, callback_data = None ): target_ds = _gdal.GDALCreateCopy( self._o, filename, source_ds._o, strict, options, callback, callback_data ) if target_ds is None or target_ds == 'NULL': return None else: _gdal.GDALDereferenceDataset( target_ds ) ... | 37,344 |
def GetRasterColorTable(self): _ct = _gdal.GDALGetRasterColorTable( self._o ) if _ct is None: return None else: return ColorTable( _ct ) | def GetRasterColorTable(self): _ct = _gdal.GDALGetRasterColorTable( self._o ) if _ct is None or _ct == 'NULL': return None else: return ColorTable( _ct ) | 37,345 |
def GetOverview(self, ov_index ): _o = _gdal.GDALGetOverview( self._o, ov_index ) if _o is None: return None else: return Band( _obj = _o ) | def GetOverview(self, ov_index ): _o = _gdal.GDALGetOverview( self._o, ov_index ) if _o is None or _o == 'NULL': return None else: return Band( _obj = _o ) | 37,346 |
def Usage(): print 'Usage: mkgraticule [-connected] [-s stepsize] [-substep substepsize]' print ' [-t_srs srs] [-range xmin ymin xmax ymax] outfile' print sys.exit(1) | def Usage(): print 'Usage: mkgraticule [-connected] [-s stepsize] [-substep substepsize]' print ' [-t_srs srs] [-range xmin ymin xmax ymax] outfile' print sys.exit(1) | 37,347 |
def Usage(): print 'Usage: mkgraticule [-connected] [-s stepsize] [-substep substepsize]' print ' [-t_srs srs] [-range xmin ymin xmax ymax] outfile' print sys.exit(1) | def Usage(): print 'Usage: mkgraticule [-connected] [-s stepsize] [-substep substepsize]' print ' [-t_srs srs] [-range xmin ymin xmax ymax] outfile' print sys.exit(1) | 37,348 |
def serialize(self,with_Z=0): base = [CXT_Element,'GCP'] base.append([CXT_Attribute,'Id',[CXT_Text,self.Id]]) pixval = '%0.15E' % self.GCPPixel lineval = '%0.15E' % self.GCPLine xval = '%0.15E' % self.GCPX yval = '%0.15E' % self.GCPY zval = '%0.15E' % self.GCPZ base.append([CXT_Attribute,'Pixel',[CXT_Text,pixval]]) bas... | def serialize(self,with_Z=0): base = [CXT_Element,'GCP'] base.append([CXT_Attribute,'Id',[CXT_Text,self.Id]]) pixval = '%0.15E' % self.GCPPixel lineval = '%0.15E' % self.GCPLine xval = '%0.15E' % self.GCPX yval = '%0.15E' % self.GCPY zval = '%0.15E' % self.GCPZ base.append([CXT_Attribute,'Pixel',[CXT_Text,pixval]]) bas... | 37,349 |
def TransformTo( self, srs_out ): return _gdal.OGR_G_Transform( self._o, srs_out._o ) | def TransformTo( self, srs_out ): return _gdal.OGR_G_TransformTo( self._o, srs_out._o ) | 37,350 |
def unique(list): """Stolen from MapScript setup script""" dict = {} for item in list: dict[item] = '' return dict.keys() | def unique(list): """Stolen from MapScript setup script""" dict = {} for item in list: dict[item] = '' return dict.keys() | 37,351 |
def unique(list): """Stolen from MapScript setup script""" dict = {} for item in list: dict[item] = '' return dict.keys() | def unique(list): """Stolen from MapScript setup script""" dict = {} for item in list: dict[item] = '' return dict.keys() | 37,352 |
def Usage(): print 'Usage: gdal_merge.py [-o out_filename] [-f out_format] [-v] [-pct]' print ' [-ps pixelsize_x pixelsize_y] [-separate]' print ' [-ul_lr ulx uly lrx lry] [-n nodata_value]' print ' input_files' print | def Usage(): print 'Usage: gdal_merge.py [-o out_filename] [-f out_format] [-v] [-pct]' print ' [-ps pixelsize_x pixelsize_y] [-separate]' print ' [-ul_lr ulx uly lrx lry] [-n nodata_value]' print ' input_files' print | 37,353 |
def Usage(): print 'Usage: gdal_merge.py [-o out_filename] [-f out_format] [-v] [-pct]' print ' [-ps pixelsize_x pixelsize_y] [-separate]' print ' [-ul_lr ulx uly lrx lry] [-n nodata_value]' print ' input_files' print | def Usage(): print 'Usage: gdal_merge.py [-o out_filename] [-f out_format] [-v] [-pct]' print ' [-ps pixelsize_x pixelsize_y] [-separate]' print ' [-ul_lr ulx uly lrx lry] [-n nodata_value]' print ' input_files' print | 37,354 |
def Open(file,access=GA_ReadOnly): _gdal.GDALAllRegister() _obj = _gdal.GDALOpen(file,access) if _obj = None or _obj == "NULL" : return None; else: _gdal.GDALDereferenceDataset( _obj ) return Dataset(_obj) | def Open(file,access=GA_ReadOnly): _gdal.GDALAllRegister() _obj = _gdal.GDALOpen(file,access) if _obj is None or _obj == "NULL" : return None; else: _gdal.GDALDereferenceDataset( _obj ) return Dataset(_obj) | 37,355 |
def progress_cb( complete, message, cb_data ): print cb_data, complete | def progress_cb( complete, message, cb_data ): print '%s %3d%%' % (cb_data, int(complete*100.0)) | 37,356 |
def Usage(): print 'Usage: rgb2pct.py [-n colors] [-of format] source_file dest_file' sys.exit(1) | def Usage(): print 'Usage: rgb2pct.py [-n colors] [-of format] source_file dest_file' sys.exit(1) | 37,357 |
def Usage(): print 'Usage: rgb2pct.py [-n colors] [-of format] source_file dest_file' sys.exit(1) | defgtiff_driver.Delete( tif_filename ) Usage():gtiff_driver.Delete( tif_filename ) printgtiff_driver.Delete( tif_filename ) 'Usage:gtiff_driver.Delete( tif_filename ) rgb2pct.pygtiff_driver.Delete( tif_filename ) [-ngtiff_driver.Delete( tif_filename ) colors]gtiff_driver.Delete( tif_filename ) [-ofgtiff_driver.Delete( ... | 37,358 |
def CreateLayer(self, name, srs = None, geom_type = wkbUnknown, options = [] ): if srs is None: srs_o = 'NULL' else: srs_o = srs._o md_c = _gdal.ListToStringList( options ) obj = _gdal.OGR_DS_CreateLayer( self._o, name, srs_o, geom_type, md_c) _gdal.CSLDestroy(md_c) if obj is None and obj != 'NULL': raise ValueError, g... | def CreateLayer(self, name, srs = None, geom_type = wkbUnknown, options = [] ): if srs is None: srs_o = 'NULL' else: srs_o = srs._o md_c = _gdal.ListToStringList( options ) obj = _gdal.OGR_DS_CreateLayer( self._o, name, srs_o, geom_type, md_c) _gdal.CSLDestroy(md_c) if obj is None or obj == 'NULL': raise ValueError, gd... | 37,359 |
def __init__(self, type=None, obj=None): if obj is not None: self._o = obj elif type is not None: self._o = _gdal.OGR_G_CreateGeometry( type ) else: raise ValueError, 'OGRGeometry may not be directly instantiated.' | def __init__(self, type=None, obj=None, wkt=None): if obj is not None: self._o = obj elif type is not None: self._o = _gdal.OGR_G_CreateGeometry( type ) else: raise ValueError, 'OGRGeometry may not be directly instantiated.' | 37,360 |
def copy_into( self, t_fh, s_band = 1, t_band = 1, nodata_arg=None ): """ Copy this files image into target file. | def copy_into( self, t_fh, s_band = 1, t_band = 1, nodata_arg=None ): """ Copy this files image into target file. | 37,361 |
def copy_into( self, t_fh, s_band = 1, t_band = 1, nodata_arg=None ): """ Copy this files image into target file. | def copy_into( self, t_fh, s_band = 1, t_band = 1, nodata_arg=None ): """ Copy this files image into target file. | 37,362 |
def copy_into( self, t_fh, s_band = 1, t_band = 1, nodata_arg=None ): """ Copy this files image into target file. | def copy_into( self, t_fh, s_band = 1, t_band = 1, nodata_arg=None ): """ Copy this files image into target file. | 37,363 |
def ImportFromPCI( self, proj, units = "METRE", proj_parms = None ): | def ImportFromPCI( self, proj, units = "METRE", proj_parms = None ): | 37,364 |
def ExportToPCI(self): | def ExportToPCI(self): | 37,365 |
def unique(list): """Stolen from MapScript setup script""" dict = {} for item in list: dict[item] = '' return dict.keys() | def unique(list): """Stolen from MapScript setup script""" dict = {} for item in list: dict[item] = '' return dict.keys() | 37,366 |
def unique(list): """Stolen from MapScript setup script""" dict = {} for item in list: dict[item] = '' return dict.keys() | def unique(list): """Stolen from MapScript setup script""" dict = {} for item in list: dict[item] = '' return dict.keys() | 37,367 |
def unique(list): """Stolen from MapScript setup script""" dict = {} for item in list: dict[item] = '' return dict.keys() | def unique(list): """Stolen from MapScript setup script""" dict = {} for item in list: dict[item] = '' return dict.keys() | 37,368 |
def unique(list): """Stolen from MapScript setup script""" dict = {} for item in list: dict[item] = '' return dict.keys() | def unique(list): """Stolen from MapScript setup script""" dict = {} for item in list: dict[item] = '' return dict.keys() | 37,369 |
def unique(list): """Stolen from MapScript setup script""" dict = {} for item in list: dict[item] = '' return dict.keys() | def unique(list): """Stolen from MapScript setup script""" dict = {} for item in list: dict[item] = '' return dict.keys() | 37,370 |
def CloneGeogCS(self): o = _gdal.OSRCloneGeogCS( self._o ) if o is None: return None else: return SpatialReference(obj=o) | def CloneGeogCS(self): o = _gdal.OSRCloneGeogCS( self._o ) if o is None or o == 'NULL': return None else: return SpatialReference(obj=o) | 37,371 |
def Clone(self): o = SpatialReference(obj=_gdal.OSRClone( self._o )) if o is None: return None else: return SpatialReference(obj=o) | def Clone(self): o = SpatialReference(obj=_gdal.OSRClone( self._o )) if o is None or o == 'NULL': return None else: return SpatialReference(obj=o) | 37,372 |
def GetRasterColorTable(self): _ct = _gdal.GDALGetRasterColorTable( self._o ) if _ct is None: return None else: return _gdal.GDALColorTable( _ct ) | def GetRasterColorTable(self): _ct = _gdal.GDALGetRasterColorTable( self._o ) if _ct is None: return None else: return _gdal.GDALColorTable( _ct ) | 37,373 |
def CreateLayer(self, name, srs = None, geom_type = wkbUnknown, options = [] ): if srs is None: srs_o = 'NULL' else: srs_o = srs._o md_c = _gdal.ListToStringList( options ) obj = _gdal.OGR_DS_CreateLayer( self._o, name, srs_o, geom_type, md_c) _gdal.CSLDestroy(md_c) if obj is None or obj == 'NULL': raise ValueError, gd... | def CreateLayer(self, name, srs = None, geom_type = wkbUnknown, options = [] ): if srs is None: srs_o = 'NULL' else: srs_o = srs._o md_c = _gdal.ListToStringList( options ) obj = _gdal.OGR_DS_CreateLayer( self._o, name, srs_o, geom_type, md_c) _gdal.CSLDestroy(md_c) if obj is None or obj == 'NULL': raise ValueError, g... | 37,374 |
def AddPoint( self, x, y, z ): return _gdal.OGR_G_AddPoint( self._o, x, y, z ) | def AddPoint( self, x, y, z=0 ): return _gdal.OGR_G_AddPoint( self._o, x, y, z ) | 37,375 |
def Empty( self, other_geom ): return _gdal.OGR_G_Empty( self._o, other_geom._o ) | def Empty( self, other_geom ): return _gdal.OGR_G_Empty( self._o, other_geom._o ) | 37,376 |
def Usage(): print 'Usage: epsg_tr.py [-wkt] [-pretty_wkt] [-proj4] [-xml] [-postgis]' print ' [-list filename] [start_code [end_code]]' sys.exit(1) | def Usage(): print 'Usage: epsg_tr.py [-wkt] [-pretty_wkt] [-proj4] [-xml] [-postgis]' print ' [-skip] [-list filename] [start_code [end_code]]' sys.exit(1) | 37,377 |
def trHandleCode(code, gen_dict_line, report_error, output_format): import time try: err = prj_srs.ImportFromEPSG( code ) except: err = 1 if err != 0 and report_error: print 'Unable to lookup ',code,', either not a valid EPSG' print 'code, or it the EPSG csv files are not accessable.' sys.exit(2) else: if output_for... | def trHandleCode(code, gen_dict_line, report_error, output_format): import time try: err = prj_srs.ImportFromEPSG( code ) except: err = 1 if err != 0 and report_error: print 'Unable to lookup ',code,', either not a valid EPSG' print 'code, or it the EPSG csv files are not accessable.' sys.exit(2) else: if output_for... | 37,378 |
def Usage(): print print 'Read coordinate system and geotransformation matrix from input' print 'file and report latitude/longitude coordinates for the center' print 'of the specified pixel.' print print 'Usage: tolatlong.py pixel line infile' print sys.exit( 1 ) | def Usage(): print print 'Read coordinate system and geotransformation matrix from input' print 'file and report latitude/longitude coordinates for the center' print 'of the specified pixel.' print print 'Usage: tolatlong.py pixel line infile' print sys.exit( 1 ) | 37,379 |
def Usage(): print print 'Read coordinate system and geotransformation matrix from input' print 'file and report latitude/longitude coordinates for the center' print 'of the specified pixel.' print print 'Usage: tolatlong.py pixel line infile' print sys.exit( 1 ) | def Usage(): print print 'Read coordinate system and geotransformation matrix from input' print 'file and report latitude/longitude coordinates for the center' print 'of the specified pixel.' print print 'Usage: tolatlong.py pixel line infile' print sys.exit( 1 ) | 37,380 |
def Usage(): print print 'Read coordinate system and geotransformation matrix from input' print 'file and report latitude/longitude coordinates for the center' print 'of the specified pixel.' print print 'Usage: tolatlong.py pixel line infile' print sys.exit( 1 ) | def Usage(): print print 'Read coordinate system and geotransformation matrix from input' print 'file and report latitude/longitude coordinates for the center' print 'of the specified pixel.' print print 'Usage: tolatlong.py pixel line infile' print sys.exit( 1 ) | 37,381 |
def GetGeometryRef( self ): geom_o = _gdal.OGR_F_GetGeometryRef( self._o ) | def GetGeometryRef( self ): geom_o = _gdal.OGR_F_GetGeometryRef( self._o ) | 37,382 |
def load_dict( filename ): lines = open( filename ).readlines() this_dict = {} for line in lines: if line[:8] != 'proj_name': tokens = string.split(line,',') for i in range(len(tokens)): tokens[i] = string.strip(tokens[i]) this_dict[tokens[0]] = tokens return this_dict | def load_dict( filename ): lines = open( filename ).readlines() this_dict = {} for line in lines: if line[:8] != 'proj_name': tokens = string.split(line,',') for i in range(len(tokens)): tokens[i] = string.strip(tokens[i]) this_dict[tokens[0]] = tokens return this_dict | 37,383 |
def DumpReadable(self): _gdal.OGR_F_DumpReadable( self._o, None ) | def DumpReadable(self): _gdal.OGR_F_DumpReadable( self._o, 'NULL' ) | 37,384 |
def CreateLayer(self, name, srs = None, geom_type = wkbUnknown, options = [] ): if srs is None: srs = 'NULL' md_c = _gdal.ListToStringList( options ) obj = _gdal.OGR_DS_CreateLayer( self._o, name, srs, geom_type, md_c) _gdal.CSLDestroy(md_c) if obj is None and obj != 'NULL': raise ValueError, gdal.GetLastErrorMsg() els... | def CreateLayer(self, name, srs = None, geom_type = wkbUnknown, options = [] ): if srs is None: srs_o = 'NULL' else: srs_o = srs._o md_c = _gdal.ListToStringList( options ) obj = _gdal.OGR_DS_CreateLayer( self._o, name, srs, geom_type, md_c) _gdal.CSLDestroy(md_c) if obj is None and obj != 'NULL': raise ValueError, gda... | 37,385 |
def CreateLayer(self, name, srs = None, geom_type = wkbUnknown, options = [] ): if srs is None: srs = 'NULL' md_c = _gdal.ListToStringList( options ) obj = _gdal.OGR_DS_CreateLayer( self._o, name, srs, geom_type, md_c) _gdal.CSLDestroy(md_c) if obj is None and obj != 'NULL': raise ValueError, gdal.GetLastErrorMsg() els... | def CreateLayer(self, name, srs = None, geom_type = wkbUnknown, options = [] ): if srs is None: srs = 'NULL' md_c = _gdal.ListToStringList( options ) obj = _gdal.OGR_DS_CreateLayer( self._o, name, srs_o, geom_type, md_c) _gdal.CSLDestroy(md_c) if obj is None and obj != 'NULL': raise ValueError, gdal.GetLastErrorMsg() e... | 37,386 |
def GetSpatialReference( self ): srs_o = _gdal.OGR_G_GetSpatialReference( self._o ) if srs_o is not None: return osr.SpatialReference( srs_o ) else: return None | def GetSpatialReference( self ): srs_o = _gdal.OGR_G_GetSpatialReference( self._o ) if srs_o is not None and srs_o != 'NULL': return osr.SpatialReference( srs_o ) else: return None | 37,387 |
def Usage(): print 'Usage: gdal2xyz.py [-skip factor] [-srcwin xoff yoff width height]' print ' [-band b] srcfile [dstfile]' print sys.exit( 1 ) | def Usage(): print 'Usage: gdal2xyz.py [-skip factor] [-srcwin xoff yoff width height]' print ' [-band b] srcfile [dstfile]' print sys.exit( 1 ) | 37,388 |
def BandReadAsArray( band, xoff, yoff, win_xsize, win_ysize, buf_xsize=None, buf_ysize=None, buf_obj=None ): """Pure python implementation of reading a chunk of a GDAL file into a numpy array. Used by the gdal.Band.ReadaAsArray method.""" if win_xsize is None: win_xsize = band.XSize if win_ysize is None: win_ysize = ... | def BandReadAsArray( band, xoff, yoff, win_xsize, win_ysize, buf_xsize=None, buf_ysize=None, buf_obj=None ): """Pure python implementation of reading a chunk of a GDAL file into a numpy array. Used by the gdal.Band.ReadaAsArray method.""" if win_xsize is None: win_xsize = band.XSize if win_ysize is None: win_ysize = ... | 37,389 |
def Usage(): print 'Usage: gdal_merge.py [-o out_filename] [-of out_format] [-co NAME=VALUE]*' print ' [-ps pixelsize_x pixelsize_y] [-separate] [-v] [-pct]' print ' [-ul_lr ulx uly lrx lry] [-n nodata_value] [-init value]' print ' [-ot datatype] input_files' ... | def Usage(): print 'Usage: gdal_merge.py [-o out_filename] [-of out_format] [-co NAME=VALUE]*' print ' [-ps pixelsize_x pixelsize_y] [-separate] [-v] [-pct]' print ' [-ul_lr ulx uly lrx lry] [-n nodata_value] [-init value]' print ' [-ot datatype] input_files' ... | 37,390 |
def Usage(): print 'Usage: gdal_merge.py [-o out_filename] [-of out_format] [-co NAME=VALUE]*' print ' [-ps pixelsize_x pixelsize_y] [-separate] [-v] [-pct]' print ' [-ul_lr ulx uly lrx lry] [-n nodata_value] [-init value]' print ' [-ot datatype] [-createonly]... | def Usage(): print 'Usage: gdal_merge.py [-o out_filename] [-of out_format] [-co NAME=VALUE]*' print ' [-ps pixelsize_x pixelsize_y] [-separate] [-v] [-pct]' print ' [-ul_lr ulx uly lrx lry] [-n nodata_value] [-init value]' print ' [-ot datatype] [-createonly]... | 37,391 |
def fsync(self, path, isfsyncfile): print "xmp.py:Xmp:fsync: path=%s, isfsyncfile=%s" % (self.root + path, isfsyncfile) return 0 | def fsync(self, path, isfsyncfile): print "xmp.py:Xmp:fsync: path=%s, isfsyncfile=%s" % (self.root + path, isfsyncfile) return 0 | 37,392 |
def statfs(self): """ Should return an object with statvfs attributes (f_bsize, f_frsize...). Eg., the return value of os.statvfs() is such a thing (since py 2.2). If you are not reusing an existing statvfs object, start with fuse.StatVFS(), and define the attributes. | def statfs(self): """ Should return an object with statvfs attributes (f_bsize, f_frsize...). Eg., the return value of os.statvfs() is such a thing (since py 2.2). If you are not reusing an existing statvfs object, start with fuse.StatVFS(), and define the attributes. | 37,393 |
def fsync(self, path, isfsyncfile): print "xmp.py:Xmp:fsync: path=%s, isfsyncfile=%s" % (self.root + path, isfsyncfile) return 0 | def fsync(self, path, isfsyncfile): print "xmp.py:Xmp:fsync: path=%s, isfsyncfile=%s" % (self.root + path, isfsyncfile) return 0 | 37,394 |
def statfs(self): """ Should return a tuple with the following 6 elements: - blocksize - size of file blocks, in bytes - totalblocks - total number of blocks in the filesystem - freeblocks - number of free blocks - totalfiles - total number of file inodes - freefiles - nunber of free file inodes Feel free to set any o... | def statfs(self): """ Should return a tuple with the following 6 elements: - blocksize - size of file blocks, in bytes - totalblocks - total number of blocks in the filesystem - freeblocks - number of free blocks - totalfiles - total number of file inodes - freefiles - nunber of free file inodes Feel free to set any o... | 37,395 |
def main(self, args=None): """Enter filesystem service loop.""" | def main(self, args=None): """Enter filesystem service loop.""" | 37,396 |
def main(self, args=None): """Enter filesystem service loop.""" | def main(self, args=None): """Enter filesystem service loop.""" | 37,397 |
def main_0_1_preamble(self): | def main_0_1_preamble(self): | 37,398 |
def main_0_1_preamble(self): | def main_0_1_preamble(self): | 37,399 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.