Closed christophercliff closed 3 years ago
node v10.16.0 (also in Chrome) geojson2h3 v1.0.1
Using test data calls.json from https://gist.github.com/christophercliff/dffe5c23c8fa396c40b7ab774ee2de72.
calls.json
calls.json has three sets of args, [a, b, c], like:
[a, b, c]
[[Feature, number], [Feature, number], [Feature, number]]
Calling c alone works:
c
const assert = require('assert') const geojson2h3 = require('geojson2h3') const [a, b, c] = require('./calls.json') const hexArr = geojson2h3.featureToH3Set(...c) const hexSet = new Set(hexArr) assert(hexArr.length === 11486) assert(hexSet.size === 11486)
Calling three times in order [a, b, c] produces incorrect output:
const assert = require('assert') const geojson2h3 = require('geojson2h3') const [a, b, c] = require('./calls.json') geojson2h3.featureToH3Set(...a) geojson2h3.featureToH3Set(...b) const hexArr = geojson2h3.featureToH3Set(...c) const hexSet = new Set(hexArr) assert(hexArr.length === 11486) assert(hexSet.size === 11486)
The order matters. Calling [a, c], [b, c], [b, a, c] appear to work.
[a, c]
[b, c]
[b, a, c]
I believe this to be fixed in https://github.com/uber/h3-js/pull/104, closing unless there's a separate issue.
node v10.16.0 (also in Chrome) geojson2h3 v1.0.1
Using test data
calls.json
from https://gist.github.com/christophercliff/dffe5c23c8fa396c40b7ab774ee2de72.calls.json
has three sets of args,[a, b, c]
, like:Calling
c
alone works:Calling three times in order
[a, b, c]
produces incorrect output:The order matters. Calling
[a, c]
,[b, c]
,[b, a, c]
appear to work.