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: 13 additions & 0 deletions src/constants/ingestion/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,16 @@ export const ShapefileExtensions = {
export type ShapefileExtensions = (typeof ShapefileExtensions)[keyof typeof ShapefileExtensions];

export const SHAPEFILE_EXTENSIONS_LIST = Object.values(ShapefileExtensions);

/* eslint-disable @typescript-eslint/naming-convention */
export const ValidationErrorType = {
GEOMETRY_VALIDITY: 'Geometry_Validity',
VERTICES: 'Vertices',
METADATA: 'Metadata',
SMALL_GEOMETRY: 'Small_Geometry',
SMALL_HOLES: 'Small_Holes',
RESOLUTION: 'Resolution',
} as const;
/* eslint-enable @typescript-eslint/naming-convention */

export type ValidationErrorType = (typeof ValidationErrorType)[keyof typeof ValidationErrorType];
1 change: 1 addition & 0 deletions src/schemas/ingestion/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ export * from './job.schema';
export * from './task.schema';
export * from './layerNameFormats.schema';
export * from './callback.schema';
export * from './validationTask.schema';
9 changes: 8 additions & 1 deletion src/types/ingestion/report.type.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import { ValidationErrorType } from '../../constants';

export type PolygonPartValidationErrorsType = Pick<
typeof ValidationErrorType,
'RESOLUTION' | 'GEOMETRY_VALIDITY' | 'SMALL_GEOMETRY' | 'SMALL_HOLES'
>[keyof Pick<typeof ValidationErrorType, 'GEOMETRY_VALIDITY' | 'RESOLUTION' | 'SMALL_GEOMETRY' | 'SMALL_HOLES'>];

export interface PolygonPartValidationError {
id: string;
errors: string[];
errors: PolygonPartValidationErrorsType[];
}
export interface PolygonPartsChunkValidationResult {
parts: PolygonPartValidationError[];
Expand Down