@ignfab/geocontext 0.9.2 → 0.9.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -28
- package/dist/gpf/adminexpress.js +7 -27
- package/dist/gpf/adminexpress.js.map +1 -1
- package/dist/gpf/parcellaire-express.js +13 -33
- package/dist/gpf/parcellaire-express.js.map +1 -1
- package/dist/gpf/urbanisme.d.ts +4 -2
- package/dist/gpf/urbanisme.js +20 -61
- package/dist/gpf/urbanisme.js.map +1 -1
- package/dist/gpf/wfs.d.ts +2 -2
- package/dist/gpf/wfs.js +17 -71
- package/dist/gpf/wfs.js.map +1 -1
- package/dist/helpers/distance.d.ts +4 -2
- package/dist/helpers/distance.js +20 -5
- package/dist/helpers/distance.js.map +1 -1
- package/dist/helpers/http.d.ts +4 -0
- package/dist/helpers/http.js +103 -1
- package/dist/helpers/http.js.map +1 -1
- package/dist/helpers/jsonSchema.d.ts +3 -0
- package/dist/helpers/jsonSchema.js +8 -0
- package/dist/helpers/jsonSchema.js.map +1 -0
- package/dist/helpers/schemas.d.ts +13 -0
- package/dist/helpers/schemas.js +18 -0
- package/dist/helpers/schemas.js.map +1 -0
- package/dist/helpers/toolAnnotations.d.ts +6 -0
- package/dist/helpers/toolAnnotations.js.map +1 -0
- package/dist/helpers/wfs.d.ts +27 -0
- package/dist/helpers/wfs.js +55 -0
- package/dist/helpers/wfs.js.map +1 -0
- package/dist/helpers/wfs_internal/compile.d.ts +46 -0
- package/dist/helpers/wfs_internal/compile.js +595 -0
- package/dist/helpers/wfs_internal/compile.js.map +1 -0
- package/dist/helpers/wfs_internal/request.d.ts +38 -0
- package/dist/helpers/wfs_internal/request.js +92 -0
- package/dist/helpers/wfs_internal/request.js.map +1 -0
- package/dist/helpers/wfs_internal/response.d.ts +21 -0
- package/dist/helpers/wfs_internal/response.js +29 -0
- package/dist/helpers/wfs_internal/response.js.map +1 -0
- package/dist/helpers/wfs_internal/schema.d.ts +167 -0
- package/dist/helpers/wfs_internal/schema.js +81 -0
- package/dist/helpers/wfs_internal/schema.js.map +1 -0
- package/dist/index.js +47 -25
- package/dist/index.js.map +1 -1
- package/dist/tools/AdminexpressTool.d.ts +56 -6
- package/dist/tools/AdminexpressTool.js +12 -15
- package/dist/tools/AdminexpressTool.js.map +1 -1
- package/dist/tools/AltitudeTool.d.ts +6 -6
- package/dist/tools/AltitudeTool.js +5 -14
- package/dist/tools/AltitudeTool.js.map +1 -1
- package/dist/tools/AssietteSupTool.d.ts +59 -7
- package/dist/tools/AssietteSupTool.js +13 -16
- package/dist/tools/AssietteSupTool.js.map +1 -1
- package/dist/tools/CadastreTool.d.ts +56 -6
- package/dist/tools/CadastreTool.js +14 -16
- package/dist/tools/CadastreTool.js.map +1 -1
- package/dist/tools/GeocodeTool.d.ts +6 -6
- package/dist/tools/GeocodeTool.js +7 -5
- package/dist/tools/GeocodeTool.js.map +1 -1
- package/dist/tools/GpfWfsDescribeTypeTool.d.ts +20 -20
- package/dist/tools/GpfWfsDescribeTypeTool.js +5 -4
- package/dist/tools/GpfWfsDescribeTypeTool.js.map +1 -1
- package/dist/tools/GpfWfsGetFeaturesTool.d.ts +174 -48
- package/dist/tools/GpfWfsGetFeaturesTool.js +162 -115
- package/dist/tools/GpfWfsGetFeaturesTool.js.map +1 -1
- package/dist/tools/GpfWfsSearchTypesTool.d.ts +12 -6
- package/dist/tools/GpfWfsSearchTypesTool.js +13 -10
- package/dist/tools/GpfWfsSearchTypesTool.js.map +1 -1
- package/dist/tools/UrbanismeTool.d.ts +57 -7
- package/dist/tools/UrbanismeTool.js +10 -16
- package/dist/tools/UrbanismeTool.js.map +1 -1
- package/package.json +11 -6
- package/dist/resources/WfsCqlFilterResource.d.ts +0 -10
- package/dist/resources/WfsCqlFilterResource.js +0 -21
- package/dist/resources/WfsCqlFilterResource.js.map +0 -1
- package/dist/resources/readMarkdownResource.d.ts +0 -1
- package/dist/resources/readMarkdownResource.js +0 -21
- package/dist/resources/readMarkdownResource.js.map +0 -1
- package/dist/tools/GpfWfsListTypesTool.d.ts +0 -22
- package/dist/tools/GpfWfsListTypesTool.js +0 -26
- package/dist/tools/GpfWfsListTypesTool.js.map +0 -1
- package/dist/tools/toolAnnotations.d.ts +0 -6
- package/dist/tools/toolAnnotations.js.map +0 -1
- /package/dist/{tools → helpers}/toolAnnotations.js +0 -0
|
@@ -3,7 +3,7 @@ import { z } from "zod";
|
|
|
3
3
|
import type { Collection } from "@ignfab/gpf-schema-store";
|
|
4
4
|
declare const gpfWfsDescribeTypeInputSchema: z.ZodObject<{
|
|
5
5
|
typename: z.ZodString;
|
|
6
|
-
}, "
|
|
6
|
+
}, "strict", z.ZodTypeAny, {
|
|
7
7
|
typename?: string;
|
|
8
8
|
}, {
|
|
9
9
|
typename?: string;
|
|
@@ -13,10 +13,10 @@ declare class GpfWfsDescribeTypeTool extends MCPTool<GpfWfsDescribeTypeInput> {
|
|
|
13
13
|
name: string;
|
|
14
14
|
title: string;
|
|
15
15
|
annotations: {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
readOnlyHint: boolean;
|
|
17
|
+
destructiveHint: boolean;
|
|
18
|
+
idempotentHint: boolean;
|
|
19
|
+
openWorldHint: boolean;
|
|
20
20
|
};
|
|
21
21
|
description: string;
|
|
22
22
|
protected outputSchemaShape: z.ZodObject<{
|
|
@@ -50,10 +50,6 @@ declare class GpfWfsDescribeTypeTool extends MCPTool<GpfWfsDescribeTypeInput> {
|
|
|
50
50
|
}>, "many">;
|
|
51
51
|
}, "strip", z.ZodTypeAny, {
|
|
52
52
|
id?: string;
|
|
53
|
-
namespace?: string;
|
|
54
|
-
name?: string;
|
|
55
|
-
title?: string;
|
|
56
|
-
description?: string;
|
|
57
53
|
properties?: {
|
|
58
54
|
type?: string;
|
|
59
55
|
name?: string;
|
|
@@ -62,12 +58,12 @@ declare class GpfWfsDescribeTypeTool extends MCPTool<GpfWfsDescribeTypeInput> {
|
|
|
62
58
|
enum?: string[];
|
|
63
59
|
defaultCrs?: string;
|
|
64
60
|
}[];
|
|
65
|
-
}, {
|
|
66
|
-
id?: string;
|
|
67
61
|
namespace?: string;
|
|
68
62
|
name?: string;
|
|
69
63
|
title?: string;
|
|
70
64
|
description?: string;
|
|
65
|
+
}, {
|
|
66
|
+
id?: string;
|
|
71
67
|
properties?: {
|
|
72
68
|
type?: string;
|
|
73
69
|
name?: string;
|
|
@@ -76,14 +72,14 @@ declare class GpfWfsDescribeTypeTool extends MCPTool<GpfWfsDescribeTypeInput> {
|
|
|
76
72
|
enum?: string[];
|
|
77
73
|
defaultCrs?: string;
|
|
78
74
|
}[];
|
|
79
|
-
}>;
|
|
80
|
-
}, "strip", z.ZodTypeAny, {
|
|
81
|
-
result?: {
|
|
82
|
-
id?: string;
|
|
83
75
|
namespace?: string;
|
|
84
76
|
name?: string;
|
|
85
77
|
title?: string;
|
|
86
78
|
description?: string;
|
|
79
|
+
}>;
|
|
80
|
+
}, "strip", z.ZodTypeAny, {
|
|
81
|
+
result?: {
|
|
82
|
+
id?: string;
|
|
87
83
|
properties?: {
|
|
88
84
|
type?: string;
|
|
89
85
|
name?: string;
|
|
@@ -92,14 +88,14 @@ declare class GpfWfsDescribeTypeTool extends MCPTool<GpfWfsDescribeTypeInput> {
|
|
|
92
88
|
enum?: string[];
|
|
93
89
|
defaultCrs?: string;
|
|
94
90
|
}[];
|
|
95
|
-
};
|
|
96
|
-
}, {
|
|
97
|
-
result?: {
|
|
98
|
-
id?: string;
|
|
99
91
|
namespace?: string;
|
|
100
92
|
name?: string;
|
|
101
93
|
title?: string;
|
|
102
94
|
description?: string;
|
|
95
|
+
};
|
|
96
|
+
}, {
|
|
97
|
+
result?: {
|
|
98
|
+
id?: string;
|
|
103
99
|
properties?: {
|
|
104
100
|
type?: string;
|
|
105
101
|
name?: string;
|
|
@@ -108,11 +104,15 @@ declare class GpfWfsDescribeTypeTool extends MCPTool<GpfWfsDescribeTypeInput> {
|
|
|
108
104
|
enum?: string[];
|
|
109
105
|
defaultCrs?: string;
|
|
110
106
|
}[];
|
|
107
|
+
namespace?: string;
|
|
108
|
+
name?: string;
|
|
109
|
+
title?: string;
|
|
110
|
+
description?: string;
|
|
111
111
|
};
|
|
112
112
|
}>;
|
|
113
113
|
schema: z.ZodObject<{
|
|
114
114
|
typename: z.ZodString;
|
|
115
|
-
}, "
|
|
115
|
+
}, "strict", z.ZodTypeAny, {
|
|
116
116
|
typename?: string;
|
|
117
117
|
}, {
|
|
118
118
|
typename?: string;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { MCPTool } from "mcp-framework";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { wfsClient } from "../gpf/wfs.js";
|
|
4
|
-
import { READ_ONLY_OPEN_WORLD_TOOL_ANNOTATIONS } from "
|
|
4
|
+
import { READ_ONLY_OPEN_WORLD_TOOL_ANNOTATIONS } from "../helpers/toolAnnotations.js";
|
|
5
5
|
const gpfWfsDescribeTypeInputSchema = z.object({
|
|
6
6
|
typename: z
|
|
7
7
|
.string()
|
|
8
8
|
.trim()
|
|
9
9
|
.min(1, "le nom du type ne doit pas être vide")
|
|
10
10
|
.describe("Le nom du type (ex : BDTOPO_V3:batiment)"),
|
|
11
|
-
});
|
|
11
|
+
}).strict();
|
|
12
12
|
const gpfWfsPropertySchema = z.object({
|
|
13
13
|
name: z.string().describe("Le nom de la propriété."),
|
|
14
14
|
type: z.string().describe("Le type de la propriété."),
|
|
@@ -34,8 +34,9 @@ class GpfWfsDescribeTypeTool extends MCPTool {
|
|
|
34
34
|
description = [
|
|
35
35
|
"Renvoie le schéma détaillé d'un type WFS à partir de son identifiant (`typename`) : identifiants, description et liste des propriétés.",
|
|
36
36
|
"Utiliser ce tool après `gpf_wfs_search_types` pour inspecter les propriétés disponibles avant d'appeler `gpf_wfs_get_features`.",
|
|
37
|
-
"La sortie inclut notamment le type des propriétés, leur description,
|
|
38
|
-
|
|
37
|
+
"La sortie inclut notamment le type des propriétés, leur description, leurs valeurs possibles (`enum`) lorsqu'elles existent",
|
|
38
|
+
"**Appel fortement recommandé si les noms exacts des propriétés ne sont pas connus : un nom de propriété incorrect provoque une erreur**."
|
|
39
|
+
].join("\n");
|
|
39
40
|
outputSchemaShape = gpfWfsDescribeTypeOutputSchema;
|
|
40
41
|
schema = gpfWfsDescribeTypeInputSchema;
|
|
41
42
|
async execute(input) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GpfWfsDescribeTypeTool.js","sourceRoot":"","sources":["../../src/tools/GpfWfsDescribeTypeTool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,qCAAqC,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"GpfWfsDescribeTypeTool.js","sourceRoot":"","sources":["../../src/tools/GpfWfsDescribeTypeTool.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,60 +1,132 @@
|
|
|
1
1
|
import { MCPTool } from "mcp-framework";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
property_names: z.ZodOptional<z.ZodString>;
|
|
6
|
-
sort_by: z.ZodOptional<z.ZodString>;
|
|
7
|
-
count: z.ZodOptional<z.ZodNumber>;
|
|
8
|
-
cql_filter: z.ZodOptional<z.ZodString>;
|
|
9
|
-
result_type: z.ZodOptional<z.ZodEnum<["results", "hits", "url"]>>;
|
|
10
|
-
}, "strip", z.ZodTypeAny, {
|
|
11
|
-
cql_filter?: string;
|
|
12
|
-
typename?: string;
|
|
13
|
-
property_names?: string;
|
|
14
|
-
sort_by?: string;
|
|
15
|
-
count?: number;
|
|
16
|
-
result_type?: "results" | "hits" | "url";
|
|
17
|
-
}, {
|
|
18
|
-
cql_filter?: string;
|
|
19
|
-
typename?: string;
|
|
20
|
-
property_names?: string;
|
|
21
|
-
sort_by?: string;
|
|
22
|
-
count?: number;
|
|
23
|
-
result_type?: "results" | "hits" | "url";
|
|
24
|
-
}>;
|
|
25
|
-
type GpfWfsGetFeaturesInput = z.infer<typeof gpfWfsGetFeaturesInputSchema>;
|
|
2
|
+
import type { Collection } from "@ignfab/gpf-schema-store";
|
|
3
|
+
import { type CompiledRequest } from "../helpers/wfs_internal/request.js";
|
|
4
|
+
import { type GpfWfsGetFeaturesInput } from "../helpers/wfs_internal/schema.js";
|
|
26
5
|
declare class GpfWfsGetFeaturesTool extends MCPTool<GpfWfsGetFeaturesInput> {
|
|
27
6
|
name: string;
|
|
28
7
|
title: string;
|
|
29
8
|
annotations: {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
9
|
+
readOnlyHint: boolean;
|
|
10
|
+
destructiveHint: boolean;
|
|
11
|
+
idempotentHint: boolean;
|
|
12
|
+
openWorldHint: boolean;
|
|
34
13
|
};
|
|
35
14
|
description: string;
|
|
36
|
-
schema:
|
|
37
|
-
typename:
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
15
|
+
schema: import("zod").ZodObject<{
|
|
16
|
+
typename: import("zod").ZodString;
|
|
17
|
+
limit: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
18
|
+
result_type: import("zod").ZodDefault<import("zod").ZodEnum<["results", "hits", "request"]>>;
|
|
19
|
+
select: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
20
|
+
order_by: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
21
|
+
property: import("zod").ZodString;
|
|
22
|
+
direction: import("zod").ZodDefault<import("zod").ZodEnum<["asc", "desc"]>>;
|
|
23
|
+
}, "strict", import("zod").ZodTypeAny, {
|
|
24
|
+
property?: string;
|
|
25
|
+
direction?: "asc" | "desc";
|
|
26
|
+
}, {
|
|
27
|
+
property?: string;
|
|
28
|
+
direction?: "asc" | "desc";
|
|
29
|
+
}>, "many">>;
|
|
30
|
+
where: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
31
|
+
property: import("zod").ZodString;
|
|
32
|
+
operator: import("zod").ZodEnum<["eq", "ne", "lt", "lte", "gt", "gte", "in", "is_null"]>;
|
|
33
|
+
value: import("zod").ZodOptional<import("zod").ZodString>;
|
|
34
|
+
values: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
35
|
+
}, "strict", import("zod").ZodTypeAny, {
|
|
36
|
+
values?: string[];
|
|
37
|
+
value?: string;
|
|
38
|
+
property?: string;
|
|
39
|
+
operator?: "gte" | "gt" | "lte" | "lt" | "eq" | "ne" | "in" | "is_null";
|
|
40
|
+
}, {
|
|
41
|
+
values?: string[];
|
|
42
|
+
value?: string;
|
|
43
|
+
property?: string;
|
|
44
|
+
operator?: "gte" | "gt" | "lte" | "lt" | "eq" | "ne" | "in" | "is_null";
|
|
45
|
+
}>, "many">>;
|
|
46
|
+
spatial_operator: import("zod").ZodOptional<import("zod").ZodEnum<["bbox", "intersects_point", "dwithin_point", "intersects_feature"]>>;
|
|
47
|
+
bbox_west: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
48
|
+
bbox_south: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
49
|
+
bbox_east: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
50
|
+
bbox_north: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
51
|
+
intersects_lon: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
52
|
+
intersects_lat: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
53
|
+
dwithin_lon: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
54
|
+
dwithin_lat: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
55
|
+
dwithin_distance_m: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
56
|
+
intersects_feature_typename: import("zod").ZodOptional<import("zod").ZodString>;
|
|
57
|
+
intersects_feature_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
58
|
+
}, "strict", import("zod").ZodTypeAny, {
|
|
45
59
|
typename?: string;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
60
|
+
limit?: number;
|
|
61
|
+
result_type?: "request" | "results" | "hits";
|
|
62
|
+
select?: string[];
|
|
63
|
+
order_by?: {
|
|
64
|
+
property?: string;
|
|
65
|
+
direction?: "asc" | "desc";
|
|
66
|
+
}[];
|
|
67
|
+
where?: {
|
|
68
|
+
values?: string[];
|
|
69
|
+
value?: string;
|
|
70
|
+
property?: string;
|
|
71
|
+
operator?: "gte" | "gt" | "lte" | "lt" | "eq" | "ne" | "in" | "is_null";
|
|
72
|
+
}[];
|
|
73
|
+
spatial_operator?: "bbox" | "intersects_point" | "dwithin_point" | "intersects_feature";
|
|
74
|
+
bbox_west?: number;
|
|
75
|
+
bbox_south?: number;
|
|
76
|
+
bbox_east?: number;
|
|
77
|
+
bbox_north?: number;
|
|
78
|
+
intersects_lon?: number;
|
|
79
|
+
intersects_lat?: number;
|
|
80
|
+
dwithin_lon?: number;
|
|
81
|
+
dwithin_lat?: number;
|
|
82
|
+
dwithin_distance_m?: number;
|
|
83
|
+
intersects_feature_typename?: string;
|
|
84
|
+
intersects_feature_id?: string;
|
|
50
85
|
}, {
|
|
51
|
-
cql_filter?: string;
|
|
52
86
|
typename?: string;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
87
|
+
limit?: number;
|
|
88
|
+
result_type?: "request" | "results" | "hits";
|
|
89
|
+
select?: string[];
|
|
90
|
+
order_by?: {
|
|
91
|
+
property?: string;
|
|
92
|
+
direction?: "asc" | "desc";
|
|
93
|
+
}[];
|
|
94
|
+
where?: {
|
|
95
|
+
values?: string[];
|
|
96
|
+
value?: string;
|
|
97
|
+
property?: string;
|
|
98
|
+
operator?: "gte" | "gt" | "lte" | "lt" | "eq" | "ne" | "in" | "is_null";
|
|
99
|
+
}[];
|
|
100
|
+
spatial_operator?: "bbox" | "intersects_point" | "dwithin_point" | "intersects_feature";
|
|
101
|
+
bbox_west?: number;
|
|
102
|
+
bbox_south?: number;
|
|
103
|
+
bbox_east?: number;
|
|
104
|
+
bbox_north?: number;
|
|
105
|
+
intersects_lon?: number;
|
|
106
|
+
intersects_lat?: number;
|
|
107
|
+
dwithin_lon?: number;
|
|
108
|
+
dwithin_lat?: number;
|
|
109
|
+
dwithin_distance_m?: number;
|
|
110
|
+
intersects_feature_typename?: string;
|
|
111
|
+
intersects_feature_id?: string;
|
|
57
112
|
}>;
|
|
113
|
+
/**
|
|
114
|
+
* Exposes an input schema variant that stays compatible with most MCP integrations.
|
|
115
|
+
*
|
|
116
|
+
* @returns The published input schema exposed through the MCP tool definition.
|
|
117
|
+
*/
|
|
118
|
+
get inputSchema(): {
|
|
119
|
+
type: "object";
|
|
120
|
+
properties?: Record<string, object>;
|
|
121
|
+
required?: string[];
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* Formats compact responses (`hits`, `request`) into `structuredContent`.
|
|
125
|
+
* Full result sets are still delegated to the framework default behavior.
|
|
126
|
+
*
|
|
127
|
+
* @param data Raw execution result returned by the tool implementation.
|
|
128
|
+
* @returns An MCP success response, optionally enriched with structured content.
|
|
129
|
+
*/
|
|
58
130
|
protected createSuccessResponse(data: unknown): import("mcp-framework").ToolResponse | {
|
|
59
131
|
content: {
|
|
60
132
|
type: "text";
|
|
@@ -70,10 +142,64 @@ declare class GpfWfsGetFeaturesTool extends MCPTool<GpfWfsGetFeaturesInput> {
|
|
|
70
142
|
text: string;
|
|
71
143
|
}[];
|
|
72
144
|
structuredContent: {
|
|
145
|
+
body?: string;
|
|
146
|
+
result_type?: "request";
|
|
147
|
+
method?: "POST";
|
|
73
148
|
url?: string;
|
|
74
|
-
|
|
149
|
+
query?: Record<string, string>;
|
|
150
|
+
get_url?: string;
|
|
75
151
|
};
|
|
76
152
|
};
|
|
77
|
-
|
|
153
|
+
/**
|
|
154
|
+
* Loads a WFS feature type description from the embedded catalog.
|
|
155
|
+
*
|
|
156
|
+
* @param typename Exact WFS typename to load from the embedded schema store.
|
|
157
|
+
* @returns The matching feature type description.
|
|
158
|
+
*/
|
|
159
|
+
protected getFeatureType(typename: string): Promise<Collection>;
|
|
160
|
+
/**
|
|
161
|
+
* Executes a compiled WFS request as POST and returns the JSON FeatureCollection.
|
|
162
|
+
*
|
|
163
|
+
* @param request Compiled request split into query-string parameters and POST body.
|
|
164
|
+
* @returns The parsed JSON response returned by the WFS endpoint.
|
|
165
|
+
*/
|
|
166
|
+
protected fetchFeatureCollection(request: CompiledRequest): Promise<any>;
|
|
167
|
+
/**
|
|
168
|
+
* Extracts a result count from a WFS response, preferring `numberMatched`.
|
|
169
|
+
* Explicitly rejects responses that do not provide a usable total.
|
|
170
|
+
*
|
|
171
|
+
* @param featureCollection Parsed WFS response object.
|
|
172
|
+
* @returns The total number of matching features.
|
|
173
|
+
*/
|
|
174
|
+
protected getMatchedFeatureCount(featureCollection: Record<string, unknown>): number;
|
|
175
|
+
/**
|
|
176
|
+
* Enriches transformed features with a complete `feature_ref`, reusable
|
|
177
|
+
* in particular by `intersects_feature`.
|
|
178
|
+
*
|
|
179
|
+
* @param featureCollection Raw WFS FeatureCollection response.
|
|
180
|
+
* @param typename Typename of the main queried layer.
|
|
181
|
+
* @returns The transformed FeatureCollection with fully populated feature references.
|
|
182
|
+
*/
|
|
183
|
+
protected attachFeatureRefs(featureCollection: Record<string, unknown>, typename: string): Record<string, unknown>;
|
|
184
|
+
/**
|
|
185
|
+
* Resolves the geometry of a reference feature when `intersects_feature` is used,
|
|
186
|
+
* then converts it to EWKT for CQL compilation.
|
|
187
|
+
*
|
|
188
|
+
* @param input Normalized tool input.
|
|
189
|
+
* @returns The resolved reference geometry, or `undefined` when no reference feature is needed.
|
|
190
|
+
*/
|
|
191
|
+
protected resolveIntersectsFeatureGeometry(input: GpfWfsGetFeaturesInput): Promise<{
|
|
192
|
+
typename: string;
|
|
193
|
+
feature_id: string;
|
|
194
|
+
geometry_ewkt: string;
|
|
195
|
+
}>;
|
|
196
|
+
/**
|
|
197
|
+
* Orchestrates the full tool execution flow:
|
|
198
|
+
* catalog lookup -> compilation -> WFS request -> response post-processing.
|
|
199
|
+
*
|
|
200
|
+
* @param input Normalized tool input.
|
|
201
|
+
* @returns Either a compiled request, a hit count, or a transformed FeatureCollection.
|
|
202
|
+
*/
|
|
203
|
+
execute(input: GpfWfsGetFeaturesInput): Promise<Record<string, unknown>>;
|
|
78
204
|
}
|
|
79
205
|
export default GpfWfsGetFeaturesTool;
|