Reformat all files with prettier
This commit is contained in:
parent
e22d189376
commit
b541d3eab4
382 changed files with 50893 additions and 35566 deletions
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,6 @@
|
|||
import {expect} from 'chai'
|
||||
import {ChangeDescription} from "../../../Logic/Osm/Actions/ChangeDescription";
|
||||
import {Changes} from "../../../Logic/Osm/Changes";
|
||||
import { expect } from "chai"
|
||||
import { ChangeDescription } from "../../../Logic/Osm/Actions/ChangeDescription"
|
||||
import { Changes } from "../../../Logic/Osm/Changes"
|
||||
|
||||
it("Generate preXML from changeDescriptions", () => {
|
||||
const changeDescrs: ChangeDescription[] = [
|
||||
|
@ -9,29 +9,26 @@ it("Generate preXML from changeDescriptions", () => {
|
|||
id: -1,
|
||||
changes: {
|
||||
lat: 42,
|
||||
lon: -8
|
||||
lon: -8,
|
||||
},
|
||||
tags: [{k: "someKey", v: "someValue"}],
|
||||
tags: [{ k: "someKey", v: "someValue" }],
|
||||
meta: {
|
||||
changeType: "create",
|
||||
theme: "test"
|
||||
}
|
||||
theme: "test",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "node",
|
||||
id: -1,
|
||||
tags: [{k: 'foo', v: 'bar'}],
|
||||
tags: [{ k: "foo", v: "bar" }],
|
||||
meta: {
|
||||
changeType: "answer",
|
||||
theme: "test"
|
||||
}
|
||||
}
|
||||
theme: "test",
|
||||
},
|
||||
},
|
||||
]
|
||||
const c = new Changes()
|
||||
const descr = c.CreateChangesetObjects(
|
||||
changeDescrs,
|
||||
[]
|
||||
)
|
||||
const descr = c.CreateChangesetObjects(changeDescrs, [])
|
||||
expect(descr.modifiedObjects).length(0)
|
||||
expect(descr.deletedObjects).length(0)
|
||||
expect(descr.newObjects).length(1)
|
||||
|
@ -39,4 +36,4 @@ it("Generate preXML from changeDescriptions", () => {
|
|||
const ch = descr.newObjects[0]
|
||||
expect(ch.tags["foo"]).eq("bar")
|
||||
expect(ch.tags["someKey"]).eq("someValue")
|
||||
})
|
||||
})
|
||||
|
|
|
@ -1,62 +1,66 @@
|
|||
import {describe} from 'mocha'
|
||||
import {expect} from 'chai'
|
||||
import {Utils} from "../../../Utils";
|
||||
import {ChangesetHandler, ChangesetTag} from "../../../Logic/Osm/ChangesetHandler";
|
||||
import {UIEventSource} from "../../../Logic/UIEventSource";
|
||||
import {OsmConnection} from "../../../Logic/Osm/OsmConnection";
|
||||
import {ElementStorage} from "../../../Logic/ElementStorage";
|
||||
import {Changes} from "../../../Logic/Osm/Changes";
|
||||
import { describe } from "mocha"
|
||||
import { expect } from "chai"
|
||||
import { Utils } from "../../../Utils"
|
||||
import { ChangesetHandler, ChangesetTag } from "../../../Logic/Osm/ChangesetHandler"
|
||||
import { UIEventSource } from "../../../Logic/UIEventSource"
|
||||
import { OsmConnection } from "../../../Logic/Osm/OsmConnection"
|
||||
import { ElementStorage } from "../../../Logic/ElementStorage"
|
||||
import { Changes } from "../../../Logic/Osm/Changes"
|
||||
|
||||
describe("ChangesetHanlder", () => {
|
||||
|
||||
describe("RewriteTagsOf", () => {
|
||||
it("should insert new tags", () => {
|
||||
|
||||
const changesetHandler = new ChangesetHandler(new UIEventSource<boolean>(true),
|
||||
const changesetHandler = new ChangesetHandler(
|
||||
new UIEventSource<boolean>(true),
|
||||
new OsmConnection({}),
|
||||
new ElementStorage(),
|
||||
new Changes(),
|
||||
new UIEventSource(undefined)
|
||||
);
|
||||
)
|
||||
|
||||
const oldChangesetMeta = {
|
||||
"type": "changeset",
|
||||
"id": 118443748,
|
||||
"created_at": "2022-03-13T19:52:10Z",
|
||||
"closed_at": "2022-03-13T20:54:35Z",
|
||||
"open": false,
|
||||
"user": "Pieter Vander Vennet",
|
||||
"uid": 3818858,
|
||||
"minlat": 51.0361902,
|
||||
"minlon": 3.7092939,
|
||||
"maxlat": 51.0364194,
|
||||
"maxlon": 3.7099520,
|
||||
"comments_count": 0,
|
||||
"changes_count": 3,
|
||||
"tags": {
|
||||
"answer": "5",
|
||||
"comment": "Adding data with #MapComplete for theme #toerisme_vlaanderen",
|
||||
"created_by": "MapComplete 0.16.6",
|
||||
"host": "https://mapcomplete.osm.be/toerisme_vlaanderen.html",
|
||||
"imagery": "osm",
|
||||
"locale": "nl",
|
||||
"source": "survey",
|
||||
type: "changeset",
|
||||
id: 118443748,
|
||||
created_at: "2022-03-13T19:52:10Z",
|
||||
closed_at: "2022-03-13T20:54:35Z",
|
||||
open: false,
|
||||
user: "Pieter Vander Vennet",
|
||||
uid: 3818858,
|
||||
minlat: 51.0361902,
|
||||
minlon: 3.7092939,
|
||||
maxlat: 51.0364194,
|
||||
maxlon: 3.709952,
|
||||
comments_count: 0,
|
||||
changes_count: 3,
|
||||
tags: {
|
||||
answer: "5",
|
||||
comment: "Adding data with #MapComplete for theme #toerisme_vlaanderen",
|
||||
created_by: "MapComplete 0.16.6",
|
||||
host: "https://mapcomplete.osm.be/toerisme_vlaanderen.html",
|
||||
imagery: "osm",
|
||||
locale: "nl",
|
||||
source: "survey",
|
||||
"source:node/-1": "note/1234",
|
||||
"theme": "toerisme_vlaanderen",
|
||||
}
|
||||
theme: "toerisme_vlaanderen",
|
||||
},
|
||||
}
|
||||
const rewritten = changesetHandler.RewriteTagsOf(
|
||||
[{
|
||||
key: "newTag",
|
||||
value: "newValue",
|
||||
aggregate: false
|
||||
}],
|
||||
[
|
||||
{
|
||||
key: "newTag",
|
||||
value: "newValue",
|
||||
aggregate: false,
|
||||
},
|
||||
],
|
||||
new Map<string, string>(),
|
||||
oldChangesetMeta)
|
||||
oldChangesetMeta
|
||||
)
|
||||
const d = Utils.asDict(rewritten)
|
||||
expect(d.size).deep.equal(10)
|
||||
expect(d.get("answer")).deep.equal("5")
|
||||
expect(d.get("comment")).deep.equal("Adding data with #MapComplete for theme #toerisme_vlaanderen")
|
||||
expect(d.get("comment")).deep.equal(
|
||||
"Adding data with #MapComplete for theme #toerisme_vlaanderen"
|
||||
)
|
||||
expect(d.get("created_by")).deep.equal("MapComplete 0.16.6")
|
||||
expect(d.get("host")).deep.equal("https://mapcomplete.osm.be/toerisme_vlaanderen.html")
|
||||
expect(d.get("imagery")).deep.equal("osm")
|
||||
|
@ -64,54 +68,59 @@ describe("ChangesetHanlder", () => {
|
|||
expect(d.get("source:node/-1")).deep.equal("note/1234")
|
||||
expect(d.get("theme")).deep.equal("toerisme_vlaanderen")
|
||||
expect(d.get("newTag")).deep.equal("newValue")
|
||||
|
||||
})
|
||||
it("should aggregate numeric tags", () => {
|
||||
const changesetHandler = new ChangesetHandler(new UIEventSource<boolean>(true),
|
||||
const changesetHandler = new ChangesetHandler(
|
||||
new UIEventSource<boolean>(true),
|
||||
new OsmConnection({}),
|
||||
new ElementStorage(),
|
||||
new Changes(),
|
||||
new UIEventSource(undefined)
|
||||
);
|
||||
)
|
||||
const oldChangesetMeta = {
|
||||
"type": "changeset",
|
||||
"id": 118443748,
|
||||
"created_at": "2022-03-13T19:52:10Z",
|
||||
"closed_at": "2022-03-13T20:54:35Z",
|
||||
"open": false,
|
||||
"user": "Pieter Vander Vennet",
|
||||
"uid": 3818858,
|
||||
"minlat": 51.0361902,
|
||||
"minlon": 3.7092939,
|
||||
"maxlat": 51.0364194,
|
||||
"maxlon": 3.7099520,
|
||||
"comments_count": 0,
|
||||
"changes_count": 3,
|
||||
"tags": {
|
||||
"answer": "5",
|
||||
"comment": "Adding data with #MapComplete for theme #toerisme_vlaanderen",
|
||||
"created_by": "MapComplete 0.16.6",
|
||||
"host": "https://mapcomplete.osm.be/toerisme_vlaanderen.html",
|
||||
"imagery": "osm",
|
||||
"locale": "nl",
|
||||
"source": "survey",
|
||||
type: "changeset",
|
||||
id: 118443748,
|
||||
created_at: "2022-03-13T19:52:10Z",
|
||||
closed_at: "2022-03-13T20:54:35Z",
|
||||
open: false,
|
||||
user: "Pieter Vander Vennet",
|
||||
uid: 3818858,
|
||||
minlat: 51.0361902,
|
||||
minlon: 3.7092939,
|
||||
maxlat: 51.0364194,
|
||||
maxlon: 3.709952,
|
||||
comments_count: 0,
|
||||
changes_count: 3,
|
||||
tags: {
|
||||
answer: "5",
|
||||
comment: "Adding data with #MapComplete for theme #toerisme_vlaanderen",
|
||||
created_by: "MapComplete 0.16.6",
|
||||
host: "https://mapcomplete.osm.be/toerisme_vlaanderen.html",
|
||||
imagery: "osm",
|
||||
locale: "nl",
|
||||
source: "survey",
|
||||
"source:node/-1": "note/1234",
|
||||
"theme": "toerisme_vlaanderen",
|
||||
}
|
||||
theme: "toerisme_vlaanderen",
|
||||
},
|
||||
}
|
||||
const rewritten = changesetHandler.RewriteTagsOf(
|
||||
[{
|
||||
key: "answer",
|
||||
value: "37",
|
||||
aggregate: true
|
||||
}],
|
||||
[
|
||||
{
|
||||
key: "answer",
|
||||
value: "37",
|
||||
aggregate: true,
|
||||
},
|
||||
],
|
||||
new Map<string, string>(),
|
||||
oldChangesetMeta)
|
||||
oldChangesetMeta
|
||||
)
|
||||
const d = Utils.asDict(rewritten)
|
||||
|
||||
expect(d.size).deep.equal(9)
|
||||
expect(d.get("answer")).deep.equal("42")
|
||||
expect(d.get("comment")).deep.equal("Adding data with #MapComplete for theme #toerisme_vlaanderen")
|
||||
expect(d.get("comment")).deep.equal(
|
||||
"Adding data with #MapComplete for theme #toerisme_vlaanderen"
|
||||
)
|
||||
expect(d.get("created_by")).deep.equal("MapComplete 0.16.6")
|
||||
expect(d.get("host")).deep.equal("https://mapcomplete.osm.be/toerisme_vlaanderen.html")
|
||||
expect(d.get("imagery")).deep.equal("osm")
|
||||
|
@ -120,47 +129,51 @@ describe("ChangesetHanlder", () => {
|
|||
expect(d.get("theme")).deep.equal("toerisme_vlaanderen")
|
||||
})
|
||||
it("should rewrite special reasons with the correct ID", () => {
|
||||
const changesetHandler = new ChangesetHandler(new UIEventSource<boolean>(true),
|
||||
const changesetHandler = new ChangesetHandler(
|
||||
new UIEventSource<boolean>(true),
|
||||
new OsmConnection({}),
|
||||
new ElementStorage(),
|
||||
new Changes(),
|
||||
new UIEventSource(undefined)
|
||||
);
|
||||
)
|
||||
const oldChangesetMeta = {
|
||||
"type": "changeset",
|
||||
"id": 118443748,
|
||||
"created_at": "2022-03-13T19:52:10Z",
|
||||
"closed_at": "2022-03-13T20:54:35Z",
|
||||
"open": false,
|
||||
"user": "Pieter Vander Vennet",
|
||||
"uid": 3818858,
|
||||
"minlat": 51.0361902,
|
||||
"minlon": 3.7092939,
|
||||
"maxlat": 51.0364194,
|
||||
"maxlon": 3.7099520,
|
||||
"comments_count": 0,
|
||||
"changes_count": 3,
|
||||
"tags": {
|
||||
"answer": "5",
|
||||
"comment": "Adding data with #MapComplete for theme #toerisme_vlaanderen",
|
||||
"created_by": "MapComplete 0.16.6",
|
||||
"host": "https://mapcomplete.osm.be/toerisme_vlaanderen.html",
|
||||
"imagery": "osm",
|
||||
"locale": "nl",
|
||||
"source": "survey",
|
||||
type: "changeset",
|
||||
id: 118443748,
|
||||
created_at: "2022-03-13T19:52:10Z",
|
||||
closed_at: "2022-03-13T20:54:35Z",
|
||||
open: false,
|
||||
user: "Pieter Vander Vennet",
|
||||
uid: 3818858,
|
||||
minlat: 51.0361902,
|
||||
minlon: 3.7092939,
|
||||
maxlat: 51.0364194,
|
||||
maxlon: 3.709952,
|
||||
comments_count: 0,
|
||||
changes_count: 3,
|
||||
tags: {
|
||||
answer: "5",
|
||||
comment: "Adding data with #MapComplete for theme #toerisme_vlaanderen",
|
||||
created_by: "MapComplete 0.16.6",
|
||||
host: "https://mapcomplete.osm.be/toerisme_vlaanderen.html",
|
||||
imagery: "osm",
|
||||
locale: "nl",
|
||||
source: "survey",
|
||||
"source:node/-1": "note/1234",
|
||||
"theme": "toerisme_vlaanderen",
|
||||
}
|
||||
theme: "toerisme_vlaanderen",
|
||||
},
|
||||
}
|
||||
const rewritten = changesetHandler.RewriteTagsOf(
|
||||
[],
|
||||
new Map<string, string>([["node/-1", "node/42"]]),
|
||||
oldChangesetMeta)
|
||||
oldChangesetMeta
|
||||
)
|
||||
const d = Utils.asDict(rewritten)
|
||||
|
||||
expect(d.size).deep.equal(9)
|
||||
expect(d.get("answer")).deep.equal("5")
|
||||
expect(d.get("comment")).deep.equal("Adding data with #MapComplete for theme #toerisme_vlaanderen")
|
||||
expect(d.get("comment")).deep.equal(
|
||||
"Adding data with #MapComplete for theme #toerisme_vlaanderen"
|
||||
)
|
||||
expect(d.get("created_by")).deep.equal("MapComplete 0.16.6")
|
||||
expect(d.get("host")).deep.equal("https://mapcomplete.osm.be/toerisme_vlaanderen.html")
|
||||
expect(d.get("imagery")).deep.equal("osm")
|
||||
|
@ -169,21 +182,24 @@ describe("ChangesetHanlder", () => {
|
|||
expect(d.get("theme")).deep.equal("toerisme_vlaanderen")
|
||||
})
|
||||
})
|
||||
|
||||
describe("rewriteMetaTags" , () => {
|
||||
|
||||
describe("rewriteMetaTags", () => {
|
||||
it("should rewrite special reasons with the correct ID", () => {
|
||||
const extraMetaTags : ChangesetTag[] = [
|
||||
const extraMetaTags: ChangesetTag[] = [
|
||||
{
|
||||
key: "created_by",
|
||||
value:"mapcomplete"
|
||||
value: "mapcomplete",
|
||||
},
|
||||
{
|
||||
key: "source:node/-1",
|
||||
value:"note/1234"
|
||||
}
|
||||
value: "note/1234",
|
||||
},
|
||||
]
|
||||
const changes = new Map<string, string>([["node/-1","node/42"]])
|
||||
const hasSpecialMotivationChanges = ChangesetHandler.rewriteMetaTags(extraMetaTags, changes)
|
||||
const changes = new Map<string, string>([["node/-1", "node/42"]])
|
||||
const hasSpecialMotivationChanges = ChangesetHandler.rewriteMetaTags(
|
||||
extraMetaTags,
|
||||
changes
|
||||
)
|
||||
expect(hasSpecialMotivationChanges, "Special rewrite did not trigger").true
|
||||
// Rewritten inline by rewriteMetaTags
|
||||
expect(extraMetaTags[1].key).deep.equal("source:node/42")
|
||||
|
@ -191,5 +207,5 @@ describe("ChangesetHanlder", () => {
|
|||
expect(extraMetaTags[0].key).deep.equal("created_by")
|
||||
expect(extraMetaTags[0].value).deep.equal("mapcomplete")
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
@ -1,93 +1,99 @@
|
|||
import {describe} from 'mocha'
|
||||
import {expect} from 'chai'
|
||||
import {OsmObject} from "../../../Logic/Osm/OsmObject";
|
||||
import {Utils} from "../../../Utils";
|
||||
import ScriptUtils from "../../../scripts/ScriptUtils";
|
||||
import {readFileSync} from "fs";
|
||||
import { describe } from "mocha"
|
||||
import { expect } from "chai"
|
||||
import { OsmObject } from "../../../Logic/Osm/OsmObject"
|
||||
import { Utils } from "../../../Utils"
|
||||
import ScriptUtils from "../../../scripts/ScriptUtils"
|
||||
import { readFileSync } from "fs"
|
||||
|
||||
describe("OsmObject", () => {
|
||||
|
||||
describe("download referencing ways", () => {
|
||||
|
||||
Utils.injectJsonDownloadForTests(
|
||||
"https://www.openstreetmap.org/api/0.6/node/1124134958/ways", {
|
||||
"version": "0.6",
|
||||
"generator": "CGImap 0.8.6 (49805 spike-06.openstreetmap.org)",
|
||||
"copyright": "OpenStreetMap and contributors",
|
||||
"attribution": "http://www.openstreetmap.org/copyright",
|
||||
"license": "http://opendatacommons.org/licenses/odbl/1-0/",
|
||||
"elements": [{
|
||||
"type": "way",
|
||||
"id": 97038428,
|
||||
"timestamp": "2019-06-19T12:26:24Z",
|
||||
"version": 6,
|
||||
"changeset": 71399984,
|
||||
"user": "Pieter Vander Vennet",
|
||||
"uid": 3818858,
|
||||
"nodes": [1124134958, 323729212, 323729351, 2542460408, 187073405],
|
||||
"tags": {
|
||||
"highway": "residential",
|
||||
"name": "Brugs-Kerkhofstraat",
|
||||
"sett:pattern": "arc",
|
||||
"surface": "sett"
|
||||
}
|
||||
}, {
|
||||
"type": "way",
|
||||
"id": 97038434,
|
||||
"timestamp": "2019-06-19T12:26:24Z",
|
||||
"version": 5,
|
||||
"changeset": 71399984,
|
||||
"user": "Pieter Vander Vennet",
|
||||
"uid": 3818858,
|
||||
"nodes": [1124134958, 1124135024, 187058607],
|
||||
"tags": {
|
||||
"bicycle": "use_sidepath",
|
||||
"highway": "residential",
|
||||
"name": "Kerkhofblommenstraat",
|
||||
"sett:pattern": "arc",
|
||||
"surface": "sett"
|
||||
}
|
||||
}, {
|
||||
"type": "way",
|
||||
"id": 97038435,
|
||||
"timestamp": "2017-12-21T21:41:08Z",
|
||||
"version": 4,
|
||||
"changeset": 54826837,
|
||||
"user": "Jakka",
|
||||
"uid": 2403313,
|
||||
"nodes": [1124134958, 2576628889, 1124135035, 5298371485, 5298371495],
|
||||
"tags": {"bicycle": "use_sidepath", "highway": "residential", "name": "Kerkhofblommenstraat"}
|
||||
}, {
|
||||
"type": "way",
|
||||
"id": 251446313,
|
||||
"timestamp": "2019-01-07T19:22:47Z",
|
||||
"version": 4,
|
||||
"changeset": 66106872,
|
||||
"user": "M!dgard",
|
||||
"uid": 763799,
|
||||
"nodes": [1124134958, 5243143198, 4555715455],
|
||||
"tags": {"foot": "yes", "highway": "service"}
|
||||
}]
|
||||
})
|
||||
"https://www.openstreetmap.org/api/0.6/node/1124134958/ways",
|
||||
{
|
||||
version: "0.6",
|
||||
generator: "CGImap 0.8.6 (49805 spike-06.openstreetmap.org)",
|
||||
copyright: "OpenStreetMap and contributors",
|
||||
attribution: "http://www.openstreetmap.org/copyright",
|
||||
license: "http://opendatacommons.org/licenses/odbl/1-0/",
|
||||
elements: [
|
||||
{
|
||||
type: "way",
|
||||
id: 97038428,
|
||||
timestamp: "2019-06-19T12:26:24Z",
|
||||
version: 6,
|
||||
changeset: 71399984,
|
||||
user: "Pieter Vander Vennet",
|
||||
uid: 3818858,
|
||||
nodes: [1124134958, 323729212, 323729351, 2542460408, 187073405],
|
||||
tags: {
|
||||
highway: "residential",
|
||||
name: "Brugs-Kerkhofstraat",
|
||||
"sett:pattern": "arc",
|
||||
surface: "sett",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "way",
|
||||
id: 97038434,
|
||||
timestamp: "2019-06-19T12:26:24Z",
|
||||
version: 5,
|
||||
changeset: 71399984,
|
||||
user: "Pieter Vander Vennet",
|
||||
uid: 3818858,
|
||||
nodes: [1124134958, 1124135024, 187058607],
|
||||
tags: {
|
||||
bicycle: "use_sidepath",
|
||||
highway: "residential",
|
||||
name: "Kerkhofblommenstraat",
|
||||
"sett:pattern": "arc",
|
||||
surface: "sett",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "way",
|
||||
id: 97038435,
|
||||
timestamp: "2017-12-21T21:41:08Z",
|
||||
version: 4,
|
||||
changeset: 54826837,
|
||||
user: "Jakka",
|
||||
uid: 2403313,
|
||||
nodes: [1124134958, 2576628889, 1124135035, 5298371485, 5298371495],
|
||||
tags: {
|
||||
bicycle: "use_sidepath",
|
||||
highway: "residential",
|
||||
name: "Kerkhofblommenstraat",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "way",
|
||||
id: 251446313,
|
||||
timestamp: "2019-01-07T19:22:47Z",
|
||||
version: 4,
|
||||
changeset: 66106872,
|
||||
user: "M!dgard",
|
||||
uid: 763799,
|
||||
nodes: [1124134958, 5243143198, 4555715455],
|
||||
tags: { foot: "yes", highway: "service" },
|
||||
},
|
||||
],
|
||||
}
|
||||
)
|
||||
|
||||
it("should download referencing ways", async () => {
|
||||
const ways = await OsmObject.DownloadReferencingWays("node/1124134958")
|
||||
expect(ways).not.undefined
|
||||
expect(ways).length(4)
|
||||
})
|
||||
|
||||
it("should download referencing ways",
|
||||
async () => {
|
||||
|
||||
|
||||
const ways = await OsmObject.DownloadReferencingWays("node/1124134958")
|
||||
expect(ways).not.undefined
|
||||
expect(ways).length(4)
|
||||
})
|
||||
|
||||
|
||||
it("should download full OSM-relations", async () => {
|
||||
ScriptUtils.fixUtils()
|
||||
Utils.injectJsonDownloadForTests("https://www.openstreetmap.org/api/0.6/relation/5759328/full", JSON.parse(readFileSync("./test/data/relation_5759328.json","UTF-8")))
|
||||
const r = await OsmObject.DownloadObjectAsync("relation/5759328").then(x => x)
|
||||
const geojson = r.asGeoJson();
|
||||
Utils.injectJsonDownloadForTests(
|
||||
"https://www.openstreetmap.org/api/0.6/relation/5759328/full",
|
||||
JSON.parse(readFileSync("./test/data/relation_5759328.json", "UTF-8"))
|
||||
)
|
||||
const r = await OsmObject.DownloadObjectAsync("relation/5759328").then((x) => x)
|
||||
const geojson = r.asGeoJson()
|
||||
expect(geojson.geometry.type).eq("MultiPolygon")
|
||||
})
|
||||
})
|
||||
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue