We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8e91616 + 67b7e17 commit c9fba30Copy full SHA for c9fba30
src/lib/utils.ts
@@ -5,5 +5,17 @@ export const pbfToGeojson = (pbfData) => {
5
const pbf = new Pbf(pbfData);
6
const geojson = geobuf.decode(pbf);
7
8
+ geojson.features.forEach(element => {
9
+ element.properties.bassin_versant = JSON.parse(element.properties.json_arrays)["bassin_versant"];
10
+ element.properties.communes = JSON.parse(element.properties.json_arrays)["communes"];
11
+ element.properties.criteres_delim= JSON.parse(element.properties.json_arrays)["criteres_delim"];
12
+ });
13
+
14
15
+ if (element.properties.bassin_versant.includes(null)) {
16
+ element.properties.bassin_versant = 'Pas de bassin versant attribué';
17
+ }
18
+ })
19
20
return geojson
21
}
0 commit comments