Skip to content
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

Global squaregrid #2079

Closed
stollc opened this issue May 11, 2021 · 1 comment · Fixed by #2106
Closed

Global squaregrid #2079

stollc opened this issue May 11, 2021 · 1 comment · Fixed by #2106
Assignees
Milestone

Comments

@stollc
Copy link

stollc commented May 11, 2021

Hi,
Im trying to create a square grid that covers the entire map by using https://turfjs.org/docs/#squareGrid

The default example works great, but if i expand the bbox to [-180, -90, 180, 90] it returns an empty feature set.
This is my code:

var bbox = [-180, -90, 180, 90];  
var cellSide = 1;  
var options = { units: "degrees" };  
var squareGrid = turf.squareGrid(bbox, cellSide, options);  

Is there a bbox limit or am i doing something wrong?

@rowanwins
Copy link
Member

rowanwins commented Jun 18, 2021

Looking into this and I found a bug in the underlying rectangle-grid package, so I've got a fix underway in #2106

The fix resolves your issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants