Implement the spatial filter for the endpoint which accesses many tax lots. This extension filters the tax lots based on a geometry passed through the query parameters. The endpoint will accept the geometry type, coordinates, and a buffer. It will the tax lots which intersect the geometry
Acceptance criteria
generate kubb types and schemas
[x] npm run generate
update tax lot controller
[x] ensure the update zod schema rejects query parameters that do not meet the documented formats
update the tax lot service
[x] validate that if one of the spatial query parameters are invoked, then all of the required spatial parameters are present
[x] parse the lats and lons into proper JS arrays
[x] ensure the lats and lons arrays are of equal length
[x] ensure the lengths of the lats and lons arrays are within the bounds for their geometry type
[x] construct a geojson object from the query parameters
[x] for linestrings and polygons, leverage a repository call to ensure the shape is valid
[x] if validation fails at any stage, throw a validation error
[x] leverage the repository to find a list of tax lots that meet the spatial filter credentials
update the tax lot service
[x] create a method that will validate the geometry
[x] create a method that will find the tax lots that intersect the geometry and its buffer.
[x] the spatial filter method must sort by distance to the geometry. For polygons, use the center of the maximum inscribed circle of the geometry
update the exception filtering
[x] Update the Client Request filter to throw a 400 for any geometry validation errors
Description
As part of discussion #97
Implement the spatial filter for the endpoint which accesses many tax lots. This extension filters the tax lots based on a geometry passed through the query parameters. The endpoint will accept the geometry type, coordinates, and a buffer. It will the tax lots which intersect the geometry
Acceptance criteria
npm run generate