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
Seems like the centered property should default to True instead of False/undefined since this option would be most useful all the time.
poinGrid(box,cellSize,units)//= centered param would equal True (even if defined as undefined)
JSDocs
/** * Creates a {@link Point} grid from a bounding box, {@link FeatureCollection} or {@link Feature}. * * @name pointGrid * @param {Array<number>|FeatureCollection|Feature<any>} bbox extent in [minX, minY, maxX, maxY] order * @param {number} cellSide the distance between points * @param {string} [units=kilometers] used in calculating cellSide, can be degrees, radians, miles, or kilometers * @param {boolean} [centered=true] adjust points position to center the grid into bbox * @param {boolean} [bboxIsMask=false] if true, and bbox is a Polygon or MultiPolygon, the grid Point will be created * only if inside the bbox Polygon(s) * @returns {FeatureCollection<Point>} grid of points */module.exports=function(bbox,cellSide,units,centered,bboxIsMask){
@DenisCarriere 👍 that make sense, but why not just have the output always centered, removing the parameter (maybe in v.5.0)?
Why/when should the output ever be off?
@turf/point-grid
- changecentered
param default to TrueSeems like the
centered
property should default toTrue
instead ofFalse
/undefined
since this option would be most useful all the time.JSDocs
Ref: Issue #613
CC: @stebogit
The text was updated successfully, but these errors were encountered: