massbays-tech / MassWateR

R package for working with Massachusetts surface water quality data
https://massbays-tech.github.io/MassWateR
Creative Commons Zero v1.0 Universal
11 stars 3 forks source link

anlzMWRmap longitude/latitude messages #33

Closed ben-wetherill closed 2 years ago

ben-wetherill commented 2 years ago

I'm wondering if we should consider trying to remove the messages that display when running maps... although coordinates are longitude/latitude, st_intersection assumes that they are planar although coordinates are longitude/latitude, st_intersection assumes that they are planar although coordinates are longitude/latitude, st_intersection assumes that they are planar Warning message: In st_buffer.sfc(., dist = units::set_units(buffdist, degree)) : st_buffer does not correctly buffer longitude/latitude data

I found that we can use the suppressMessages() function to hide the first three messages. This works if I run suppressMessages(analyzeMWRmap()). Since these messages are only important for large scale maps and maps near the poles, we can probably safely hide them for our solution.

For the warning message, I found this discussion https://gis.stackexchange.com/questions/303126/how-to-buffer-a-pair-of-longitude-and-latitude-coordinates-in-r. What do you think?

fawda123 commented 2 years ago

@ben-wetherill I think I finally got this figured out. Give it a try and let me know if it's fixed.

ben-wetherill commented 2 years ago

It looks like it is fixed. Thank you.