grdimage resampling can go outside region and SEGV
|Target version:||Candidate for next bugfix release|
This refers back to forum message http://gmt.soest.hawaii.edu/boards/1/topics/874?r=886#message-886. The BCR 2-D interpolation machinery had some slop so that points really close (<1e-4) to the boundary (but still outside) would be considered close enough to be inside. However, this also meant that we might access nodes outside the padded array; apparently this depended a bit on rounding errors which were different on different architectures. Also, some platforms (e.g., OS X) were more forgiving than others in reporting the access violation. I have modified this section to allow points slightly outside but reset their coordinates to lie exactly on the boundary. This prevents the access violation. The problem affected both GMT4 and 5. Fixed in GMT 4 (r10263) and GMT 5 (r13513).