mtirwin / mgcp-diff

Turf and Tile Reduce scripts for diffing OSM and MGCP data
0 stars 0 forks source link

OSM properties not filtering #1

Closed mtirwin closed 8 years ago

mtirwin commented 8 years ago

@aaronlidman I've got diffing of OSM (I'm using the Samoa country dump from OSM QA tiles) and my other road dataset (MGCP, a New Zealand gov dataset) up and running based off mapbox/road-diff (modified from its original OSM + Tiger setup). When I map MGCP roads that aren't in OSM, I get a good looking output:

screen shot 2016-08-02 at 6 22 33 pm

But when I map OSM roads that aren't in MGCP, I seem to be getting all OSM layers, including things like streams:

screen shot 2016-08-02 at 6 25 17 pm

I suspect that https://github.com/mtirwin/mgcp-diff/blob/master/diff.js#L61 is the culprit here, but I've played around with changing property filters to no avail. Any guidance on how to filter + compare only OSM roads?

aaronlidman commented 8 years ago

Yeah I think you're right about that line being the issue. So right now it's name || road, meaning, if it finds a name it won't check that it's actually a road. I think you might want name && road, to insure the OSM item has both a name and is a road.

If you're checking against OSM, the tag you want is probably feature.properties.highway.

mtirwin commented 8 years ago

Pushed some changes that got the diffing in shape, but I'm still getting all OSM ways compared to the other dataset, i.e. filtering by OSM highways isn't working.

mtirwin commented 8 years ago

Added a flag to filter only OSM, not the second dataset. 🙏 @tcql. All set here.