Repository navigation
[geometry-rewrite] update tests - #47
Conversation
|
|
||
| ASSERT_EQ(empty_tile == index.getTile(11, 800, 400), true); // non-existing tile | ||
| ASSERT_EQ(&empty_tile == &index.getTile(11, 800, 400), true); // non-existing tile | ||
|
|
There was a problem hiding this comment.
Ideally all of these would be
ASSERT_EQ(feature, expected);
Rather than
ASSERT_EQ(feature == expected, true);
But I've not been able to get the == operators to cooperate with ASSERT_EQ or vice versa yet.
There was a problem hiding this comment.
replicated the error: https://gist.github.com/springmeyer/445c1d2d143e59c5d340b2d053f67008. Something is weird with the comparison operator, but I'm not able to see it yet. Wondering if @jfirebaugh might be able to spot it...
There was a problem hiding this comment.
feature didn't have an == operator defined. I added this in mapbox/geometry.hpp@9b59d16; will need to go through another release + update cycle to bring it into geojson.hpp and here.
d68da4a to
b63ff12
Compare
| // | ||
| // if (jt->value.IsUint64()) { | ||
| // feat.properties.emplace(tagKey, std::uint64_t(jt->value.GetUint64())); | ||
| // } |
There was a problem hiding this comment.
😓 the New Jersey feature that's going through
mapbox::geojson::parse(loadFile("test/fixtures/us-states.json"))
has a density value that is int64_t because geojson-cpp is currently based on [email protected] -- which preferred int64_t to uint64_t:
b63ff12 to
e60c81e
Compare
|
|
||
| bool operator==(const std::map<std::string, mapbox::geometry::feature_collection<short>>& a, const std::map<std::string, mapbox::geometry::feature_collection<short>>& b) { | ||
| EXPECT_EQ(a.size(), b.size()); | ||
| // @TODO iterate through all tiles in a & confirm in b && vice versa |
There was a problem hiding this comment.
I'll add this comparison in but at first glance it looks like the tiles generated are quite different in count + possibly tile coordinate from master. @mourner may ping you for guidance on whether this is an expected update to the algorithm in geojson-vt-cpp (and maybe also whether there's a JS test fixture reference/parity expected).
There was a problem hiding this comment.
Yes, there's a difference in the algorithm — previously it would not save empty tiles at the bottom of the tree, and now it does, so that getTile doesn't need to reclip geometries if there's an empty parent.
ac9b30c to
21385a0
Compare
@mourner this should be ready for your review and merge into #45. The main remaining item on my mind is to update to the next release of |
|
@yhahn this looks great, thanks for doing the dirty work! I'll merge the geometry PR to master tomorrow after a clean-up rebase. |
Not passing yet and some problematic parts. Will note in inline comments below.cc @springmeyer