James-Thorson-NOAA / FishStatsUtils

Shared resources for spatio-temporal models
GNU General Public License v3.0
10 stars 16 forks source link

Potential typo in Prepare_XXXX_Extrapolation_Data_Fn.R #55

Closed agruss2 closed 3 years ago

agruss2 commented 3 years ago

Hello, I think that I spotted a potential typo in Prepare_XXXX_Extrapolation_Data_Fn.R: Line 495 (master branch):

TmpLL = project_coordinates( X=Data_Extrap[,"E_km"], Y=Data_Extrap[,"N_km"], projargs=attr(TmpUTM,"origargs"), origargs=attr(TmpUTM,"projargs"))

which should be replaced with:

TmpLL = project_coordinates( X=Data_Extrap[,"E_km"], Y=Data_Extrap[,"N_km"], projargs=attr(TmpUTM,"projargs"), origargs=attr(TmpUTM,"origargs"))

Thanks a lot!

James-Thorson-NOAA commented 3 years ago

Arnaud,

Thanks again for looking over all the code so carefully! However, in this case it is not a typo; it is simply that project_coordinates is built to project from Lon-Lat to new coordinates; in this case however it is doing the opposite (from new coordinates back to Lon-Lat). So the naming conventions of inputs are reversed. I'll try to add more comments in the main branch.