-
Notifications
You must be signed in to change notification settings - Fork 951
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create isobands inside entire polygon #2444
Comments
Yes, that’s exactly how you described it. Could you tell me how you figured it out? Can you help solve this problem? |
I already know how to generate the result of the right picture, thank you, @mumispb You can do that |
Hi @lemonig.
To make the right hand image I had to modify the Turf code to make the bounding box bigger. Will change this issue to be about adding an optional bbox option to give all users that level of control. In the meantime, I thought of another workaround. All you would need to do is add four "dummy" points to your data, one at each corner of the bounding box you want to interpolate data within. That will trick the interpolate function into filling in the entire area. Those four points should be as neutral as possible to not distort real points too much. You might need to experiment to find what's best. Perhaps try the average of all your points, or the minimum, for example. It wouldn't be perfect, though should give reasonable results without having to wait for an update to Turf. |
I have used the exact same solution as @smallsaucepan , but I have to say that the values for these extra points can be a headache, because different approaches work for different cases. It can be useful to let the users of your app define a value for these points and let them experiment. I mean, if that's your use case. I have tried using 0, 1, minimum, average, average of nearest points. |
I am very happy to do it, I think I can give it a try。and I suggest that IDW can add a search point |
Excellent. Thanks @lemonig.
Do you mean this would be a new optional parameter? Would it keep the current behaviour (be backwards compatible) if called with default arguments? |
Note resolving this will also resolve #1031. |
I have added PR to solve the problem of interpolating the specified area with |
This was resolved by the merge of #2768 |
I have a polygon and some measurements made inside that polygon and I would like to create isobands for the entirety of it. However, it seems interpolate only runs inside the bounding box that it creates automatically and it only encapsulates the points that I have provided with values. How could I expand it to the entire polygon?
This is the exact same issue in #2297. On that issue, the author has provided a working fiddle for his case https://jsfiddle.net/doug_b/xbd6Lf74/3/.
Turf.js version: 6.5.0
The text was updated successfully, but these errors were encountered: