I have two csv files, each with lat/long coordinates. I converted them into sf objects, giving each GCS (geographic coordinate system) crs. When I use the st_nearest_feature function, I get this warning:

although coordinates are longitude/latitude, st_nearest_feature assumes that they are planar

I'm just getting the index of the closest points and don't need the exact distance.

Are there any problems in not converting the coordinate systems ahead of time that I should be aware of?

  • 1
    The problem is the possibility of obtaining false results. A distance of one degree of latitude can be greater than a distance of two degrees of longitude. – Gabriel De Luca Dec 17 '19 at 22:51