You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Creates a square grid from a bounding box, Feature or FeatureCollection.
yet whenever I input a Feature collection, the error I get is:
bbox must be array.
Here is some sample code:
var locationA = turf.point([-75.343, 39.984], {edx: 5.1});
var locationB = turf.point([-75.833, 39.284], {edx: 45.4});
var locationC = turf.point([-75.534, 39.123], {edx: -11.1});
var collection = turf.featureCollection([locationA,locationB,locationC]);
var squareGrid = turf.squareGrid(collection, 25, /*options*/);
What am I missing here? I would like to create a square grid from a feature collection that has points with properties, and paint the grid cells according to the property value.
Is my way of thinking wrong?
The text was updated successfully, but these errors were encountered:
adkalkan
changed the title
How to create squareGrid from FeatureCollection
Cannot create squareGrid from FeatureCollection
Feb 5, 2020
I'm using turf alongside mapbox.
squareGrid's definition reads:
yet whenever I input a Feature collection, the error I get is:
Here is some sample code:
What am I missing here? I would like to create a square grid from a feature collection that has points with properties, and paint the grid cells according to the property value.
Is my way of thinking wrong?
The text was updated successfully, but these errors were encountered: