@seasketch/geoprocessing
Version:
Geoprocessing and reporting framework for SeaSketch 2.0
197 lines (196 loc) • 7.03 kB
TypeScript
import { z } from "zod";
export type { FeatureCollection, Feature, Geometry, GeoJsonProperties, GeometryCollection, BBox, Point, LineString, MultiLineString, Polygon, MultiPolygon, Position, } from "geojson";
export declare const box2dSchema: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
export declare const box3dSchema: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
export declare const bboxSchema: z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>]>;
export declare const polygonSchema: z.ZodObject<{
type: z.ZodLiteral<"Polygon">;
coordinates: z.ZodArray<z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">, "many">;
}, "strip", z.ZodTypeAny, {
type: "Polygon";
coordinates: number[][][];
}, {
type: "Polygon";
coordinates: number[][][];
}>;
export declare const multipolygonSchema: z.ZodObject<{
type: z.ZodLiteral<"MultiPolygon">;
coordinates: z.ZodArray<z.ZodArray<z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">, "many">, "many">;
}, "strip", z.ZodTypeAny, {
type: "MultiPolygon";
coordinates: number[][][][];
}, {
type: "MultiPolygon";
coordinates: number[][][][];
}>;
/** Zod schema for Feature containing Polygon or MultiPolygon */
export declare const featureSchema: z.ZodObject<{
type: z.ZodLiteral<"Feature">;
geometry: z.ZodUnion<[z.ZodObject<{
type: z.ZodLiteral<"Polygon">;
coordinates: z.ZodArray<z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">, "many">;
}, "strip", z.ZodTypeAny, {
type: "Polygon";
coordinates: number[][][];
}, {
type: "Polygon";
coordinates: number[][][];
}>, z.ZodObject<{
type: z.ZodLiteral<"MultiPolygon">;
coordinates: z.ZodArray<z.ZodArray<z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">, "many">, "many">;
}, "strip", z.ZodTypeAny, {
type: "MultiPolygon";
coordinates: number[][][][];
}, {
type: "MultiPolygon";
coordinates: number[][][][];
}>]>;
id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
properties: z.ZodNullable<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodNull]>>;
}, "strip", z.ZodTypeAny, {
type: "Feature";
geometry: {
type: "Polygon";
coordinates: number[][][];
} | {
type: "MultiPolygon";
coordinates: number[][][][];
};
properties: Record<string, any> | null;
id?: string | number | undefined;
}, {
type: "Feature";
geometry: {
type: "Polygon";
coordinates: number[][][];
} | {
type: "MultiPolygon";
coordinates: number[][][][];
};
properties: Record<string, any> | null;
id?: string | number | undefined;
}>;
export declare const featuresSchema: z.ZodArray<z.ZodObject<{
type: z.ZodLiteral<"Feature">;
geometry: z.ZodUnion<[z.ZodObject<{
type: z.ZodLiteral<"Polygon">;
coordinates: z.ZodArray<z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">, "many">;
}, "strip", z.ZodTypeAny, {
type: "Polygon";
coordinates: number[][][];
}, {
type: "Polygon";
coordinates: number[][][];
}>, z.ZodObject<{
type: z.ZodLiteral<"MultiPolygon">;
coordinates: z.ZodArray<z.ZodArray<z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">, "many">, "many">;
}, "strip", z.ZodTypeAny, {
type: "MultiPolygon";
coordinates: number[][][][];
}, {
type: "MultiPolygon";
coordinates: number[][][][];
}>]>;
id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
properties: z.ZodNullable<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodNull]>>;
}, "strip", z.ZodTypeAny, {
type: "Feature";
geometry: {
type: "Polygon";
coordinates: number[][][];
} | {
type: "MultiPolygon";
coordinates: number[][][][];
};
properties: Record<string, any> | null;
id?: string | number | undefined;
}, {
type: "Feature";
geometry: {
type: "Polygon";
coordinates: number[][][];
} | {
type: "MultiPolygon";
coordinates: number[][][][];
};
properties: Record<string, any> | null;
id?: string | number | undefined;
}>, "many">;
/** Zod schema for FeatureCollection containing polygons or multipolygons */
export declare const fcSchema: z.ZodObject<{
type: z.ZodLiteral<"FeatureCollection">;
features: z.ZodArray<z.ZodObject<{
type: z.ZodLiteral<"Feature">;
geometry: z.ZodUnion<[z.ZodObject<{
type: z.ZodLiteral<"Polygon">;
coordinates: z.ZodArray<z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">, "many">;
}, "strip", z.ZodTypeAny, {
type: "Polygon";
coordinates: number[][][];
}, {
type: "Polygon";
coordinates: number[][][];
}>, z.ZodObject<{
type: z.ZodLiteral<"MultiPolygon">;
coordinates: z.ZodArray<z.ZodArray<z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">, "many">, "many">;
}, "strip", z.ZodTypeAny, {
type: "MultiPolygon";
coordinates: number[][][][];
}, {
type: "MultiPolygon";
coordinates: number[][][][];
}>]>;
id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
properties: z.ZodNullable<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodNull]>>;
}, "strip", z.ZodTypeAny, {
type: "Feature";
geometry: {
type: "Polygon";
coordinates: number[][][];
} | {
type: "MultiPolygon";
coordinates: number[][][][];
};
properties: Record<string, any> | null;
id?: string | number | undefined;
}, {
type: "Feature";
geometry: {
type: "Polygon";
coordinates: number[][][];
} | {
type: "MultiPolygon";
coordinates: number[][][][];
};
properties: Record<string, any> | null;
id?: string | number | undefined;
}>, "many">;
}, "strip", z.ZodTypeAny, {
type: "FeatureCollection";
features: {
type: "Feature";
geometry: {
type: "Polygon";
coordinates: number[][][];
} | {
type: "MultiPolygon";
coordinates: number[][][][];
};
properties: Record<string, any> | null;
id?: string | number | undefined;
}[];
}, {
type: "FeatureCollection";
features: {
type: "Feature";
geometry: {
type: "Polygon";
coordinates: number[][][];
} | {
type: "MultiPolygon";
coordinates: number[][][][];
};
properties: Record<string, any> | null;
id?: string | number | undefined;
}[];
}>;