PostGIS 3.6.2dev-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 610 of file raster2pgsql.py.

610def calculate_bounding_box(ds, gt):
611 """Calculate georeferenced coordinates of spatial extent of raster dataset"""
612 assert ds is not None
613
614 # UL, LL, UR, LR
615 dim = ( (0,0),(0,ds.RasterYSize),(ds.RasterXSize,0),(ds.RasterXSize,ds.RasterYSize) )
616
617 ext = (calculate_geoxy(gt, dim[0]), calculate_geoxy(gt, dim[1]),
618 calculate_geoxy(gt, dim[2]), calculate_geoxy(gt, dim[3]))
619
620 return ext
621