edzer / sp

Classes and methods for spatial data

Home Page:http://edzer.github.io/sp/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fiboGrid() bug

edzer opened this issue · comments

Hi Edzer,

I found a bug using the spsample() to generate Fibonacci points when setting the sampling polygons to be the entire globe that is my bbox of the Spatial polygon is

min max

x -180 180
y -90 90

This causes a problem when using the function fiboGrid() which converts the coordinates by the following

if (max(xlim) <= 180)
subtr = 180
else
subtr = 0

“max(bbox[1, ]) <=180” actually returns “FALSE” even though in my example max(bbox[1,]) is 180.
It would be great if you could change the code in the future to deal with this numerical issue.