It contains two ways and it should be a closed polygon, but evidently the ways only touch on one end but not on the other - so basically this is an "invalid" OSM relation.
When using this library to convert it to a geojson I get a polygon, I would expect to get either a warning or a a flag when using verbose options.
Am I missing anything?
Here's my full code:
import osmtogeojson from "osmtogeojson";
fetch("https://overpass-api.de/api/interpreter", {
method: "POST",
body: "rel(15260061);out meta geom;"
}).then(r => r.text()).then(t => {
console.log(t);
const parser = new DOMParser();
const xmlDoc = parser.parseFromString(t, "text/xml");
let geo = osmtogeojson(xmlDoc, {verbose: true});
console.log(geo);
console.log(geo.features[0].properties.tainted);
});
https://stackblitz.com/edit/typescript-j7uzad?file=index.ts
Hi, I have the following osm relation:
It contains two ways and it should be a closed polygon, but evidently the ways only touch on one end but not on the other - so basically this is an "invalid" OSM relation. When using this library to convert it to a geojson I get a polygon, I would expect to get either a warning or a a flag when using verbose options.
Am I missing anything?
Here's my full code: