-
Notifications
You must be signed in to change notification settings - Fork 943
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
squareGrid creates rectangles #2136
Comments
@paligrudic, what version of Turf are you running? Are you sure your code snippet matches your screenshot? When I paste it into the Turf sandbox (running latest 6.4.0) I get what looks like squares, and they are in Antarctica, which I suspect there are no green fields like in your screenshot. Can you try the latest version of Turf?
|
As there's been no follow up I think it's safe to assume this issue is resolved. |
See related issue with possible workaround here - #2638. In short, the behavior of this function changed around July/August 2021 and matches the behavior described by the OP. |
Hi,
I'm trying to create a square grid using https://turfjs.org/docs/#squareGrid, but instead of squares, it returns rectangles. This is how it looks like:
When I try to decrease cellSide the rectangles become narrower
`
var coordinates = [[
[ 9.628698847753714, -82.659521999370077 ],
[ 9.628698847753714, -82.654521999370077 ],
[ 9.509698847753714, -82.579521999370077 ],
[ 9.509698847753714, -82.654521999370077 ],
[ 9.628698847753714, -82.659521999370077 ],
]]
var polygon = turf.polygon(coordinates);
var bbox = turf.bbox(polygon);
The text was updated successfully, but these errors were encountered: