index
Objects
BaseInput
@dataclass
class BaseInput()
Data class for base input
Attributes:
datestr, optional - subset the polygons based on a date. Can be generated fromjob_id,polygonsorprefix.prefixstr, optional - object prefix or path to a geometry object. Will only search for .shp. Mutually exclusive withjob_idandlayername.job_idstr, optional - the Job ID. Mutually exclusive withprefix.layernamestr, optional - name of the layer. Mutually exclusive withprefix.s3_payloadbool - switch to write the polygon payloads to s3 to use in a distributed Map State in AWS Step Functions. Defaults toTrue.workspacestr, optional - workspace name. Can increase search geometry object search capabilities. Included only whenjob_idandlayernameare set.
Functions
lambda_handler
@tracer.capture_lambda_handler
@logger.inject_lambda_context()
def lambda_handler(event: dict, context: dict) -> List[dict] | str
Function to split a geometry object over data events used for AWS
Step Functions to iterate over. Will generate an S3 payload. Unless
specifically told not to with setting s3_payload to false.
Arguments:
eventdict - should fit the BaseInputcontextdict - lambda context object
Raises:
FileNotFoundError- When no files are found inprefixor thoughjob_idandlayername.
Returns:
List[dict] | str- objects describing crs, an ID and WKT, or a s3 payload.
Examples:
{
"date": "2024-01-01",
"prefix": "object/path/to/the/polygons.shp",
"job_id": "2983hd872gd873-1337-9f824hf82g823h94jf",
"layername": "some-layer",
"s3_payload": true,
"workspace": "some-workspace",
}