parameters: (self, table, geom, force=False)
return_statement: return (minx, miny, maxx, maxy)
docstring: find out table extent
docstring_summary: find out table extent
docstring_tokens: find out table extent
function: def getTableExtent(self, table, geom, force=False):
          """ find out table extent """
          _, tablename = self.getSchemaTableName(table)
  
          if self.isRasterTable(table):
  
              md = self.gdal_ds.GetMetadata('SUBDATASETS')
              if md is None or len(md) == 0:
                  ds = self.gdal_ds
              else:
                  subdataset_name = 'GPKG:%s:%s' % (self.gdal_ds.GetDescription(), tablename)
                  ds = gdal.Open(subdataset_name)
              if ds is None:
                  return None
              gt = ds.GetGeoTransform()
              minx = gt[0]
              maxx = gt[0] + gt[1] * ds.RasterYSize
              maxy = gt[3]
              miny = gt[3] + gt[5] * ds.RasterYSize
  
              return (minx, miny, maxx, maxy)
  
          lyr = self.gdal_ds.GetLayerByName(tablename)
          if lyr is None:
              return None
          ret = lyr.GetExtent(force=force, can_return_null=True)
          if ret is None:
              return None
          minx, maxx, miny, maxy = ret
          return (minx, miny, maxx, maxy)
function_tokens: def getTableExtent ( self , table , geom , force = False ) : _ , tablename = self . getSchemaTableName ( table ) if self . isRasterTable ( table ) : md = self . gdal_ds . GetMetadata ( 'SUBDATASETS' ) if md is None or len ( md ) == 0 : ds = self . gdal_ds else : subdataset_name = 'GPKG:%s:%s' % ( self . gdal_ds . GetDescription ( ) , tablename ) ds = gdal . Open ( subdataset_name ) if ds is None : return None gt = ds . GetGeoTransform ( ) minx = gt [ 0 ] maxx = gt [ 0 ] + gt [ 1 ] * ds . RasterYSize maxy = gt [ 3 ] miny = gt [ 3 ] + gt [ 5 ] * ds . RasterYSize return ( minx , miny , maxx , maxy ) lyr = self . gdal_ds . GetLayerByName ( tablename ) if lyr is None : return None ret = lyr . GetExtent ( force = force , can_return_null = True ) if ret is None : return None minx , maxx , miny , maxy = ret return ( minx , miny , maxx , maxy )