@camptocamp/ogc-client
Advanced tools
Comparing version 1.1.1-dev.02b9b14 to 1.1.1-dev.4369f6c
@@ -96,2 +96,6 @@ import { | ||
).map(getElementText); | ||
const keywords = serviceVersion.startsWith("1.0") ? getElementText(findChildElement(featureTypeEl, "Keywords")).split(",").map((keyword) => keyword.trim()) : findChildrenElement( | ||
findChildElement(featureTypeEl, "Keywords"), | ||
"Keyword" | ||
).map(getElementText).filter((v, i, arr) => arr.indexOf(v) === i); | ||
return { | ||
@@ -106,3 +110,4 @@ name: getElementText(findChildElement(featureTypeEl, "Name")), | ||
outputFormats: outputFormats.length > 0 ? outputFormats : defaultOutputFormats, | ||
latLonBoundingBox: serviceVersion.startsWith("1.0") ? parseBBox100() : parseBBox() | ||
latLonBoundingBox: serviceVersion.startsWith("1.0") ? parseBBox100() : parseBBox(), | ||
keywords | ||
}; | ||
@@ -109,0 +114,0 @@ } |
@@ -96,3 +96,4 @@ import { | ||
otherCrs: featureType.otherCrs, | ||
outputFormats: featureType.outputFormats | ||
outputFormats: featureType.outputFormats, | ||
keywords: featureType.keywords | ||
}; | ||
@@ -99,0 +100,0 @@ } |
@@ -14,3 +14,4 @@ import { | ||
outputFormats, | ||
latLonBoundingBox: boundingBox | ||
latLonBoundingBox: boundingBox, | ||
keywords | ||
} = featureType; | ||
@@ -52,3 +53,4 @@ const hitsAttr = serviceVersion.startsWith("2.0") ? "numberMatched" : "numberOfFeatures"; | ||
...geometryType && { geometryType }, | ||
...!Number.isNaN(objectCount) && { objectCount } | ||
...!Number.isNaN(objectCount) && { objectCount }, | ||
...keywords && { keywords } | ||
}; | ||
@@ -55,0 +57,0 @@ } |
@@ -78,2 +78,6 @@ import { | ||
boundingBoxes = Object.keys(boundingBoxes).length > 0 || inheritedBoundingBoxes === null ? boundingBoxes : inheritedBoundingBoxes; | ||
const keywords = findChildrenElement( | ||
findChildElement(layerEl, "KeywordList"), | ||
"Keyword" | ||
).map(getElementText).filter((v, i, arr) => arr.indexOf(v) === i); | ||
const children = findChildrenElement(layerEl, "Layer").map( | ||
@@ -90,2 +94,3 @@ (layer) => parseLayer(layer, version, availableCrs, styles, attribution, boundingBoxes) | ||
boundingBoxes, | ||
keywords, | ||
...children.length && { children } | ||
@@ -92,0 +97,0 @@ }; |
{ | ||
"name": "@camptocamp/ogc-client", | ||
"version": "1.1.1-dev.02b9b14", | ||
"version": "1.1.1-dev.4369f6c", | ||
"description": "A pure JS library for interacting with geospatial services.", | ||
@@ -5,0 +5,0 @@ "main": "./dist/dist-node.js", |
@@ -134,16 +134,26 @@ import { Geometry } from 'geojson'; | ||
} | ||
export interface OgcApiRecordLanguage { | ||
code: string; | ||
name?: string; | ||
alternate?: string; | ||
dir: 'ltr' | 'rtl' | 'ttb' | 'btt'; | ||
} | ||
export interface OgcApiRecordProperties { | ||
created?: Date; | ||
updated?: Date; | ||
type: string; | ||
title: string; | ||
recordCreated?: Date; | ||
recordUpdated?: Date; | ||
providers?: string[]; | ||
description?: string; | ||
externalId?: OgcApiItemExternalId[]; | ||
keywords?: string[]; | ||
themes?: OgcApiRecordTheme[]; | ||
keywords?: string[]; | ||
language?: string; | ||
language?: OgcApiRecordLanguage; | ||
languages?: OgcApiRecordLanguage[]; | ||
resourceLanguages?: OgcApiRecordLanguage[]; | ||
externalIds?: OgcApiItemExternalId[]; | ||
formats?: string[]; | ||
contacts?: OgcApiRecordContact[]; | ||
formats?: string[]; | ||
license?: string; | ||
rights?: string; | ||
providers?: string[]; | ||
} | ||
@@ -150,0 +160,0 @@ |
@@ -38,2 +38,3 @@ import { parseXmlString } from '../shared/xml-utils.js'; | ||
defaultCrs: 'EPSG:2154', | ||
keywords: ['features', 'rpg2010'], | ||
latLonBoundingBox: [ | ||
@@ -57,2 +58,3 @@ -1.9540704007796161, 42.73286181824404, 1.496463327812538, | ||
defaultCrs: 'EPSG:2154', | ||
keywords: ['features', 'comptages_routiers_l'], | ||
latLonBoundingBox: [ | ||
@@ -77,2 +79,3 @@ -0.4906009184568518, 45.175543885638376, 0.9778719979726385, | ||
defaultCrs: 'EPSG:2154', | ||
keywords: ['features', 'hierarchisation_l'], | ||
latLonBoundingBox: [ | ||
@@ -137,2 +140,3 @@ -0.4832134559131876, 45.18037755571674, 0.9725372441782966, | ||
defaultCrs: 'EPSG:2154', | ||
keywords: ['domaine_public_hdf_com', 'domaine', 'public'], | ||
latLonBoundingBox: [ | ||
@@ -139,0 +143,0 @@ 1.3472171890368316, 48.82764887581316, 4.285589467078578, |
@@ -161,2 +161,12 @@ import { | ||
const keywords = serviceVersion.startsWith('1.0') | ||
? getElementText(findChildElement(featureTypeEl, 'Keywords')) | ||
.split(',') | ||
.map((keyword) => keyword.trim()) | ||
: findChildrenElement( | ||
findChildElement(featureTypeEl, 'Keywords'), | ||
'Keyword' | ||
) | ||
.map(getElementText) | ||
.filter((v, i, arr) => arr.indexOf(v) === i); | ||
return { | ||
@@ -175,3 +185,4 @@ name: getElementText(findChildElement(featureTypeEl, 'Name')), | ||
: parseBBox(), | ||
keywords: keywords, | ||
}; | ||
} |
@@ -134,2 +134,3 @@ // @ts-expect-error ts-migrate(7016) | ||
defaultCrs: 'EPSG:2154', | ||
keywords: ['features', 'hierarchisation_l'], | ||
otherCrs: ['EPSG:32615', 'EPSG:32616', 'EPSG:32617', 'EPSG:32618'], | ||
@@ -174,2 +175,3 @@ outputFormats: [ | ||
defaultCrs: 'EPSG:2154', | ||
keywords: ['features', 'hierarchisation_l'], | ||
otherCrs: ['EPSG:32615', 'EPSG:32616', 'EPSG:32617', 'EPSG:32618'], | ||
@@ -176,0 +178,0 @@ outputFormats: [ |
@@ -127,2 +127,3 @@ import { | ||
outputFormats: featureType.outputFormats, | ||
keywords: featureType.keywords, | ||
} as WfsFeatureTypeSummary; | ||
@@ -129,0 +130,0 @@ } |
@@ -33,2 +33,3 @@ import { | ||
latLonBoundingBox: boundingBox, | ||
keywords, | ||
} = featureType; | ||
@@ -81,2 +82,3 @@ | ||
...(!Number.isNaN(objectCount) && { objectCount }), | ||
...(keywords && { keywords }), | ||
}; | ||
@@ -83,0 +85,0 @@ } |
@@ -13,2 +13,3 @@ import { BoundingBox, CrsCode, MimeType } from '../shared/models.js'; | ||
latLonBoundingBox?: BoundingBox; | ||
keywords?: string[]; | ||
}; | ||
@@ -48,2 +49,3 @@ | ||
outputFormats: MimeType[]; | ||
keywords?: string[]; | ||
}; | ||
@@ -78,2 +80,3 @@ | ||
objectCount?: number; | ||
keywords?: string[]; | ||
}; | ||
@@ -80,0 +83,0 @@ |
@@ -56,2 +56,11 @@ import { | ||
}, | ||
keywords: [ | ||
'Géologie', | ||
'BRGM', | ||
'INSPIRE:ViewService', | ||
'infoMapAccessService', | ||
'WMS 1.1.1', | ||
'WMS 1.3.0', | ||
'SLD 1.1.0', | ||
], | ||
name: 'GEOSERVICES_GEOLOGIE', | ||
@@ -80,2 +89,3 @@ styles: [ | ||
}, | ||
keywords: [], | ||
name: 'GEOLOGIE', | ||
@@ -122,2 +132,3 @@ styles, | ||
}, | ||
keywords: ['Geologie', 'INSPIRE:Geology', 'Geology'], | ||
name: 'SCAN_F_GEOL1M', | ||
@@ -173,2 +184,3 @@ styles: [ | ||
}, | ||
keywords: ['Geologie', 'INSPIRE:Geology', 'Geology'], | ||
name: 'SCAN_F_GEOL250', | ||
@@ -211,2 +223,3 @@ styles, | ||
}, | ||
keywords: ['Geologie', 'INSPIRE:Geology', 'Geology'], | ||
name: 'SCAN_D_GEOL50', | ||
@@ -237,2 +250,3 @@ styles, | ||
}, | ||
keywords: [], | ||
name: 'INHERIT_BBOX', | ||
@@ -239,0 +253,0 @@ styles: [ |
@@ -135,2 +135,10 @@ import { | ||
: inheritedBoundingBoxes; | ||
const keywords = findChildrenElement( | ||
findChildElement(layerEl, 'KeywordList'), | ||
'Keyword' | ||
) | ||
.map(getElementText) | ||
.filter((v, i, arr) => arr.indexOf(v) === i); | ||
const children = findChildrenElement(layerEl, 'Layer').map((layer) => | ||
@@ -147,2 +155,3 @@ parseLayer(layer, version, availableCrs, styles, attribution, boundingBoxes) | ||
boundingBoxes, | ||
keywords, | ||
...(children.length && { children }), | ||
@@ -149,0 +158,0 @@ }; |
@@ -134,2 +134,3 @@ // @ts-expect-error ts-migrate(7016) | ||
}, | ||
keywords: [], | ||
name: 'GEOLOGIE', | ||
@@ -136,0 +137,0 @@ styles: [ |
@@ -36,2 +36,3 @@ import { BoundingBox, CrsCode, LayerStyle } from '../shared/models.js'; | ||
attribution?: WmsLayerAttribution; | ||
keywords?: string[]; | ||
/** | ||
@@ -38,0 +39,0 @@ * Not defined if the layer is a leaf in the tree |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
893820
19245