@opengis/gis 0.2.190 → 0.2.191
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
CHANGED
|
@@ -17,14 +17,14 @@ import { SphericalMercator } from '@mapbox/sphericalmercator';
|
|
|
17
17
|
const mercator = new SphericalMercator({ size: 256 });
|
|
18
18
|
|
|
19
19
|
import {
|
|
20
|
-
getColumnCLS, getTemplate, getMeta,
|
|
21
|
-
pgClients,
|
|
22
|
-
getFilterSQLParametrized,
|
|
20
|
+
getColumnCLS, getTemplate, getMeta, getSelect, pgClients
|
|
23
21
|
} from '@opengis/fastify-table/utils.js';
|
|
24
22
|
|
|
25
23
|
import rootFolder from '../../../plugins/mapnik/funcs/rootFolder.mjs';
|
|
26
24
|
import { NotFoundError } from '@opengis/fastify-table/errors.js';
|
|
27
25
|
|
|
26
|
+
import getFilterSQLParametrized from '../../registers/functions/getFilterSQLParametrized/index.js';
|
|
27
|
+
|
|
28
28
|
const propsCache = {};
|
|
29
29
|
|
|
30
30
|
const types = { point: 'ST_Point' /* ,ST_MultiPoint */, polygon: 'ST_Polygon,ST_MultiPolygon' };
|
|
@@ -72,13 +72,13 @@ export default async function vtile({
|
|
|
72
72
|
const bbox = mercator.bbox(+y, +x, +z, false/* , '900913' */);
|
|
73
73
|
const bbox2d = `'BOX(${bbox[0]} ${bbox[1]},${bbox[2]} ${bbox[3]})'::box2d`;
|
|
74
74
|
|
|
75
|
-
const filterData = queryFilter ? await getFilterSQLParametrized({
|
|
76
|
-
filter: queryFilter, table, filterList, pg,
|
|
77
|
-
}) : { args: [] };
|
|
78
|
-
|
|
79
75
|
// meta
|
|
80
76
|
const metaTable = table ? await getMeta({ pg, table }) : {};
|
|
81
77
|
|
|
78
|
+
const filterData = table && queryFilter ? getFilterSQLParametrized({
|
|
79
|
+
table, fields: metaTable?.columns, filter: queryFilter, filterList,
|
|
80
|
+
}, pg) : { args: [] };
|
|
81
|
+
|
|
82
82
|
const { pk: pkey = data.key, columns = [] } = metaTable; // if view - specify via template
|
|
83
83
|
|
|
84
84
|
// props
|