Search code examples
javascriptleafletopenstreetmapgeojsonoverpass-api

What is the expected input for uninterestingTags in osmtogeojson?


I am currently working with Leaflet.js and Overpass API and I am using osmtogeojson to do the format change between the OSM-JSON that Overpass API outputs and the GeoJSON that Leaflet.js needs as input. To do so I am using the following code:

data = osmtogeojson(osm_data);

This works perfectly.

Here comes the problem: I am trying to ignore some data that I am getting on the OSM-JSON dataset. So I am trying to use uninterestingTags as given in the osmtogeojson API. The thing is that I don't know how to code this thing. This is not working:

 data = osmtogeojson(
      osm_data, uninterestingTags = {"source"}
 );

Solution

  • Try setting the tag to true, as done here:

    uninterestingTags = {"source": true}.