PostGIS 3.0.6dev-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 609 of file raster2pgsql.py.

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