@opengis/gis 0.2.125 → 0.2.127
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/package.json +1 -1
- package/server/plugins/mapnik/map.proto +1 -0
- package/server/routes/gis/checkXML.js +0 -1
- package/server/routes/mapnik/controllers/createXml.js +1 -1
- package/server/routes/mapnik/controllers/mapnikStat.js +1 -2
- package/server/routes/mapnik/controllers/rasterInfo.js +0 -1
- package/server/routes/mapnik/functions/uploadXML.js +3 -2
package/package.json
CHANGED
|
@@ -53,7 +53,7 @@ export default async function createXml({
|
|
|
53
53
|
// create at xml/:id with name only, always - by path
|
|
54
54
|
const resp = await CreateXML({
|
|
55
55
|
path: relpath,
|
|
56
|
-
name: id, // create additional xml named as primary key at xml directory
|
|
56
|
+
name: [config.mapnik?.folder, id].filter(Boolean).join('/'), // create additional xml named as primary key at xml directory
|
|
57
57
|
previewZoom: data.raster_zoom, // preview<=>detailed, default = 16 if file size > 1GB
|
|
58
58
|
// srid: data.srid, // auto detected if not supplied
|
|
59
59
|
proj4,
|
|
@@ -5,7 +5,7 @@ import mapnik from '../../../plugins/mapnik/funcs/mapnik.js';
|
|
|
5
5
|
const { GetStat } = mapnik();
|
|
6
6
|
|
|
7
7
|
export default async function mapnikStat({
|
|
8
|
-
params,
|
|
8
|
+
params,
|
|
9
9
|
}, reply) {
|
|
10
10
|
if (!config.mapnik?.server) {
|
|
11
11
|
return reply.status(400).send({ error: 'mapnik server address needed', code: 400 });
|
|
@@ -13,7 +13,6 @@ export default async function mapnikStat({
|
|
|
13
13
|
|
|
14
14
|
const stat = await GetStat({
|
|
15
15
|
period: params.period,
|
|
16
|
-
ttl: query.nocache ? '0' : undefined,
|
|
17
16
|
});
|
|
18
17
|
|
|
19
18
|
return reply.status(200).send(stat);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import carto from 'carto';
|
|
2
2
|
|
|
3
|
+
import { config } from '@opengis/fastify-table/utils.js';
|
|
3
4
|
import mapnik from '../../../plugins/mapnik/funcs/mapnik.js';
|
|
4
5
|
|
|
5
6
|
const { UploadXML } = mapnik();
|
|
@@ -98,8 +99,8 @@ export default async function uploadXML({
|
|
|
98
99
|
throw new Error('xml generation error');
|
|
99
100
|
}
|
|
100
101
|
const { status, error } = await UploadXML({
|
|
101
|
-
path: relpath ?
|
|
102
|
-
name: relpath ? null : id,
|
|
102
|
+
path: relpath ? ['vector', config.mapnik?.folder || '', relpath].filter(Boolean).join('/') : null,
|
|
103
|
+
name: relpath ? null : [config.mapnik?.folder, id].filter(Boolean).join('/'),
|
|
103
104
|
xml: xmlFileText,
|
|
104
105
|
}).catch((err) => ({ error: err.toString() }));
|
|
105
106
|
|