invert4geom.create_window_regions#
- create_window_regions(region, window_width, window_overlap=0.0, spacing=None)[source]#
Tile a region with square windows of a set width, optionally overlapping. Window placement uses
bordado.line_coordinates(the same placement asbordado.rolling_window); the first and last windows in each dimension align with the region edges, the entire region is covered, and the actual overlap is adjusted (up or down) from the requested value so the windows are evenly distributed. If the region is smaller than the window width in a dimension, a single window spanning that dimension is used.- Parameters:
region (
tuple[float,float,float,float]) â bounding region to tile, in the format (min_easting, max_easting, min_northing, max_northing).window_width (
float) â width of the square windows, in the same units as the region.window_overlap (
float) â fraction (0 to <1) of the window width which adjacent windows should overlap by, by default 0.0spacing (
float|None) â if provided, window edges are snapped to multiples of this grid spacing, by default None
- Returns:
list of window regions in the same format as the input region.
- Return type: