@opengis/gis 0.2.151 → 0.2.153

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.
@@ -1,9 +1,9 @@
1
1
  import { defineComponent as te, resolveDirective as We, openBlock as u, createElementBlock as m, createElementVNode as n, Fragment as W, renderList as X, toDisplayString as d, withDirectives as we, createTextVNode as Xe, normalizeClass as ae, ref as $, watch as S, computed as h, vModelText as Ke, onMounted as Ye, onBeforeUnmount as Ze, createCommentVNode as q, createVNode as B, withCtx as He, createBlock as F, resolveDynamicComponent as Je } from "vue";
2
2
  import { useRouter as et, useRoute as tt } from "vue-router";
3
3
  import { TooltipDirective as st, notify as M } from "@opengis/core";
4
- import { _ as nt, u as lt, f as rt, M as ot, i as it, j as be, F as at } from "./index-DgSwtpZG.js";
5
- import { _ as ut, a as ct, b as dt, c as ft } from "./HeaderActions.vue_vue_type_script_setup_true_lang-X8W5T9FU.js";
6
- import { _ as he } from "./ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-_bbOMBQM.js";
4
+ import { _ as nt, u as lt, f as rt, M as ot, i as it, j as be, F as at } from "./index-CgU4688s.js";
5
+ import { _ as ut, a as ct, b as dt, c as ft } from "./HeaderActions.vue_vue_type_script_setup_true_lang-BaxPBqzx.js";
6
+ import { _ as he } from "./ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-SGAab2Pe.js";
7
7
  const mt = { class: "flex-1 overflow-y-auto p-4 sm:p-6" }, pt = { class: "space-y-3" }, gt = { class: "bg-white p-3 rounded-xl border border-gray-200 shadow-sm" }, yt = { class: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-2" }, vt = { class: "text-xs text-gray-500 mb-1" }, xt = {
8
8
  key: 0,
9
9
  class: "text-base text-md font-semibold text-gray-900"
@@ -2,9 +2,9 @@ import { defineComponent as B, mergeModels as j, useModel as S, computed as h, d
2
2
  import { useRoute as Z, useRouter as ee } from "vue-router";
3
3
  import { notify as F } from "@opengis/core";
4
4
  import { _ as te } from "./TableFormHeader.vue_vue_type_script_setup_true_lang-Mci_tseM.js";
5
- import { V as N } from "./vs-datatable-CMGb14xz.js";
6
- import { _ as z, n as R, m as E, r as H } from "./import-utils-BD6m47wz.js";
7
- import { a as ae, b as le, c as se, d as oe, e as ie } from "./index-DgSwtpZG.js";
5
+ import { V as N } from "./vs-datatable-BrRW57vx.js";
6
+ import { _ as z, n as R, m as E, r as H } from "./import-utils-CJ5QxhA1.js";
7
+ import { a as ae, b as le, c as se, d as oe, e as ie } from "./index-CgU4688s.js";
8
8
  import { LucideChevronRight as re } from "lucide-vue-next";
9
9
  import { _ as ne } from "./MapSettingsTabs.vue_vue_type_script_setup_true_lang-CKCK3NqY.js";
10
10
  const ue = { class: "vs-form" }, de = { class: "vs-form__body auto-rows-max container" }, ce = { class: "flex flex-wrap" }, me = { class: "h-fit w-full mb-6 bg-white border border-gray-200 rounded-lg p-6" }, ve = { class: "h-fit w-full flex flex-wrap" }, pe = { class: "w-full" }, fe = /* @__PURE__ */ B({
@@ -1,12 +1,12 @@
1
1
  import { openBlock as C, createElementBlock as D, createElementVNode as v, defineComponent as ee, ref as S, watch as I, createTextVNode as Gi, createVNode as j, createBlock as M, createCommentVNode as q, defineAsyncComponent as Qi, unref as Te, withCtx as We, withDirectives as qe, vModelText as Ke, normalizeClass as ve, Fragment as Hn, renderList as Vn, toDisplayString as le, getCurrentInstance as qn, onBeforeUnmount as Kn, toRef as Wi, computed as ue, onMounted as Ji, resolveDynamicComponent as Zi } from "vue";
2
2
  import { useRoute as Xi, useRouter as el } from "vue-router";
3
3
  import { notify as Q } from "@opengis/core";
4
- import { _ as Re, u as Ie, f as nl, M as il, g as ll, h as rl, i as tl, j as kn, k as ol, l as ul, m as al, s as Cn, n as sl } from "./index-DgSwtpZG.js";
5
- import { _ as cl, a as fl, b as dl, c as pl } from "./HeaderActions.vue_vue_type_script_setup_true_lang-X8W5T9FU.js";
6
- import { S as ml, C as hl } from "./CardIcon-COYvGn3y.js";
4
+ import { _ as Re, u as Ie, f as nl, M as il, g as ll, h as rl, i as tl, j as kn, k as ol, l as ul, m as al, s as Cn, n as sl } from "./index-CgU4688s.js";
5
+ import { _ as cl, a as fl, b as dl, c as pl } from "./HeaderActions.vue_vue_type_script_setup_true_lang-BaxPBqzx.js";
6
+ import { S as ml, C as hl } from "./CardIcon-DMyL1fVA.js";
7
7
  import { _ as zn } from "./MonacoEditor.vue_vue_type_script_setup_true_lang-D3ZPeXMw.js";
8
- import { V as $e } from "./vs-datatable-CMGb14xz.js";
9
- import { _ as ln, m as rn, r as xe } from "./import-utils-BD6m47wz.js";
8
+ import { V as $e } from "./vs-datatable-BrRW57vx.js";
9
+ import { _ as ln, m as rn, r as xe } from "./import-utils-CJ5QxhA1.js";
10
10
  /*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT */
11
11
  function Gn(e) {
12
12
  return typeof e > "u" || e === null;
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as F, mergeModels as O, defineAsyncComponent as I, useModel as R, ref as y, watch as K, openBlock as o, createElementBlock as s, createElementVNode as e, createVNode as $, unref as x, withCtx as S, createStaticVNode as V, useSlots as P, computed as H, Fragment as b, createTextVNode as U, createCommentVNode as N, renderList as A, normalizeStyle as Q, toDisplayString as M, normalizeClass as z, withModifiers as X, createBlock as Y, resolveDynamicComponent as ee, withDirectives as te, renderSlot as ne } from "vue";
2
2
  import { notify as E } from "@opengis/core";
3
3
  import { Edit as le, Trash as oe } from "lucide-vue-next";
4
- import { _ as u } from "./index-DgSwtpZG.js";
4
+ import { _ as u } from "./index-CgU4688s.js";
5
5
  const se = { class: "flex items-center justify-center col-span-3 gap-2" }, re = { class: "flex justify-end p-[20px] gap-[10px] border-t w-full" }, ie = /* @__PURE__ */ F({
6
6
  __name: "vs-datatable-controls",
7
7
  props: /* @__PURE__ */ O({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengis/gis",
3
- "version": "0.2.151",
3
+ "version": "0.2.153",
4
4
  "type": "module",
5
5
  "author": "Softpro",
6
6
  "main": "./dist/index.js",
@@ -14,13 +14,17 @@ service MapService {
14
14
  rpc FileStat(FileStatRequest) returns (FileStatOut);
15
15
  rpc FileSearch(FileSearchRequest) returns (FileSearchOut);
16
16
  rpc CreateXML(CreateXMLRequest) returns (stream JobProgress); // streaming XML creation
17
+ rpc CreateIndex(CreateIndexRequest) returns (CreateIndexOut); // create/update index.geojson for folder
18
+ rpc ConvertLog(ConvertLogRequest) returns (ConvertLogOut); // json state for current stream tasks
19
+ rpc ConvertCog(ConvertCogRequest) returns (stream JobProgress); // streaming COG conversion
20
+ rpc ImportData(ImportDataRequest) returns (stream JobProgress); // streaming SHP -> PostGIS import
17
21
  rpc UploadXML(UploadXMLRequest) returns (UploadXMLOut);
18
22
  rpc UploadRaster(UploadRasterRequest) returns (UploadRasterOut);
19
23
  rpc GetRasterStatus(GetRasterStatusRequest) returns (GetStatusOut);
20
24
  rpc GetStat(GetStatRequest) returns (GetStatOut);
21
- rpc GetRender(GetRenderRequest) returns (GetRenderOut);
22
25
  rpc GetLogs(GetLogsRequest) returns (GetLogsOut);
23
26
  rpc GetRasterInfo(GetRasterInfoRequest) returns (GetRasterInfoOut);
27
+ rpc GetMeta(GetMetaRequest) returns (GetMetaOut);
24
28
  }
25
29
 
26
30
  // ----------------------------
@@ -33,6 +37,11 @@ message RenderTileRequest {
33
37
  int32 width = 4;
34
38
  string ttl = 5; // "5m", "1h", "1d" or "0"
35
39
  string debug = 6;
40
+ optional int32 z = 7; // optional XYZ tile zoom
41
+ optional int32 x = 8; // optional XYZ tile x
42
+ optional int32 y = 9; // optional XYZ tile y
43
+ bool meta = 10; // when true return tile metadata/path only (without base64 image payload)
44
+ optional bool base64 = 11; // optional output mode flag: true -> base64, false -> raw bytes
36
45
  }
37
46
 
38
47
  message RenderTileOut {
@@ -41,6 +50,8 @@ message RenderTileOut {
41
50
  string err = 3;
42
51
  string xml_path = 4;
43
52
  string tile_path = 5;
53
+ string tile_url = 6;
54
+ bytes data = 7; // raw PNG bytes (used when request.base64=false)
44
55
  }
45
56
 
46
57
  message ClearTileRequest {
@@ -89,6 +100,7 @@ message FileInfo {
89
100
  int64 size = 2;
90
101
  string date = 3;
91
102
  string dir = 4;
103
+ optional bool cog = 5; // COG flag for TIFF files
92
104
  }
93
105
 
94
106
  message DirInfo {
@@ -115,6 +127,65 @@ message CreateXMLRequest {
115
127
  string debug = 7;
116
128
  string nocache = 8;
117
129
  string proj4 = 9;
130
+ bool cog = 10; // enable COG pipeline and map.xml without preview/zoom split
131
+ bool preview = 11; // build preview and include preview layer in XML
132
+ bool recursive = 12; // recursive source scan for folder targets
133
+ string compress = 13; // COG compression mode: AUTO|DEFLATE|ZSTD|LZW|JPEG
134
+ bool recompress = 14; // allow re-converting files that are already COG
135
+ int32 quality = 15; // JPEG quality (1..100), 0 means default 85
136
+ bool single = 16; // when path is folder, create one XML per raster file
137
+ string mode = 17; // folder mode: auto|single|multi (replaces legacy single=true)
138
+ int32 minZoom = 18; // minzoom value for map.xml Parameters (default: 10)
139
+ reserved 19, 20, 21, 22, 27;
140
+ reserved "vrtResample", "vrtResolution", "vrtXRes", "vrtYRes", "vrtTap";
141
+ string vrtSrcNodata = 23; // source nodata value(s), e.g. "0" or "0 0 0"
142
+ string vrtNodata = 24; // VRT nodata value(s)
143
+ bool vrtHideNodata = 25; // hide nodata in VRT
144
+ bool vrtAddAlpha = 26; // add alpha band in VRT
145
+ bool overwrite = 28; // overwrite existing xml when true
146
+ }
147
+
148
+ message CreateIndexRequest {
149
+ string path = 1; // folder path under raster root
150
+ bool recursive = 2; // include nested folders
151
+ bool overwrite = 3; // recreate existing index.geojson
152
+ }
153
+
154
+ message CreateIndexOut {
155
+ string path = 1; // relative index.geojson path
156
+ bool created = 2; // true when index.geojson written in this call
157
+ bool skipped = 3; // true when existing index.geojson kept as-is
158
+ bool overwritten = 4; // true when existing index.geojson was replaced
159
+ int32 source_count = 5; // discovered source TIFF count
160
+ int32 feature_count = 6; // written feature count
161
+ int32 skipped_sources_count = 7; // sources skipped due unreadable/missing geometry
162
+ }
163
+
164
+ message ConvertLogRequest {
165
+ string path = 1; // optional filter by request path
166
+ string method = 2; // optional filter by method (CreateXML|ConvertCog)
167
+ }
168
+
169
+ message ConvertLogOut {
170
+ string data = 1; // json payload with current stream tasks
171
+ string stat_path = 2; // relative path to stat file: log/stream/stat/[date].log
172
+ string err = 3; // error text when failed
173
+ }
174
+
175
+ message ConvertCogRequest {
176
+ string name = 1; // deprecated fallback: file name only
177
+ string path = 2; // raster file or folder
178
+ bool recursive = 3; // process nested folders when path is directory
179
+ string compress = 4; // COG compression mode: AUTO|DEFLATE|ZSTD|LZW|JPEG
180
+ bool recompress = 5; // allow re-converting files that are already COG
181
+ int32 quality = 6; // JPEG quality (1..100), 0 means default 85
182
+ int32 srid = 7; // optional target SRID for reprojection before COG conversion
183
+ }
184
+
185
+ message ImportDataRequest {
186
+ string path = 1; // path to .shp file or directory under vector root
187
+ bool recursive = 2; // process nested folders when path is directory
188
+ bool force = 3; // overwrite existing tables when true
118
189
  }
119
190
 
120
191
  message UploadXMLRequest {
@@ -161,15 +232,6 @@ message GetStatOut {
161
232
  google.protobuf.Struct result = 1; // dynamic json structure, not bound by same value type like with map
162
233
  }
163
234
 
164
- message GetRenderRequest {
165
- string name = 1;
166
- string path = 2;
167
- }
168
-
169
- message GetRenderOut {
170
- string result = 1; // serialized object or placeholder
171
- }
172
-
173
235
  message GetLogsRequest {
174
236
  string path = 1; // "info", "info/2026-01-01.log" etc.
175
237
  }
@@ -206,6 +268,7 @@ message GetRasterInfoData {
206
268
  int64 color_depth = 12;
207
269
  string compression = 13;
208
270
  bool xml = 14;
271
+ optional bool cog = 15;
209
272
  }
210
273
 
211
274
  message GetRasterInfoOut {
@@ -213,6 +276,18 @@ message GetRasterInfoOut {
213
276
  bool cache = 2;
214
277
  }
215
278
 
279
+ message GetMetaRequest {
280
+ string path = 1;
281
+ repeated double bbox = 2; // optional [minx, miny, maxx, maxy]
282
+ }
283
+
284
+ message GetMetaOut {
285
+ google.protobuf.Struct data = 1; // raw metadata JSON
286
+ bool cache = 2; // true when metadata file already existed
287
+ string meta_path = 3; // relative metadata file path
288
+ bool bbox_intersects = 4; // bbox vs metadata extent (true when bbox absent)
289
+ }
290
+
216
291
  // ----------------------------
217
292
  // Job Service Messages
218
293
  // ----------------------------
@@ -82,6 +82,8 @@ export default async function gisRtile({
82
82
 
83
83
  const bbox = mercator.bbox(y, x, z, false, '900913');
84
84
 
85
+ const meta = config?.mapnik?.meta ? true : false;
86
+
85
87
  try {
86
88
  const ttl = (query.nocache ? '0' : null)
87
89
  || (data.type === 'css' && !data.is_static ? '1w' : null);
@@ -111,11 +113,32 @@ export default async function gisRtile({
111
113
  width: 256,
112
114
  bbox,
113
115
  ttl,
116
+ meta,
117
+ base64: false,
114
118
  debug: query.debug,
115
119
  };
116
120
 
117
121
  const result = await RenderTile(param);
118
122
 
123
+ if (result.err) {
124
+ logger.file('rtile/error', {
125
+ error: result.err, x, y, z, id: data.id, type: data.type,
126
+ });
127
+ return reply.status(500).send({ error: config.local ? result.err : 'render error', code: 500 });
128
+ }
129
+
130
+ if (meta) {
131
+ const accelPath = result.tile_path?.startsWith('/') ? result.tile_path : `/${result.tile_path}`;
132
+ const metaHeaders = {
133
+ 'Content-Type': 'image/png',
134
+ 'Cache-Control': query.nocache || query.nottl ? 'no-store, no-cache, must-revalidate' : 'public, max-age=2592000',
135
+ 'X-Accel-Redirect': accelPath,
136
+ };
137
+ if (query.debug) return reply.send({ ...metaHeaders, base64: result.base64, z, x, y });
138
+ reply.headers(metaHeaders);
139
+ return reply.code(204).send();
140
+ }
141
+
119
142
  if (query.debug) {
120
143
  return {
121
144
  ...result,
@@ -130,14 +153,7 @@ export default async function gisRtile({
130
153
  };
131
154
  }
132
155
 
133
- if (result.err) {
134
- logger.file('rtile/error', {
135
- error: result.err, x, y, z, id: data.id, type: data.type,
136
- });
137
- return reply.status(500).send({ error: config.local ? result.err : 'render error', code: 500 });
138
- }
139
-
140
- const buffer = Buffer.from(result.base64, 'base64');
156
+ const buffer = result.data || Buffer.from(result.base64, 'base64');
141
157
 
142
158
  return reply.headers({ 'Content-Type': 'image/png', 'Cache-Control': query.nocache || query.nottl ? 'no-store, no-cache, must-revalidate' : 'public, max-age=2592000' }).send(buffer);
143
159
  }