turf icon indicating copy to clipboard operation
turf copied to clipboard

isobands returns the wrong data

Open caelantop opened this issue 1 year ago • 2 comments

@turf/isobands

  • [6.5.0 ] The version of Turf you are using, and any other relevant versions.
  • [point1701347986301.json ] GeoJSON data as a gist file or geojson.io (filename extension must be .geojson).

the origin data:

point1701347986301.json

this result screenshot:

微信截图_20231130204750

the params of isobands:

  • breaks: [-12, -8, -4, 0, 4, 8, 12, 16, 20, 24, 28, 32, 35, 37, 40]
  • zProperty: 'value'
  • breaksProperties: [{"sort":0},{"sort":1},{"sort":2},{"sort":3},{"sort":4},{"sort":5},{"sort":6},{"sort":7},{"sort":8},{"sort":9},{"sort":10},{"sort":11},{"sort":12},{"sort":13}]

execute:

isobands(point1701347986301.json, breaks, { zProperty: "value", breaksProperties, })

It's missing some data, this is not what I want.

the breaks or breaksProperties is not important, but the points and it's value property in not work

caelantop avatar Nov 30 '23 12:11 caelantop

@caelantop maybe you could set up a quick sandbox that reproduces the issue and maybe better pointing out what is the missing data you expect? It's hard to quickly understand what's the issue with just what you submitted here.

stebogit avatar Nov 30 '23 19:11 stebogit

@caelantop maybe you could set up a quick sandbox that reproduces the issue and maybe better pointing out what is the missing data you expect? It's hard to quickly understand what's the issue with just what you submitted here.

the sandbox url: https://jsfiddle.net/caelan/t1ok65L8/3/ my breaks value range [-12, 40], but the point data [max, min] is [24.595, 4.604], the results should cover all areas of points

caelantop avatar Dec 01 '23 02:12 caelantop

Hi @caelantop. Reproduced the problem with 6.5.0, and then upgraded to v7 and got the result below:

Screenshot 2024-06-30 at 7 16 23 pm

This looks like it fixes your issue as it covers all areas of your points. Please reopen if this is still not correct.

smallsaucepan avatar Jun 30 '24 09:06 smallsaucepan