-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.d.ts
39 lines (35 loc) · 1000 Bytes
/
types.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
type propertiesTypes = Record<string, number | string>;
export type polygonCollectionTypes = {
type: "Polygon";
properties?: propertiesTypes;
coordinates: number[][];
};
export type pointCollectionTypes = {
type: "Point";
properties?: propertiesTypes;
coordinates: number[][];
};
export type featureCollectionPointTypes = {
geometry: pointCollectionTypes;
};
export type featureCollectionPolygonTypes = {
geometry: polygonCollectionTypes;
};
export type geoJSONGeometriesCollectionTypes = {
type: "GeometryCollection";
geometries: (polygonCollectionTypes | pointCollectionTypes)[];
};
export type geoJSONFeatureCollectionTypes = {
type: "FeatureCollection";
features: {
type: "Feature";
properties?: propertiesTypes;
id: number | string;
geometry:
| featureCollectionPointTypes["geometry"]
| featureCollectionPolygonTypes["geometry"];
}[];
};
export type geoJsonTypes =
| geoJSONGeometriesCollectionTypes
| geoJSONFeatureCollectionTypes;