Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions src/schemas/ingestion/validationTask.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,25 @@ export const counterSchema = z.number().min(0).describe('A non-negative integer

export const thresholdCheckSchema = z.object({
exceeded: z.boolean().describe('Indicates if the threshold has been exceeded'),
count: counterSchema,
});

export const featuresErrorCountSchema = z.object({
geometryValidity: counterSchema.describe('Number of features with invalid geometry'),
vertices: counterSchema.describe('Number of features exceeding the maximum allowed vertices'),
metadata: counterSchema.describe('Number of features with invalid or missing metadata'),
resolution: counterSchema.describe('Number of features not matching the required resolution'),
smallHoles: counterSchema.describe('Number of features containing small holes'),
smallGeometries: counterSchema.describe('Number of features containing small geometries'),
});

export const thresholdsSchema = z.object({
smallHoles: thresholdCheckSchema.describe('Small holes threshold check result').extend({
count: counterSchema,
}),
smallGeometries: thresholdCheckSchema.describe('Small geometries threshold check result'),
});

export const validationAggregatedErrorsSchema = z.object({
errorsCount: featuresErrorCountSchema.describe('Aggregated count of validation errors'),
smallHoles: thresholdCheckSchema.describe('Small holes threshold check result'),
smallGeometries: thresholdCheckSchema.describe('Small geometries threshold check result'),
thresholds: thresholdsSchema.describe('Threshold check results'),
});
1 change: 0 additions & 1 deletion src/types/ingestion/report.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,5 @@ export interface PolygonPartValidationError {
}
export interface PolygonPartsChunkValidationResult {
parts: PolygonPartValidationError[];
smallGeometriesCount: number;
smallHolesCount: number;
}