Open stebogit opened 6 years ago
We can pass the same options
from the grid modules, I've added mask
for each of them, that might work?
Yep, mask
would definitely work 👍
Now that I look at it we should also rename cellSize
to cellSide
as we did in the grid modules
Also, I was wondering why was clone
introduced in here
var newFeature = clone(gridFeature);
newFeature.properties[property] = zw / sw;
results.push(newFeature);
...
return featureCollection(results);
Clone was used because it mutates the properties, I'm sure there might be a way to remove the clone.
newFeature.properties[property] = zw / sw;
cellSide
👍 mask
works 👍 Hello, is there any progress with mask
parameter? Maybe I'm overlooking some other way to achieve custom interpolation boundary?
Is the mask
parameter already implemented? I haven't seen that parameter in documentation.
EDIT: Even though the mask
parameter is not mentioned in the documentation, it is there and working properly. But mask
option doesn't seem like an option. For example, in below image, I am trying to interpolate 4 points within the polygon (pink background) but I got the values only for the bbox of the input points not for the whole polygon.
Currently
@turf/interpolate
defines the area on which to interpolate the values as the bounding box surrounding the input points. It would be useful to be able to define your area of interest, which might be different than the current (then default)bbox(points)
, like this:or this: