@vectoriahq/quac 0.1.0 → 0.3.0-next.1
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 +10 -3
- package/dist/generate/externalStacCatalogue.d.ts +4 -4
- package/dist/generate/externalStacCatalogue.js +9 -11
- package/dist/generate/fileLayerCollection.d.ts +2 -1
- package/dist/generate/fileLayerCollection.js +4 -2
- package/dist/generate/folderStacCatalogue.d.ts +6 -0
- package/dist/generate/folderStacCatalogue.js +10 -2
- package/dist/generate/normalizedProject.d.ts +5 -4
- package/dist/generate/normalizedProject.js +44 -92
- package/dist/generate/ogcFeaturesStacCatalogue.js +1 -1
- package/dist/generate/stacCatalogue.js +23 -21
- package/dist/generate/wmsStacCatalogue.js +5 -16
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/model/QgsProject.d.ts +54 -9
- package/dist/model/Stac.d.ts +8 -6
- package/dist/model/Stac.js +1 -1
- package/dist/model/featureFilter.d.ts +1 -1
- package/dist/model/fieldIconAddress.d.ts +1 -1
- package/dist/model/fieldIconAddress.js +1 -1
- package/dist/model/ogcFeatures.d.ts +3 -3
- package/dist/model/ogcFeatures.js +2 -2
- package/dist/model/quacExtension.d.ts +1 -1
- package/dist/model/quacExtension.js +1 -1
- package/dist/model/stacAssetRoles.d.ts +1 -1
- package/dist/model/stacAssetRoles.js +1 -1
- package/dist/model/stacHref.d.ts +3 -3
- package/dist/model/stacHref.js +3 -3
- package/dist/model/stacPmtiles.d.ts +1 -1
- package/dist/model/stacWms.d.ts +1 -1
- package/dist/model/stacWms.js +1 -1
- package/dist/model/wfs.d.ts +1 -1
- package/dist/parse/geometrySiblings.d.ts +1 -1
- package/dist/parse/geometrySiblings.js +1 -1
- package/dist/parse/parseBrandColour.d.ts +3 -3
- package/dist/parse/parseBrandColour.js +3 -3
- package/dist/parse/parseDataDefinedEditable.js +2 -2
- package/dist/parse/parseLayers.d.ts +5 -2
- package/dist/parse/parseLayers.js +148 -97
- package/dist/parse/parseMeasurement.d.ts +2 -3
- package/dist/parse/parseMeasurement.js +3 -4
- package/dist/parse/parseMergin.d.ts +3 -3
- package/dist/parse/parseMergin.js +8 -5
- package/dist/parse/parseQgsXml.js +10 -3
- package/dist/parse/projectNotes.d.ts +26 -0
- package/dist/parse/projectNotes.js +52 -0
- package/dist/parse/qgisExpression.d.ts +19 -4
- package/dist/parse/qgisExpression.js +58 -13
- package/dist/parse/qtDateFormat.d.ts +3 -3
- package/dist/parse/qtDateFormat.js +3 -3
- package/dist/parse/qtRegex.d.ts +2 -2
- package/dist/parse/qtRegex.js +2 -2
- package/dist/sources/stacItems.d.ts +1 -1
- package/dist/sources/stacItems.js +2 -2
- package/dist/util/devLog.d.ts +1 -2
- package/dist/util/devLog.js +1 -2
- package/dist/util/nonBlankText.d.ts +2 -0
- package/dist/util/nonBlankText.js +4 -0
- package/dist/util/wfsVersions.js +1 -1
- package/package.json +10 -2
- package/src/schema/quac.schema.json +5 -1
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* The package's public API: everything an application imports from
|
|
3
3
|
* `@vectoriahq/quac`.
|
|
4
4
|
*/
|
|
5
|
-
export type { QgsProject, ProjectMetadata, MapExtent, BoundingBox, LayerEntry, EditLock, LayerLocks, LockedEdit, ProjectMeasurement, LayerStyle, LayerResourceMetadata, LayerScaleRange, LayerContact, LayerAttribution, FieldAttachment, FieldCheckbox, FieldConstraintExpression, FieldDefaultExpression, FieldDefaultValue, FieldEditRule, FormLayoutField, LayerFormLayout, FieldFixedValue, FieldRange, FieldUuidFormat, FieldValueMapEntry, DataSource, FileDataSource, WfsDataSource, WmsDataSource, UnsupportedDataSource, LayerTreeNode, LayerGroup, LayerTreeLeaf, QgsRelation, QgsRelationFieldPair } from './model/QgsProject.ts';
|
|
5
|
+
export type { QgsProject, ProjectMetadata, MapExtent, BoundingBox, LayerEntry, EditLock, LayerLocks, LockedEdit, ProjectMeasurement, LayerStyle, LayerResourceMetadata, LayerScaleRange, LayerContact, LayerAttribution, FieldAttachment, FieldCheckbox, FieldConstraintExpression, FieldDefaultExpression, FieldDefaultValue, FieldEditRule, FormLayoutField, LayerFormLayout, FieldFixedValue, FieldRange, FieldUuidFormat, FieldValueMapEntry, DataSource, FileDataSource, WfsDataSource, WmsDataSource, UnsupportedDataSource, LayerTreeNode, LayerGroup, LayerTreeLeaf, QgsRelation, QgsRelationFieldPair, ProjectNote, ProjectNoteReason } from './model/QgsProject.ts';
|
|
6
6
|
export type { StacCatalog, StacCollection, StacItem, StacAsset, StacExtent, StacLink, StacObject, StacProvider, TableColumn, TableColumnType, TableColumnValue, TableColumnValueRelation, TableColumnAttachment, TableColumnCheckbox, TableColumnRange } from './model/Stac.ts';
|
|
7
7
|
export { STAC_VERSION } from './model/Stac.ts';
|
|
8
8
|
export { isIconLibraryAddress, resolveFieldIconAddress } from './model/fieldIconAddress.ts';
|
|
@@ -59,7 +59,7 @@ export type { StacWmtsSource } from './model/stacWmts.ts';
|
|
|
59
59
|
export { VECTOR_TILE_MEDIA_TYPE, buildXyzLink, readCollectionXyzLink, readCollectionXyzTemplate } from './model/stacXyz.ts';
|
|
60
60
|
export type { ActiveWfsLayer, WfsCapabilities, WfsDescribeFeatureTypeSchema, WfsFeatureTypeOperationsSupport, WfsFeatureTypeSummary, WfsFieldKind, WfsFieldSchema, WfsOperationName, WfsTransactionOperation, WfsTransactionResult, WfsValidationError, WfsWgs84BoundingBox } from './model/wfs.ts';
|
|
61
61
|
export { parseProjectMeasurement } from './parse/parseMeasurement.ts';
|
|
62
|
-
export { GEOMETRY_VALUES, LAYER_LOOKUP, QGIS_CONDITION, expressionToGeoStylerFunction, expressionToTemplate, isQgisConditionFilter, qgisConditionToFilter, readCurrentValueFields, readLayerLookups, readQgisExpression } from './parse/qgisExpression.ts';
|
|
62
|
+
export { EXPRESSION_VARIABLE, GEOMETRY_VALUES, LAYER_LOOKUP, QGIS_CONDITION, expressionToGeoStylerFunction, expressionToTemplate, isQgisConditionFilter, qgisConditionToFilter, readCurrentValueFields, readLayerLookups, readQgisExpression } from './parse/qgisExpression.ts';
|
|
63
63
|
export type { ExpressionNode, LayerLookup } from './parse/qgisExpression.ts';
|
|
64
64
|
export { formatQtDateTime, qtDatePart, readQtDateTime, splitQtDatePattern } from './parse/qtDateFormat.ts';
|
|
65
65
|
export { compileQtRegex, replaceQtRegex } from './parse/qtRegex.ts';
|
package/dist/index.js
CHANGED
|
@@ -38,7 +38,7 @@ export { WEB_MAP_LINKS_EXTENSION, buildWmsLink, readCollectionWms, wmsEndpoint }
|
|
|
38
38
|
export { readCollectionWmts, wmtsCapabilitiesUrl } from "./model/stacWmts.js";
|
|
39
39
|
export { VECTOR_TILE_MEDIA_TYPE, buildXyzLink, readCollectionXyzLink, readCollectionXyzTemplate } from "./model/stacXyz.js";
|
|
40
40
|
export { parseProjectMeasurement } from "./parse/parseMeasurement.js";
|
|
41
|
-
export { GEOMETRY_VALUES, LAYER_LOOKUP, QGIS_CONDITION, expressionToGeoStylerFunction, expressionToTemplate, isQgisConditionFilter, qgisConditionToFilter, readCurrentValueFields, readLayerLookups, readQgisExpression } from "./parse/qgisExpression.js";
|
|
41
|
+
export { EXPRESSION_VARIABLE, GEOMETRY_VALUES, LAYER_LOOKUP, QGIS_CONDITION, expressionToGeoStylerFunction, expressionToTemplate, isQgisConditionFilter, qgisConditionToFilter, readCurrentValueFields, readLayerLookups, readQgisExpression } from "./parse/qgisExpression.js";
|
|
42
42
|
export { formatQtDateTime, qtDatePart, readQtDateTime, splitQtDatePattern } from "./parse/qtDateFormat.js";
|
|
43
43
|
export { compileQtRegex, replaceQtRegex } from "./parse/qtRegex.js";
|
|
44
44
|
export { cloneCatalogShallow, collectAllCollections, resolveDocumentHrefs, withSelfLink } from "./sources/stacDocuments.js";
|
|
@@ -35,7 +35,7 @@ export interface QgsProject {
|
|
|
35
35
|
layerTree: LayerGroup;
|
|
36
36
|
/** Relations from <relations>, each joining a parent layer to a child layer. */
|
|
37
37
|
relations?: QgsRelation[];
|
|
38
|
-
/** Project-level <projectMetadata>, as far as
|
|
38
|
+
/** Project-level <projectMetadata>, as far as QUAC reads it. */
|
|
39
39
|
metadata: ProjectMetadata;
|
|
40
40
|
/** The area and distance units `$area`, `$length` and `$perimeter` are given in; null where the project saves none. */
|
|
41
41
|
measurement?: ProjectMeasurement | null;
|
|
@@ -60,11 +60,54 @@ export interface QgsProject {
|
|
|
60
60
|
* (`parseMerginFilters`); absent or empty where it sets none.
|
|
61
61
|
*/
|
|
62
62
|
merginFilters?: PresetFilter[];
|
|
63
|
+
/**
|
|
64
|
+
* The project's settings that `generateStacCatalogue` does not carry into the
|
|
65
|
+
* catalogue (`ProjectNote`); absent or empty where it carries them all. The
|
|
66
|
+
* notes are not written into the catalogue.
|
|
67
|
+
*/
|
|
68
|
+
notes?: ProjectNote[];
|
|
63
69
|
/** Original full QGS XML, retained so future parsers can re-mine without re-loading. */
|
|
64
70
|
rawXml: string | null;
|
|
65
71
|
}
|
|
66
72
|
/**
|
|
67
|
-
*
|
|
73
|
+
* Why a project's setting is not in its catalogue:
|
|
74
|
+
*
|
|
75
|
+
* - `widget`: a field's edit widget is not read, by its type, or is read but
|
|
76
|
+
* holds nothing the catalogue can carry: an Attachment that picks a folder or
|
|
77
|
+
* several files, or a Value Relation lacking its lookup layer, key or value.
|
|
78
|
+
* - `default`: a field's default value expression is not read.
|
|
79
|
+
* - `constraint`: a field's constraint expression is not read.
|
|
80
|
+
* - `value-relation`: a field's Value Relation names a lookup layer the
|
|
81
|
+
* project does not hold.
|
|
82
|
+
* - `source`: a layer's data source is not one the catalogue can address,
|
|
83
|
+
* such as a database or a service that needs a login. The layer's
|
|
84
|
+
* Collection has no data asset.
|
|
85
|
+
* - `relation`: a relation names a layer the project does not hold.
|
|
86
|
+
* - `filter`: a Mergin Maps filter is a `Text` filter, or names a layer the
|
|
87
|
+
* project does not hold or a field its layer does not have.
|
|
88
|
+
* - `layer`: a layer could not be read at all, and has no Collection.
|
|
89
|
+
*/
|
|
90
|
+
export type ProjectNoteReason = 'widget' | 'default' | 'constraint' | 'value-relation' | 'source' | 'relation' | 'filter' | 'layer';
|
|
91
|
+
/** One setting of a project that its catalogue does not carry. */
|
|
92
|
+
export interface ProjectNote {
|
|
93
|
+
/** The id of the layer the setting belongs to: a relation's child layer, a filter's layer. */
|
|
94
|
+
layerId: string;
|
|
95
|
+
/** That layer's name; empty where the project holds no layer with the id. */
|
|
96
|
+
layerName: string;
|
|
97
|
+
/** The field the setting belongs to; null for a setting of the layer. */
|
|
98
|
+
field: string | null;
|
|
99
|
+
reason: ProjectNoteReason;
|
|
100
|
+
/**
|
|
101
|
+
* The setting's own text, where it says what was not carried: the widget's
|
|
102
|
+
* type, the expression, the lookup layer's name, the source's provider, the
|
|
103
|
+
* relation's name or the filter's type. Null otherwise. A data source's
|
|
104
|
+
* address is never given, because a database connection can hold a user name
|
|
105
|
+
* and password.
|
|
106
|
+
*/
|
|
107
|
+
text: string | null;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* The parts of QGIS's project-level `<projectMetadata>` this package reads.
|
|
68
111
|
* QGIS's own dialog (Project Properties > Metadata) writes the element on
|
|
69
112
|
* every project, empty fields and all — `abstract` and `author` are null only
|
|
70
113
|
* when the author left them blank, checked against a saved QGIS project
|
|
@@ -197,7 +240,7 @@ export interface LayerEntry {
|
|
|
197
240
|
styles: LayerStyle[];
|
|
198
241
|
/** Index into styles[] of the active style; -1 if no styles were captured. */
|
|
199
242
|
activeStyleIndex: number;
|
|
200
|
-
/** The layer's `<resourceMetadata>`, as far as
|
|
243
|
+
/** The layer's `<resourceMetadata>`, as far as QUAC reads it. */
|
|
201
244
|
resourceMetadata: LayerResourceMetadata;
|
|
202
245
|
/** The layer's `<attribution>` element — a credit line, separate from resourceMetadata. */
|
|
203
246
|
attribution: LayerAttribution | null;
|
|
@@ -231,7 +274,7 @@ export interface LayerEntry {
|
|
|
231
274
|
fieldAttachments: Record<string, FieldAttachment>;
|
|
232
275
|
/**
|
|
233
276
|
* What the Attributes Form says about changing each field: whether its
|
|
234
|
-
* Editable box is unticked, and a default value
|
|
277
|
+
* Editable box is unticked, and a default value an application can fill in.
|
|
235
278
|
* Fields with neither are absent.
|
|
236
279
|
*/
|
|
237
280
|
fieldEditRules: Record<string, FieldEditRule>;
|
|
@@ -303,7 +346,7 @@ export interface WfsTransactionLayers {
|
|
|
303
346
|
delete: string[];
|
|
304
347
|
}
|
|
305
348
|
/**
|
|
306
|
-
* The parts of QGIS's per-layer `<resourceMetadata>`
|
|
349
|
+
* The parts of QGIS's per-layer `<resourceMetadata>` this package reads.
|
|
307
350
|
* `abstract`, `contacts` and `temporalInterval`'s `<period>` shape verified
|
|
308
351
|
* against a saved QGIS project, whose `<resourceMetadata>`
|
|
309
352
|
* has those fields written but empty on that fixture. `<license>` and
|
|
@@ -355,7 +398,7 @@ export interface FieldValueMapEntry {
|
|
|
355
398
|
label: string;
|
|
356
399
|
}
|
|
357
400
|
/**
|
|
358
|
-
* A field's Value Relation edit widget, as far as
|
|
401
|
+
* A field's Value Relation edit widget, as far as QUAC reads it: the
|
|
359
402
|
* lookup layer it names, the fields stored and shown, and how the list is
|
|
360
403
|
* filtered and ordered. The widget's group, description, column count and
|
|
361
404
|
* completer settings are not read.
|
|
@@ -383,7 +426,7 @@ export interface FieldValueRelation {
|
|
|
383
426
|
descending: boolean;
|
|
384
427
|
}
|
|
385
428
|
/**
|
|
386
|
-
* A field's Attachment edit widget, as far as
|
|
429
|
+
* A field's Attachment edit widget, as far as QUAC reads it. QGIS calls
|
|
387
430
|
* the widget `ExternalResource`; the field holds a file's path rather than
|
|
388
431
|
* text.
|
|
389
432
|
*/
|
|
@@ -397,7 +440,7 @@ export interface FieldAttachment {
|
|
|
397
440
|
/** What a stored path is relative to. */
|
|
398
441
|
relativeStorage: 'absolute' | 'project' | 'default-root';
|
|
399
442
|
}
|
|
400
|
-
/** A layer's Drag and Drop Designer form, as far as
|
|
443
|
+
/** A layer's Drag and Drop Designer form, as far as QUAC reads it: which fields it places, in its order. */
|
|
401
444
|
export interface LayerFormLayout {
|
|
402
445
|
fields: FormLayoutField[];
|
|
403
446
|
}
|
|
@@ -422,7 +465,7 @@ export interface FormLayoutField {
|
|
|
422
465
|
export interface FieldEditRule {
|
|
423
466
|
/** True where the source shows the field but does not let anyone change it. */
|
|
424
467
|
readOnly: boolean;
|
|
425
|
-
/** The value the field is filled with, or null where the source declares none
|
|
468
|
+
/** The value the field is filled with, or null where the source declares none an application can fill. */
|
|
426
469
|
defaultValue: FieldDefaultValue | null;
|
|
427
470
|
/**
|
|
428
471
|
* The field's Not null constraint: `enforced` refuses a blank, `warn` lets
|
|
@@ -478,6 +521,8 @@ export interface FieldEditRule {
|
|
|
478
521
|
dateFormat?: string | null;
|
|
479
522
|
/** True where the field holds a colour: a QGIS Color widget. */
|
|
480
523
|
colour?: boolean;
|
|
524
|
+
/** True where the source's search of a layer's features skips the field: QGIS's Not searchable. */
|
|
525
|
+
notSearchable?: boolean;
|
|
481
526
|
/** The `https://` address of the icon drawn beside the field's name. Null or absent where it has none. */
|
|
482
527
|
icon?: string | null;
|
|
483
528
|
/** The control the edit form draws the field's choices with. Null or absent where the source asks for none. */
|
package/dist/model/Stac.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Minimal STAC type definitions for the documents
|
|
2
|
+
* Minimal STAC type definitions for the documents this package generates.
|
|
3
3
|
*
|
|
4
4
|
* The shape these types describe — a Catalog of Collections, one Collection
|
|
5
5
|
* per layer, vendor fields under `quac:` —
|
|
@@ -53,8 +53,8 @@ export interface StacCollection {
|
|
|
53
53
|
/**
|
|
54
54
|
* An organisation that had a hand in the Collection's data. STAC's `roles` are
|
|
55
55
|
* `licensor`, `producer`, `processor` and `host`. This is where credit lines
|
|
56
|
-
* come from — the
|
|
57
|
-
*
|
|
56
|
+
* come from — an application reading the catalogue builds the on-screen
|
|
57
|
+
* attribution out of these names and URLs, and no pre-written string is stored.
|
|
58
58
|
*/
|
|
59
59
|
export interface StacProvider {
|
|
60
60
|
name: string;
|
|
@@ -68,7 +68,7 @@ export interface StacProvider {
|
|
|
68
68
|
* why `packages/quac/src/sources/stacItems.ts` exists: a Collection served by an API
|
|
69
69
|
* has no downloadable asset, and the Items inside it have them all.
|
|
70
70
|
*
|
|
71
|
-
* Only the fields
|
|
71
|
+
* Only the fields this package reads are named. `properties.datetime` is what
|
|
72
72
|
* orders an item list. An Item may have `start_datetime` / `end_datetime`
|
|
73
73
|
* instead; which of the three STAC requires was not established here — no
|
|
74
74
|
* specification document was reachable — so `readItemTimestamp` takes
|
|
@@ -137,7 +137,7 @@ export interface TableColumn {
|
|
|
137
137
|
* precedence when both are present.
|
|
138
138
|
*/
|
|
139
139
|
title?: string;
|
|
140
|
-
/** The column's type: the `TableColumnType` an adapter maps the source's type to, or, for a QGIS Server type
|
|
140
|
+
/** The column's type: the `TableColumnType` an adapter maps the source's type to, or, for a QGIS Server type this package does not map, its lowercased type name. */
|
|
141
141
|
type?: string;
|
|
142
142
|
/** The column's type as a STAC common metadata data type, written beside a `type` that maps to one. */
|
|
143
143
|
data_type?: TableColumnDataType;
|
|
@@ -156,6 +156,8 @@ export interface TableColumn {
|
|
|
156
156
|
'quac:constraints'?: TableColumnConstraints;
|
|
157
157
|
/** Written only as `true`: the source's form never shows the column. */
|
|
158
158
|
'quac:hidden'?: true;
|
|
159
|
+
/** Written only as `false`: a search of the layer's features skips the column. */
|
|
160
|
+
'quac:searchable'?: false;
|
|
159
161
|
/** Written only as `true`: a new feature is offered the value last entered in the column. */
|
|
160
162
|
'quac:reuse_last_value'?: true;
|
|
161
163
|
/**
|
|
@@ -285,7 +287,7 @@ export interface TableColumnConstraints {
|
|
|
285
287
|
strength: 'enforced' | 'warn';
|
|
286
288
|
};
|
|
287
289
|
}
|
|
288
|
-
/** The column types
|
|
290
|
+
/** The column types the adapters map a source's declared field types to. */
|
|
289
291
|
export type TableColumnType = 'string' | 'int' | 'long' | 'double' | 'boolean' | 'date' | 'time' | 'timestamp';
|
|
290
292
|
/**
|
|
291
293
|
* The STAC common metadata data types a `TableColumnType` maps to. STAC names
|
package/dist/model/Stac.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Minimal STAC type definitions for the documents
|
|
2
|
+
* Minimal STAC type definitions for the documents this package generates.
|
|
3
3
|
*
|
|
4
4
|
* The shape these types describe — a Catalog of Collections, one Collection
|
|
5
5
|
* per layer, vendor fields under `quac:` —
|
|
@@ -6,7 +6,7 @@ import type { StacCollection } from './Stac.ts';
|
|
|
6
6
|
*
|
|
7
7
|
* Its language is the one the layer's provider reads. OGR writes it as
|
|
8
8
|
* `|subset=` at the end of the data source and hands it to GDAL, whose SQL
|
|
9
|
-
* this is for every file
|
|
9
|
+
* this is for every file read through OGR (`QgsOgrProviderMetadata::decodeUri`,
|
|
10
10
|
* `src/core/providers/ogr/qgsogrprovidermetadata.cpp`, `qgis/QGIS@master`, read
|
|
11
11
|
* 2026-10-26). The Delimited Text provider writes it as the `subset` query
|
|
12
12
|
* item and reads it as a QGIS expression (`QgsDelimitedTextProvider`,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The icon libraries
|
|
2
|
+
* The icon libraries this package addresses on jsDelivr, each pinned to the major
|
|
3
3
|
* version of its package, so a release adds icons but never renames one. A
|
|
4
4
|
* field's icon is named from them, and a
|
|
5
5
|
* map symbol from one of them is painted in its style's colour. This
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The icon libraries
|
|
2
|
+
* The icon libraries this package addresses on jsDelivr, each pinned to the major
|
|
3
3
|
* version of its package, so a release adds icons but never renames one. A
|
|
4
4
|
* field's icon is named from them, and a
|
|
5
5
|
* map symbol from one of them is painted in its style's colour. This
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The parts of an OGC API - Features service's JSON this
|
|
3
|
-
* from
|
|
2
|
+
* The parts of an OGC API - Features service's JSON this package reads. Kept
|
|
3
|
+
* apart from any OGC API - Features client so the STAC generators can describe a
|
|
4
4
|
* collection without importing anything that fetches.
|
|
5
5
|
*/
|
|
6
6
|
export interface OgcLink {
|
|
@@ -10,7 +10,7 @@ export interface OgcLink {
|
|
|
10
10
|
title?: string;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
* What a collection holds. `feature` is the only kind
|
|
13
|
+
* What a collection holds. `feature` is the only kind that holds features to load —
|
|
14
14
|
* `record` is a catalogue's index of itself (OGC API - Records) and `coverage`
|
|
15
15
|
* is raster, which has no `items` endpoint to read.
|
|
16
16
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The parts of an OGC API - Features service's JSON this
|
|
3
|
-
* from
|
|
2
|
+
* The parts of an OGC API - Features service's JSON this package reads. Kept
|
|
3
|
+
* apart from any OGC API - Features client so the STAC generators can describe a
|
|
4
4
|
* collection without importing anything that fetches.
|
|
5
5
|
*/
|
|
6
6
|
export {};
|
|
@@ -4,7 +4,7 @@ import type { StacCatalog, StacCollection } from './Stac.ts';
|
|
|
4
4
|
* `stac_extensions` to say which QUAC it follows. Written from this one
|
|
5
5
|
* constant, so the address changes in one place when the schema moves.
|
|
6
6
|
*/
|
|
7
|
-
export declare const QUAC_SCHEMA_URL = "https://vectoriahq.github.io/quac/v0.
|
|
7
|
+
export declare const QUAC_SCHEMA_URL = "https://vectoriahq.github.io/quac/v0.2.0/schema.json";
|
|
8
8
|
/**
|
|
9
9
|
* The QUAC version a document declares, such as `0.1.0`, read from the QUAC
|
|
10
10
|
* schema address in its `stac_extensions`. Null where it lists none.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* `stac_extensions` to say which QUAC it follows. Written from this one
|
|
4
4
|
* constant, so the address changes in one place when the schema moves.
|
|
5
5
|
*/
|
|
6
|
-
export const QUAC_SCHEMA_URL = 'https://vectoriahq.github.io/quac/v0.
|
|
6
|
+
export const QUAC_SCHEMA_URL = 'https://vectoriahq.github.io/quac/v0.2.0/schema.json';
|
|
7
7
|
// A QUAC schema address is a folder named for its version, holding the
|
|
8
8
|
// schema file `QUAC_SCHEMA_URL` names. Only the path is matched, not the host.
|
|
9
9
|
const QUAC_SCHEMA_FILE = QUAC_SCHEMA_URL.slice(QUAC_SCHEMA_URL.lastIndexOf('/'));
|
|
@@ -4,7 +4,7 @@ import type { StacAsset, StacCollection } from './Stac.ts';
|
|
|
4
4
|
*
|
|
5
5
|
* Portolan addresses assets by role rather than by key
|
|
6
6
|
* (the Portolan convention): `data` is the primary file, `visual`
|
|
7
|
-
* a rendering derivative, `style` a visualisation style.
|
|
7
|
+
* a rendering derivative, `style` a visualisation style. This package's own
|
|
8
8
|
* generators write the primary file under the `data` key *and* the `data` role,
|
|
9
9
|
* so the key stands as the fallback for a document that declares no roles at
|
|
10
10
|
* all — which an external catalogue is free to do.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Portolan addresses assets by role rather than by key
|
|
5
5
|
* (the Portolan convention): `data` is the primary file, `visual`
|
|
6
|
-
* a rendering derivative, `style` a visualisation style.
|
|
6
|
+
* a rendering derivative, `style` a visualisation style. This package's own
|
|
7
7
|
* generators write the primary file under the `data` key *and* the `data` role,
|
|
8
8
|
* so the key stands as the fallback for a document that declares no roles at
|
|
9
9
|
* all — which an external catalogue is free to do.
|
package/dist/model/stacHref.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type { StacCollection } from './Stac.ts';
|
|
|
4
4
|
*
|
|
5
5
|
* An href is a URI reference, not a file path, so the characters URIs reserve
|
|
6
6
|
* have to be escaped in it. `#` and `?` are the two that bite: both are legal
|
|
7
|
-
* in a
|
|
7
|
+
* in a cloud folder's file names, and both end the path when
|
|
8
8
|
* a reader takes an href apart. A folder holding `Building #3.geojson` written
|
|
9
9
|
* unescaped publishes `./Building #3.geojson`, which reads back as `Building `
|
|
10
10
|
* — a file no folder holds, so the layer is dropped.
|
|
@@ -38,8 +38,8 @@ export declare function isRelativeHref(href: string): boolean;
|
|
|
38
38
|
* — the counterpart of the data asset both the QGIS project and the folder
|
|
39
39
|
* generators write.
|
|
40
40
|
*
|
|
41
|
-
* Returns null
|
|
42
|
-
*
|
|
41
|
+
* Returns null where there is no data asset, or its href is not a relative
|
|
42
|
+
* path: a WFS GetFeature URL or any other absolute address. Those are
|
|
43
43
|
* not files in the folder, so there is nothing here to look up.
|
|
44
44
|
*/
|
|
45
45
|
export declare function readCollectionDataPath(collection: StacCollection): string | null;
|
package/dist/model/stacHref.js
CHANGED
|
@@ -4,7 +4,7 @@ import { readDataAsset } from "./stacAssetRoles.js";
|
|
|
4
4
|
*
|
|
5
5
|
* An href is a URI reference, not a file path, so the characters URIs reserve
|
|
6
6
|
* have to be escaped in it. `#` and `?` are the two that bite: both are legal
|
|
7
|
-
* in a
|
|
7
|
+
* in a cloud folder's file names, and both end the path when
|
|
8
8
|
* a reader takes an href apart. A folder holding `Building #3.geojson` written
|
|
9
9
|
* unescaped publishes `./Building #3.geojson`, which reads back as `Building `
|
|
10
10
|
* — a file no folder holds, so the layer is dropped.
|
|
@@ -47,8 +47,8 @@ export function isRelativeHref(href) {
|
|
|
47
47
|
* — the counterpart of the data asset both the QGIS project and the folder
|
|
48
48
|
* generators write.
|
|
49
49
|
*
|
|
50
|
-
* Returns null
|
|
51
|
-
*
|
|
50
|
+
* Returns null where there is no data asset, or its href is not a relative
|
|
51
|
+
* path: a WFS GetFeature URL or any other absolute address. Those are
|
|
52
52
|
* not files in the folder, so there is nothing here to look up.
|
|
53
53
|
*/
|
|
54
54
|
export function readCollectionDataPath(collection) {
|
|
@@ -20,7 +20,7 @@ export interface StacPmtilesSource {
|
|
|
20
20
|
/**
|
|
21
21
|
* Layer names inside the archive to draw, from the link's `pmtiles:layers`.
|
|
22
22
|
* Empty where the source declares none — web-map-links leaves the choice to
|
|
23
|
-
* the reader in that case,
|
|
23
|
+
* the reader in that case, which may draw every layer the archive has.
|
|
24
24
|
*/
|
|
25
25
|
layers: string[];
|
|
26
26
|
}
|
package/dist/model/stacWms.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { WmsDataSource } from './QgsProject.ts';
|
|
|
2
2
|
import type { StacCollection, StacLink } from './Stac.ts';
|
|
3
3
|
/**
|
|
4
4
|
* The CRS a QGIS Server layer is requested in: the map's own when the server
|
|
5
|
-
* offers it, so the server draws it without the
|
|
5
|
+
* offers it, so the server draws it without the reading application reprojecting the image.
|
|
6
6
|
*/
|
|
7
7
|
export declare const PREFERRED_WMS_CRS = "EPSG:3857";
|
|
8
8
|
/** The CRS a WMS link asks for from the CRSs its server offers: `PREFERRED_WMS_CRS` where it is offered or none is listed, else the first. */
|
package/dist/model/stacWms.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The CRS a QGIS Server layer is requested in: the map's own when the server
|
|
3
|
-
* offers it, so the server draws it without the
|
|
3
|
+
* offers it, so the server draws it without the reading application reprojecting the image.
|
|
4
4
|
*/
|
|
5
5
|
export const PREFERRED_WMS_CRS = 'EPSG:3857';
|
|
6
6
|
/** The CRS a WMS link asks for from the CRSs its server offers: `PREFERRED_WMS_CRS` where it is offered or none is listed, else the first. */
|
package/dist/model/wfs.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FeatureFilter } from './featureFilter.ts';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* The high-level WFS operation names this package models.
|
|
4
4
|
*/
|
|
5
5
|
export type WfsOperationName = 'GetCapabilities' | 'DescribeFeatureType' | 'GetFeature' | 'Transaction';
|
|
6
6
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { FileDataSource, LayerEntry, QgsProject } from '../model/QgsProject.ts';
|
|
2
2
|
/**
|
|
3
3
|
* The project's layers that QGIS split out of one file by shape, which
|
|
4
|
-
*
|
|
4
|
+
* the catalogue publishes as one layer: file layers whose sources are the same but
|
|
5
5
|
* for `|geometrytype=`, each naming a different shape. Keyed by each sibling's
|
|
6
6
|
* layer id, the value lists the whole set in the project's layer order (the
|
|
7
7
|
* layers panel, then layers it does not list, in file order), so its first
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { GEOMETRY_TYPE_OPTION } from "./parseDataSource.js";
|
|
2
2
|
/**
|
|
3
3
|
* The project's layers that QGIS split out of one file by shape, which
|
|
4
|
-
*
|
|
4
|
+
* the catalogue publishes as one layer: file layers whose sources are the same but
|
|
5
5
|
* for `|geometrytype=`, each naming a different shape. Keyed by each sibling's
|
|
6
6
|
* layer id, the value lists the whole set in the project's layer order (the
|
|
7
7
|
* layers panel, then layers it does not list, in file order), so its first
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** The project colour label
|
|
1
|
+
/** The project colour label this package reads as the map's brand colour, compared ignoring case. */
|
|
2
2
|
export declare const BRAND_COLOUR_LABEL = "Brand";
|
|
3
3
|
/**
|
|
4
4
|
* The project colour labelled {@link BRAND_COLOUR_LABEL} (Project Properties >
|
|
@@ -8,7 +8,7 @@ export declare const BRAND_COLOUR_LABEL = "Brand";
|
|
|
8
8
|
* `src/core/project/qgsproject.cpp`), each colour in
|
|
9
9
|
* `QgsColorUtils::colorToString` form, which starts `r,g,b,a,`
|
|
10
10
|
* (`src/core/qgscolorutils.cpp`, `qgis/QGIS@master`, read 2026-10-25). The
|
|
11
|
-
* first matching label wins. The
|
|
12
|
-
* colours of its own.
|
|
11
|
+
* first matching label wins. The reading application decodes the text: this
|
|
12
|
+
* package reads no colours of its own.
|
|
13
13
|
*/
|
|
14
14
|
export declare function parseBrandColour(qgisRoot: Element): string | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { propertyList, readPropertyBlock } from "./projectProperties.js";
|
|
2
|
-
/** The project colour label
|
|
2
|
+
/** The project colour label this package reads as the map's brand colour, compared ignoring case. */
|
|
3
3
|
export const BRAND_COLOUR_LABEL = 'Brand';
|
|
4
4
|
/**
|
|
5
5
|
* The project colour labelled {@link BRAND_COLOUR_LABEL} (Project Properties >
|
|
@@ -9,8 +9,8 @@ export const BRAND_COLOUR_LABEL = 'Brand';
|
|
|
9
9
|
* `src/core/project/qgsproject.cpp`), each colour in
|
|
10
10
|
* `QgsColorUtils::colorToString` form, which starts `r,g,b,a,`
|
|
11
11
|
* (`src/core/qgscolorutils.cpp`, `qgis/QGIS@master`, read 2026-10-25). The
|
|
12
|
-
* first matching label wins. The
|
|
13
|
-
* colours of its own.
|
|
12
|
+
* first matching label wins. The reading application decodes the text: this
|
|
13
|
+
* package reads no colours of its own.
|
|
14
14
|
*/
|
|
15
15
|
export function parseBrandColour(qgisRoot) {
|
|
16
16
|
const palette = readPropertyBlock(qgisRoot, 'Palette');
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isTrueValue } from "./customProperties.js";
|
|
1
2
|
/**
|
|
2
3
|
* Reads each field's active data-defined **Editable** property, the button
|
|
3
4
|
* beside a field's Editable box in QGIS's Attributes Form, as one QGIS
|
|
@@ -61,8 +62,7 @@ function readProperty(property) {
|
|
|
61
62
|
return null;
|
|
62
63
|
switch (Number.parseInt(values.get('type') ?? '', 10)) {
|
|
63
64
|
case 1: {
|
|
64
|
-
|
|
65
|
-
return value === '' || value === '0' || value === 'false' ? 'false' : 'true';
|
|
65
|
+
return isTrueValue((values.get('val') ?? '').trim()) ? 'true' : 'false';
|
|
66
66
|
}
|
|
67
67
|
case 2: {
|
|
68
68
|
const field = values.get('field')?.trim();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LayerEntry } from '../model/QgsProject.ts';
|
|
1
|
+
import type { LayerEntry, ProjectNote } from '../model/QgsProject.ts';
|
|
2
2
|
/**
|
|
3
3
|
* Parses the <projectlayers> block into a list of LayerEntry. Annotation
|
|
4
4
|
* layers (<main-annotation-layer>) are filtered out — they're QGIS's drawing
|
|
@@ -19,5 +19,8 @@ import type { LayerEntry } from '../model/QgsProject.ts';
|
|
|
19
19
|
*
|
|
20
20
|
* On any per-layer failure the layer is skipped (logged via devLog) so a
|
|
21
21
|
* single bad layer doesn't take down the whole project.
|
|
22
|
+
*
|
|
23
|
+
* Each setting a layer holds that its Collection will not carry is added to
|
|
24
|
+
* `notes` (`ProjectNote`), as is each layer skipped.
|
|
22
25
|
*/
|
|
23
|
-
export declare function parseProjectLayers(qgisRoot: Element): LayerEntry[];
|
|
26
|
+
export declare function parseProjectLayers(qgisRoot: Element, notes?: ProjectNote[]): LayerEntry[];
|