PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ calculate_bounding_box()

raster2pgsql.calculate_bounding_box (   ds,
  gt 
)
Calculate georeferenced coordinates of spatial extent of raster dataset

Definition at line 617 of file raster2pgsql.py.

617def calculate_bounding_box(ds, gt):
618 """Calculate georeferenced coordinates of spatial extent of raster dataset"""
619 assert ds is not None
620
621 # UL, LL, UR, LR
622 dim = ( (0,0),(0,ds.RasterYSize),(ds.RasterXSize,0),(ds.RasterXSize,ds.RasterYSize) )
623
624 ext = (calculate_geoxy(gt, dim[0]), calculate_geoxy(gt, dim[1]),
625 calculate_geoxy(gt, dim[2]), calculate_geoxy(gt, dim[3]))
626
627 return ext
628