@opengis/gis 0.2.154 → 0.2.156

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.
Files changed (26) hide show
  1. package/dist/{CardIcon--lAtW-9w.js → CardIcon-D-1qypTS.js} +1 -1
  2. package/dist/{EntityTablePage-C4xpTFhX.js → EntityTablePage-DP9Ob7Iw.js} +1 -1
  3. package/dist/{ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-ChIqnIJk.js → ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-CtT-2WgB.js} +1 -1
  4. package/dist/{HeaderActions.vue_vue_type_script_setup_true_lang-ZusIbDWr.js → HeaderActions.vue_vue_type_script_setup_true_lang-DMkvpe25.js} +1 -1
  5. package/dist/{MapSettings-DW8jEvOa.js → MapSettings-DrCqSvlK.js} +1 -1
  6. package/dist/{RastersTablePage-BiLlnxUp.js → RastersTablePage-DlITcUym.js} +1 -1
  7. package/dist/{cartocss-CLomvOS2.js → cartocss-D-DI_wOE.js} +5 -5
  8. package/dist/{import-utils-kb-uej6A.js → import-utils-CC4-riao.js} +1 -1
  9. package/dist/index-DUvc4hNZ.js +11508 -0
  10. package/dist/index.css +1 -1
  11. package/dist/index.js +1 -1
  12. package/dist/index.umd.cjs +32 -32
  13. package/dist/{raster-DwJbTo-Q.js → raster-DlWMWAbc.js} +3 -3
  14. package/dist/{register-O9oHRhKY.js → register-BVrXDoQg.js} +3 -3
  15. package/dist/{service-Bej37Mtm.js → service-DlN4jqsS.js} +5 -5
  16. package/dist/{vs-datatable-ChBQO9dx.js → vs-datatable-B9s6O_XG.js} +1 -1
  17. package/module/gis/select/srid.sql +7 -0
  18. package/module/test/map/main.json +2 -1
  19. package/package.json +74 -74
  20. package/server/plugins/mapnik/map.proto +41 -1
  21. package/server/routes/gis/services/get.service.users.js +74 -74
  22. package/server/routes/map/controllers/gis.convert.js +53 -0
  23. package/server/routes/map/controllers/parseGeoFile.js +86 -0
  24. package/server/routes/map/index.mjs +33 -4
  25. package/server/routes/mapnik/controllers/rtile.js +3 -2
  26. package/dist/index-BlZ7asai.js +0 -10804
@@ -13,6 +13,7 @@ import jsonData from './controllers/jsonData.js';
13
13
  import layerList from './controllers/layerList.js';
14
14
 
15
15
  import mapFormat from './controllers/mapFormat.js';
16
+ import parseGeoFile from './controllers/parseGeoFile.js';
16
17
  import maps from './controllers/maps.js';
17
18
  import markerIconApi from './controllers/marker_icon.js';
18
19
 
@@ -24,6 +25,8 @@ import getWidget from './widgets/get.widget.js';
24
25
  import addWidget from './widgets/add.widget.js';
25
26
  import delWidget from './widgets/del.widget.js';
26
27
 
28
+ import gisConvert from './controllers/gis.convert.js';
29
+
27
30
  const schemaInfo = {
28
31
  type: 'object',
29
32
  properties: {
@@ -71,8 +74,16 @@ const mapFormatSchema = {
71
74
  },
72
75
  };
73
76
 
74
- const publicParams = { config: { policy: 'L0' }, schema: schemaInfo, package: 'gis' }; // * L0 === public
75
- const privilegedParams = { config: { policy: 'L1', role: 'admin' }, schema: schemaInfo, package: 'gis' }; // ? just auth or admin
77
+ const publicParams = {
78
+ config: { policy: 'L0' },
79
+ schema: schemaInfo,
80
+ package: 'gis',
81
+ }; // * L0 === public
82
+ const privilegedParams = {
83
+ config: { policy: 'L1', role: 'admin' },
84
+ schema: schemaInfo,
85
+ package: 'gis',
86
+ }; // ? just auth or admin
76
87
 
77
88
  export default async function route(app) {
78
89
  if (!app.hasRoute({ method: 'GET', url: '/gis-map/:id?' })) {
@@ -130,7 +141,9 @@ export default async function route(app) {
130
141
  app.get('/layer-vtile/:id/:z/:y/:x', publicParams, vtile);
131
142
  }
132
143
 
133
- if (!app.hasRoute({ method: 'GET', url: '/api/vtile/:layer/:lang/:z/:y/:x' })) {
144
+ if (
145
+ !app.hasRoute({ method: 'GET', url: '/api/vtile/:layer/:lang/:z/:y/:x' })
146
+ ) {
134
147
  console.log('\x1b[34m%s\x1b[0m', 'add vtile from gis');
135
148
  app.get('/vtile/:layer/:lang/:z/:y/:x', publicParams, vtile1);
136
149
  }
@@ -164,6 +177,22 @@ export default async function route(app) {
164
177
  }
165
178
 
166
179
  if (!app.hasRoute({ method: 'GET', url: '/api/map-format' })) {
167
- app.get('/map-format', { ...publicParams, schema: mapFormatSchema }, mapFormat);
180
+ app.get(
181
+ '/map-format',
182
+ { ...publicParams, schema: mapFormatSchema },
183
+ mapFormat,
184
+ );
185
+ }
186
+
187
+ if (!app.hasRoute({ method: 'POST', url: '/api/gis-parse-geo' })) {
188
+ app.post('/gis-parse-geo', publicParams, parseGeoFile);
189
+ }
190
+
191
+ if (!app.hasRoute({ method: 'POST', url: '/api/gis-convert' })) {
192
+ app.post(
193
+ '/gis-convert',
194
+ { config: { policy: 'L0' }, schema: {}, package: 'gis' },
195
+ gisConvert,
196
+ );
168
197
  }
169
198
  }
@@ -113,6 +113,7 @@ export default async function gisRtile({
113
113
  width: 256,
114
114
  bbox,
115
115
  ttl,
116
+ format: 'webp',
116
117
  meta,
117
118
  base64: false,
118
119
  debug: query.debug,
@@ -130,7 +131,7 @@ export default async function gisRtile({
130
131
  if (meta) {
131
132
  const accelPath = result.tile_path?.startsWith('/') ? result.tile_path : `/${result.tile_path}`;
132
133
  const metaHeaders = {
133
- 'Content-Type': 'image/png',
134
+ 'Content-Type': 'image/webp',
134
135
  'Cache-Control': query.nocache || query.nottl ? 'no-store, no-cache, must-revalidate' : 'public, max-age=2592000',
135
136
  'X-Accel-Redirect': accelPath,
136
137
  };
@@ -155,7 +156,7 @@ export default async function gisRtile({
155
156
 
156
157
  const buffer = result.data || Buffer.from(result.base64, 'base64');
157
158
 
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);
159
+ return reply.headers({ 'Content-Type': 'image/webp', 'Cache-Control': query.nocache || query.nottl ? 'no-store, no-cache, must-revalidate' : 'public, max-age=2592000' }).send(buffer);
159
160
  }
160
161
  catch (err) {
161
162
  logger.file('rtile/error', {