reV.supply_curve.points.AbstractSupplyCurvePoint

class AbstractSupplyCurvePoint(gid, exclusion_shape, resolution=64)[source]

Bases: ABC

Abstract SC point based on only the point gid, SC shape, and resolution.

Parameters:
  • gid (int) – gid for supply curve point to analyze.

  • exclusion_shape (tuple) – Shape of the full exclusions extent (rows, cols).

  • resolution (int) – Number of exclusion points per SC point along an axis. This number**2 is the total number of exclusion points per SC point.

Methods

get_agg_slices(gid, shape, resolution)

Get the row, col slices of an aggregation gid.

Attributes

cols

Get the cols of the exclusions layer associated with this SC point.

gid

supply curve point gid

resolution

Get the supply curve grid aggregation resolution

rows

Get the rows of the exclusions layer associated with this SC point.

sc_point_gid

Supply curve point gid

property gid

supply curve point gid

property sc_point_gid

Supply curve point gid

Returns:

int

property resolution

Get the supply curve grid aggregation resolution

property rows

Get the rows of the exclusions layer associated with this SC point.

Returns:

rows (slice) – Row slice to index the high-res layer (exclusions layer) for the gid in the agg layer (supply curve layer).

property cols

Get the cols of the exclusions layer associated with this SC point.

Returns:

cols (slice) – Column slice to index the high-res layer (exclusions layer) for the gid in the agg layer (supply curve layer).

static get_agg_slices(gid, shape, resolution)[source]

Get the row, col slices of an aggregation gid.

Parameters:
  • gid (int) – Gid of interest in the aggregated layer.

  • shape (tuple) – (row, col) shape tuple of the underlying high-res layer.

  • resolution (int) – Resolution of the aggregation: number of pixels in 1D being aggregated.

Returns:

  • row_slice (slice) – Row slice to index the high-res layer for the gid in the agg layer.

  • col_slice (slice) – Col slice to index the high-res layer for the gid in the agg layer.