@allmaps/annotation
Version:
Functions for generating and parsing IIIF georeference annotations
1,282 lines (1,281 loc) • 49.5 kB
TypeScript
import { z } from 'zod';
import { GeoreferencedMapSchema as GeoreferencedMap1Schema, GeoreferencedMapsSchema as GeoreferencedMaps1Schema, GCPSchema as GeoreferencedMap1GCPSchema, ImageSchema as GeoreferencedMap1ImageSchema } from './georeferenced-map/georeferenced-map.1.js';
import { GeoreferencedMapSchema as GeoreferencedMap2Schema, GeoreferencedMapsSchema as GeoreferencedMaps2Schema, GCPSchema as GeoreferencedMap2GCPSchema, ResourceSchema as GeoreferencedMap2ResourceSchema } from './georeferenced-map/georeferenced-map.2.js';
import { PartOfSchema, ResourceMaskSchema, TransformationSchema } from './shared.js';
declare const DefaultGeoreferencedMapSchema: z.ZodObject<{
'@context': z.ZodOptional<z.ZodLiteral<"https://schemas.allmaps.org/map/2/context.json">>;
type: z.ZodLiteral<"GeoreferencedMap">;
id: z.ZodOptional<z.ZodString>;
created: z.ZodOptional<z.ZodString>;
modified: z.ZodOptional<z.ZodString>;
resource: z.ZodObject<{
id: z.ZodString;
height: z.ZodOptional<z.ZodNumber>;
width: z.ZodOptional<z.ZodNumber>;
type: z.ZodEnum<["ImageService1", "ImageService2", "ImageService3", "Canvas"]>;
partOf: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodArray<z.ZodType<{
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
}, z.ZodTypeDef, {
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
}>, "many">, z.ZodType<{
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
}, z.ZodTypeDef, {
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
}>]>, ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
})[] | undefined, ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
}) | ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
})[]>>;
}, "strip", z.ZodTypeAny, {
id: string;
type: "ImageService1" | "ImageService2" | "ImageService3" | "Canvas";
height?: number | undefined;
width?: number | undefined;
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
})[] | undefined;
}, {
id: string;
type: "ImageService1" | "ImageService2" | "ImageService3" | "Canvas";
height?: number | undefined;
width?: number | undefined;
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
}) | ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
})[] | undefined;
}>;
gcps: z.ZodArray<z.ZodObject<{
resource: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
geo: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
}, "strip", z.ZodTypeAny, {
resource: [number, number];
geo: [number, number];
}, {
resource: [number, number];
geo: [number, number];
}>, "many">;
resourceMask: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">;
transformation: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodObject<{
type: z.ZodEnum<["helmert", "polynomial", "thinPlateSpline", "projective", "straight", "linear"]>;
options: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
}, "strip", z.ZodTypeAny, {
type: "helmert" | "polynomial" | "thinPlateSpline" | "projective" | "straight" | "linear";
options?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
}, {
type: "helmert" | "polynomial" | "thinPlateSpline" | "projective" | "straight" | "linear";
options?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
}>, z.ZodUnknown]>, {
type: "helmert" | "polynomial" | "thinPlateSpline" | "projective" | "straight" | "linear";
options?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
} | undefined, unknown>>;
resourceCrs: z.ZodOptional<z.ZodObject<{
id: z.ZodOptional<z.ZodString>;
name: z.ZodOptional<z.ZodString>;
definition: z.ZodUnion<[z.ZodString, z.ZodUnknown]>;
}, "strip", z.ZodTypeAny, {
id?: string | undefined;
name?: string | undefined;
definition?: unknown;
}, {
id?: string | undefined;
name?: string | undefined;
definition?: unknown;
}>>;
}, "strip", z.ZodTypeAny, {
type: "GeoreferencedMap";
resource: {
id: string;
type: "ImageService1" | "ImageService2" | "ImageService3" | "Canvas";
height?: number | undefined;
width?: number | undefined;
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
})[] | undefined;
};
gcps: {
resource: [number, number];
geo: [number, number];
}[];
resourceMask: [number, number][];
id?: string | undefined;
'@context'?: "https://schemas.allmaps.org/map/2/context.json" | undefined;
transformation?: {
type: "helmert" | "polynomial" | "thinPlateSpline" | "projective" | "straight" | "linear";
options?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
} | undefined;
created?: string | undefined;
modified?: string | undefined;
resourceCrs?: {
id?: string | undefined;
name?: string | undefined;
definition?: unknown;
} | undefined;
}, {
type: "GeoreferencedMap";
resource: {
id: string;
type: "ImageService1" | "ImageService2" | "ImageService3" | "Canvas";
height?: number | undefined;
width?: number | undefined;
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
}) | ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
})[] | undefined;
};
gcps: {
resource: [number, number];
geo: [number, number];
}[];
resourceMask: [number, number][];
id?: string | undefined;
'@context'?: "https://schemas.allmaps.org/map/2/context.json" | undefined;
transformation?: unknown;
created?: string | undefined;
modified?: string | undefined;
resourceCrs?: {
id?: string | undefined;
name?: string | undefined;
definition?: unknown;
} | undefined;
}>;
declare const DefaultGeoreferencedMapsSchema: z.ZodArray<z.ZodObject<{
'@context': z.ZodOptional<z.ZodLiteral<"https://schemas.allmaps.org/map/2/context.json">>;
type: z.ZodLiteral<"GeoreferencedMap">;
id: z.ZodOptional<z.ZodString>;
created: z.ZodOptional<z.ZodString>;
modified: z.ZodOptional<z.ZodString>;
resource: z.ZodObject<{
id: z.ZodString;
height: z.ZodOptional<z.ZodNumber>;
width: z.ZodOptional<z.ZodNumber>;
type: z.ZodEnum<["ImageService1", "ImageService2", "ImageService3", "Canvas"]>;
partOf: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodArray<z.ZodType<{
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
}, z.ZodTypeDef, {
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
}>, "many">, z.ZodType<{
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
}, z.ZodTypeDef, {
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
}>]>, ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
})[] | undefined, ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
}) | ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
})[]>>;
}, "strip", z.ZodTypeAny, {
id: string;
type: "ImageService1" | "ImageService2" | "ImageService3" | "Canvas";
height?: number | undefined;
width?: number | undefined;
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
})[] | undefined;
}, {
id: string;
type: "ImageService1" | "ImageService2" | "ImageService3" | "Canvas";
height?: number | undefined;
width?: number | undefined;
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
}) | ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
})[] | undefined;
}>;
gcps: z.ZodArray<z.ZodObject<{
resource: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
geo: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
}, "strip", z.ZodTypeAny, {
resource: [number, number];
geo: [number, number];
}, {
resource: [number, number];
geo: [number, number];
}>, "many">;
resourceMask: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">;
transformation: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodObject<{
type: z.ZodEnum<["helmert", "polynomial", "thinPlateSpline", "projective", "straight", "linear"]>;
options: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
}, "strip", z.ZodTypeAny, {
type: "helmert" | "polynomial" | "thinPlateSpline" | "projective" | "straight" | "linear";
options?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
}, {
type: "helmert" | "polynomial" | "thinPlateSpline" | "projective" | "straight" | "linear";
options?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
}>, z.ZodUnknown]>, {
type: "helmert" | "polynomial" | "thinPlateSpline" | "projective" | "straight" | "linear";
options?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
} | undefined, unknown>>;
resourceCrs: z.ZodOptional<z.ZodObject<{
id: z.ZodOptional<z.ZodString>;
name: z.ZodOptional<z.ZodString>;
definition: z.ZodUnion<[z.ZodString, z.ZodUnknown]>;
}, "strip", z.ZodTypeAny, {
id?: string | undefined;
name?: string | undefined;
definition?: unknown;
}, {
id?: string | undefined;
name?: string | undefined;
definition?: unknown;
}>>;
}, "strip", z.ZodTypeAny, {
type: "GeoreferencedMap";
resource: {
id: string;
type: "ImageService1" | "ImageService2" | "ImageService3" | "Canvas";
height?: number | undefined;
width?: number | undefined;
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
})[] | undefined;
};
gcps: {
resource: [number, number];
geo: [number, number];
}[];
resourceMask: [number, number][];
id?: string | undefined;
'@context'?: "https://schemas.allmaps.org/map/2/context.json" | undefined;
transformation?: {
type: "helmert" | "polynomial" | "thinPlateSpline" | "projective" | "straight" | "linear";
options?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
} | undefined;
created?: string | undefined;
modified?: string | undefined;
resourceCrs?: {
id?: string | undefined;
name?: string | undefined;
definition?: unknown;
} | undefined;
}, {
type: "GeoreferencedMap";
resource: {
id: string;
type: "ImageService1" | "ImageService2" | "ImageService3" | "Canvas";
height?: number | undefined;
width?: number | undefined;
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
}) | ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
})[] | undefined;
};
gcps: {
resource: [number, number];
geo: [number, number];
}[];
resourceMask: [number, number][];
id?: string | undefined;
'@context'?: "https://schemas.allmaps.org/map/2/context.json" | undefined;
transformation?: unknown;
created?: string | undefined;
modified?: string | undefined;
resourceCrs?: {
id?: string | undefined;
name?: string | undefined;
definition?: unknown;
} | undefined;
}>, "many">;
declare const DefaultGCPSchema: z.ZodObject<{
resource: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
geo: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
}, "strip", z.ZodTypeAny, {
resource: [number, number];
geo: [number, number];
}, {
resource: [number, number];
geo: [number, number];
}>;
declare const DefaultResourceSchema: z.ZodObject<{
id: z.ZodString;
height: z.ZodOptional<z.ZodNumber>;
width: z.ZodOptional<z.ZodNumber>;
type: z.ZodEnum<["ImageService1", "ImageService2", "ImageService3", "Canvas"]>;
partOf: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodArray<z.ZodType<{
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
}, z.ZodTypeDef, {
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
}>, "many">, z.ZodType<{
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
}, z.ZodTypeDef, {
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
}>]>, ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
})[] | undefined, ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
}) | ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
})[]>>;
}, "strip", z.ZodTypeAny, {
id: string;
type: "ImageService1" | "ImageService2" | "ImageService3" | "Canvas";
height?: number | undefined;
width?: number | undefined;
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
})[] | undefined;
}, {
id: string;
type: "ImageService1" | "ImageService2" | "ImageService3" | "Canvas";
height?: number | undefined;
width?: number | undefined;
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
}) | ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
})[] | undefined;
}>;
declare const GeoreferencedMapAllVersionsSchema: z.ZodUnion<[z.ZodObject<{
id: z.ZodOptional<z.ZodString>;
version: z.ZodDefault<z.ZodNumber>;
image: z.ZodObject<{
uri: z.ZodString;
width: z.ZodNumber;
height: z.ZodNumber;
type: z.ZodEnum<["ImageService1", "ImageService2", "ImageService3"]>;
}, "strip", z.ZodTypeAny, {
type: "ImageService1" | "ImageService2" | "ImageService3";
height: number;
width: number;
uri: string;
}, {
type: "ImageService1" | "ImageService2" | "ImageService3";
height: number;
width: number;
uri: string;
}>;
gcps: z.ZodArray<z.ZodObject<{
image: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
world: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
}, "strip", z.ZodTypeAny, {
image: [number, number];
world: [number, number];
}, {
image: [number, number];
world: [number, number];
}>, "many">;
pixelMask: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">;
transformation: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodObject<{
type: z.ZodEnum<["helmert", "polynomial", "thinPlateSpline", "projective", "straight", "linear"]>;
options: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
}, "strip", z.ZodTypeAny, {
type: "helmert" | "polynomial" | "thinPlateSpline" | "projective" | "straight" | "linear";
options?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
}, {
type: "helmert" | "polynomial" | "thinPlateSpline" | "projective" | "straight" | "linear";
options?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
}>, z.ZodUnknown]>, {
type: "helmert" | "polynomial" | "thinPlateSpline" | "projective" | "straight" | "linear";
options?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
} | undefined, unknown>>;
}, "strip", z.ZodTypeAny, {
gcps: {
image: [number, number];
world: [number, number];
}[];
version: number;
image: {
type: "ImageService1" | "ImageService2" | "ImageService3";
height: number;
width: number;
uri: string;
};
pixelMask: [number, number][];
id?: string | undefined;
transformation?: {
type: "helmert" | "polynomial" | "thinPlateSpline" | "projective" | "straight" | "linear";
options?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
} | undefined;
}, {
gcps: {
image: [number, number];
world: [number, number];
}[];
image: {
type: "ImageService1" | "ImageService2" | "ImageService3";
height: number;
width: number;
uri: string;
};
pixelMask: [number, number][];
id?: string | undefined;
transformation?: unknown;
version?: number | undefined;
}>, z.ZodObject<{
'@context': z.ZodOptional<z.ZodLiteral<"https://schemas.allmaps.org/map/2/context.json">>;
type: z.ZodLiteral<"GeoreferencedMap">;
id: z.ZodOptional<z.ZodString>;
created: z.ZodOptional<z.ZodString>;
modified: z.ZodOptional<z.ZodString>;
resource: z.ZodObject<{
id: z.ZodString;
height: z.ZodOptional<z.ZodNumber>;
width: z.ZodOptional<z.ZodNumber>;
type: z.ZodEnum<["ImageService1", "ImageService2", "ImageService3", "Canvas"]>;
partOf: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodArray<z.ZodType<{
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
}, z.ZodTypeDef, {
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
}>, "many">, z.ZodType<{
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
}, z.ZodTypeDef, {
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
}>]>, ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
})[] | undefined, ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
}) | ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
})[]>>;
}, "strip", z.ZodTypeAny, {
id: string;
type: "ImageService1" | "ImageService2" | "ImageService3" | "Canvas";
height?: number | undefined;
width?: number | undefined;
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
})[] | undefined;
}, {
id: string;
type: "ImageService1" | "ImageService2" | "ImageService3" | "Canvas";
height?: number | undefined;
width?: number | undefined;
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
}) | ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
})[] | undefined;
}>;
gcps: z.ZodArray<z.ZodObject<{
resource: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
geo: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
}, "strip", z.ZodTypeAny, {
resource: [number, number];
geo: [number, number];
}, {
resource: [number, number];
geo: [number, number];
}>, "many">;
resourceMask: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">;
transformation: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodObject<{
type: z.ZodEnum<["helmert", "polynomial", "thinPlateSpline", "projective", "straight", "linear"]>;
options: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
}, "strip", z.ZodTypeAny, {
type: "helmert" | "polynomial" | "thinPlateSpline" | "projective" | "straight" | "linear";
options?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
}, {
type: "helmert" | "polynomial" | "thinPlateSpline" | "projective" | "straight" | "linear";
options?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
}>, z.ZodUnknown]>, {
type: "helmert" | "polynomial" | "thinPlateSpline" | "projective" | "straight" | "linear";
options?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
} | undefined, unknown>>;
resourceCrs: z.ZodOptional<z.ZodObject<{
id: z.ZodOptional<z.ZodString>;
name: z.ZodOptional<z.ZodString>;
definition: z.ZodUnion<[z.ZodString, z.ZodUnknown]>;
}, "strip", z.ZodTypeAny, {
id?: string | undefined;
name?: string | undefined;
definition?: unknown;
}, {
id?: string | undefined;
name?: string | undefined;
definition?: unknown;
}>>;
}, "strip", z.ZodTypeAny, {
type: "GeoreferencedMap";
resource: {
id: string;
type: "ImageService1" | "ImageService2" | "ImageService3" | "Canvas";
height?: number | undefined;
width?: number | undefined;
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
})[] | undefined;
};
gcps: {
resource: [number, number];
geo: [number, number];
}[];
resourceMask: [number, number][];
id?: string | undefined;
'@context'?: "https://schemas.allmaps.org/map/2/context.json" | undefined;
transformation?: {
type: "helmert" | "polynomial" | "thinPlateSpline" | "projective" | "straight" | "linear";
options?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
} | undefined;
created?: string | undefined;
modified?: string | undefined;
resourceCrs?: {
id?: string | undefined;
name?: string | undefined;
definition?: unknown;
} | undefined;
}, {
type: "GeoreferencedMap";
resource: {
id: string;
type: "ImageService1" | "ImageService2" | "ImageService3" | "Canvas";
height?: number | undefined;
width?: number | undefined;
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
}) | ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
})[] | undefined;
};
gcps: {
resource: [number, number];
geo: [number, number];
}[];
resourceMask: [number, number][];
id?: string | undefined;
'@context'?: "https://schemas.allmaps.org/map/2/context.json" | undefined;
transformation?: unknown;
created?: string | undefined;
modified?: string | undefined;
resourceCrs?: {
id?: string | undefined;
name?: string | undefined;
definition?: unknown;
} | undefined;
}>]>;
declare const GeoreferencedMapsAllVersionsSchema: z.ZodUnion<[z.ZodArray<z.ZodObject<{
id: z.ZodOptional<z.ZodString>;
version: z.ZodDefault<z.ZodNumber>;
image: z.ZodObject<{
uri: z.ZodString;
width: z.ZodNumber;
height: z.ZodNumber;
type: z.ZodEnum<["ImageService1", "ImageService2", "ImageService3"]>;
}, "strip", z.ZodTypeAny, {
type: "ImageService1" | "ImageService2" | "ImageService3";
height: number;
width: number;
uri: string;
}, {
type: "ImageService1" | "ImageService2" | "ImageService3";
height: number;
width: number;
uri: string;
}>;
gcps: z.ZodArray<z.ZodObject<{
image: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
world: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
}, "strip", z.ZodTypeAny, {
image: [number, number];
world: [number, number];
}, {
image: [number, number];
world: [number, number];
}>, "many">;
pixelMask: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">;
transformation: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodObject<{
type: z.ZodEnum<["helmert", "polynomial", "thinPlateSpline", "projective", "straight", "linear"]>;
options: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
}, "strip", z.ZodTypeAny, {
type: "helmert" | "polynomial" | "thinPlateSpline" | "projective" | "straight" | "linear";
options?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
}, {
type: "helmert" | "polynomial" | "thinPlateSpline" | "projective" | "straight" | "linear";
options?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
}>, z.ZodUnknown]>, {
type: "helmert" | "polynomial" | "thinPlateSpline" | "projective" | "straight" | "linear";
options?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
} | undefined, unknown>>;
}, "strip", z.ZodTypeAny, {
gcps: {
image: [number, number];
world: [number, number];
}[];
version: number;
image: {
type: "ImageService1" | "ImageService2" | "ImageService3";
height: number;
width: number;
uri: string;
};
pixelMask: [number, number][];
id?: string | undefined;
transformation?: {
type: "helmert" | "polynomial" | "thinPlateSpline" | "projective" | "straight" | "linear";
options?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
} | undefined;
}, {
gcps: {
image: [number, number];
world: [number, number];
}[];
image: {
type: "ImageService1" | "ImageService2" | "ImageService3";
height: number;
width: number;
uri: string;
};
pixelMask: [number, number][];
id?: string | undefined;
transformation?: unknown;
version?: number | undefined;
}>, "many">, z.ZodArray<z.ZodObject<{
'@context': z.ZodOptional<z.ZodLiteral<"https://schemas.allmaps.org/map/2/context.json">>;
type: z.ZodLiteral<"GeoreferencedMap">;
id: z.ZodOptional<z.ZodString>;
created: z.ZodOptional<z.ZodString>;
modified: z.ZodOptional<z.ZodString>;
resource: z.ZodObject<{
id: z.ZodString;
height: z.ZodOptional<z.ZodNumber>;
width: z.ZodOptional<z.ZodNumber>;
type: z.ZodEnum<["ImageService1", "ImageService2", "ImageService3", "Canvas"]>;
partOf: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodArray<z.ZodType<{
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
}, z.ZodTypeDef, {
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
}>, "many">, z.ZodType<{
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
}, z.ZodTypeDef, {
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
}>]>, ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
})[] | undefined, ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
}) | ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
})[]>>;
}, "strip", z.ZodTypeAny, {
id: string;
type: "ImageService1" | "ImageService2" | "ImageService3" | "Canvas";
height?: number | undefined;
width?: number | undefined;
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
})[] | undefined;
}, {
id: string;
type: "ImageService1" | "ImageService2" | "ImageService3" | "Canvas";
height?: number | undefined;
width?: number | undefined;
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
}) | ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
})[] | undefined;
}>;
gcps: z.ZodArray<z.ZodObject<{
resource: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
geo: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
}, "strip", z.ZodTypeAny, {
resource: [number, number];
geo: [number, number];
}, {
resource: [number, number];
geo: [number, number];
}>, "many">;
resourceMask: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">;
transformation: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodObject<{
type: z.ZodEnum<["helmert", "polynomial", "thinPlateSpline", "projective", "straight", "linear"]>;
options: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
}, "strip", z.ZodTypeAny, {
type: "helmert" | "polynomial" | "thinPlateSpline" | "projective" | "straight" | "linear";
options?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
}, {
type: "helmert" | "polynomial" | "thinPlateSpline" | "projective" | "straight" | "linear";
options?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
}>, z.ZodUnknown]>, {
type: "helmert" | "polynomial" | "thinPlateSpline" | "projective" | "straight" | "linear";
options?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
} | undefined, unknown>>;
resourceCrs: z.ZodOptional<z.ZodObject<{
id: z.ZodOptional<z.ZodString>;
name: z.ZodOptional<z.ZodString>;
definition: z.ZodUnion<[z.ZodString, z.ZodUnknown]>;
}, "strip", z.ZodTypeAny, {
id?: string | undefined;
name?: string | undefined;
definition?: unknown;
}, {
id?: string | undefined;
name?: string | undefined;
definition?: unknown;
}>>;
}, "strip", z.ZodTypeAny, {
type: "GeoreferencedMap";
resource: {
id: string;
type: "ImageService1" | "ImageService2" | "ImageService3" | "Canvas";
height?: number | undefined;
width?: number | undefined;
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
})[] | undefined;
};
gcps: {
resource: [number, number];
geo: [number, number];
}[];
resourceMask: [number, number][];
id?: string | undefined;
'@context'?: "https://schemas.allmaps.org/map/2/context.json" | undefined;
transformation?: {
type: "helmert" | "polynomial" | "thinPlateSpline" | "projective" | "straight" | "linear";
options?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
} | undefined;
created?: string | undefined;
modified?: string | undefined;
resourceCrs?: {
id?: string | undefined;
name?: string | undefined;
definition?: unknown;
} | undefined;
}, {
type: "GeoreferencedMap";
resource: {
id: string;
type: "ImageService1" | "ImageService2" | "ImageService3" | "Canvas";
height?: number | undefined;
width?: number | undefined;
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
}) | ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & {
partOf?: ({
id: string;
type: string;
label?: Record<string, (string | number | boolean)[]> | undefined;
} & /*elided*/ any)[];
})[] | undefined;
};
gcps: {
resource: [number, number];
geo: [number, number];
}[];
resourceMask: [number, number][];
id?: string | undefined;
'@context'?: "https://schemas.allmaps.org/map/2/context.json" | undefined;
transformation?: unknown;
created?: string | undefined;
modified?: string | undefined;
resourceCrs?: {
id?: string | undefined;
name?: string | undefined;
definition?: unknown;
} | undefined;
}>, "many">]>;
declare const GCPAllVersionsSchema: z.ZodUnion<[z.ZodObject<{
image: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
world: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
}, "strip", z.ZodTypeAny, {
image: [number, number];
world: [number, number];
}, {
image: [number, number];
world: [number, number];
}>, z.ZodObject<{
resource: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
geo: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
}, "strip", z.ZodTypeAny, {
resource: [number, number];
geo: [number, number];
}, {
resource: [number, number];
geo: [number, number];
}>]>;
export { GeoreferencedMap1Schema, GeoreferencedMaps1Schema, GeoreferencedMap1GCPSchema, GeoreferencedMap1ImageSchema, GeoreferencedMap2Schema, GeoreferencedMaps2Schema, GeoreferencedMap2GCPSchema, GeoreferencedMap2ResourceSchema, DefaultGeoreferencedMapSchema as GeoreferencedMapSchema, DefaultGeoreferencedMapsSchema as GeoreferencedMapsSchema, DefaultGCPSchema as GCPSchema, DefaultResourceSchema as ResourceSchema, GeoreferencedMapAllVersionsSchema, GeoreferencedMapsAllVersionsSchema, GCPAllVersionsSchema, PartOfSchema, ResourceMaskSchema, TransformationSchema };