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

◆ calculate_grid_size()

raster2pgsql.calculate_grid_size (   raster_size,
  block_size 
)
Dimensions of grid made up with blocks of requested size

Definition at line 570 of file raster2pgsql.py.

570def calculate_grid_size(raster_size, block_size):
571 """Dimensions of grid made up with blocks of requested size"""
572
573 # Exact number of grid dimensions
574 nx = float(raster_size[0]) / float(block_size[0])
575 ny = float(raster_size[1]) / float(block_size[1])
576
577 return ( int(math.ceil(nx)), int(math.ceil(ny)))
578