Geospatial data is often stored using coordinates that are not lat-long, because these are spherical coordinates and geometry on a sphere is complex. If you are working in a small area and don't care about the inescapable distortion of pretending the earth is flat, then projected coordinates are used. You can see the projection description in "Proj.4" format with:
> proj4string(shp)
[1] "+proj=lcc +lat_1=34.91666666666666 +lat_2=27.41666666666667 +lat_0=31.16666666666667 +lon_0=-100 +x_0=1000000 +y_0=1000000 +datum=NAD83 +units=m +no_defs +ellps=GRS80 +towgs84=0,0,0"
which is stored in the .prj
file of the set of files that make up a shapefile.
The important one here is the "+proj=lcc" part, which tells us this is a "Lambert Conformal Conic" projection - take a cone, put it above the earth, project the sphere onto the cone, and unwrap the cone.
To convert from one projection to another you need the Proj.4 code for the projection you are targeting. lat-long as reported by GPS units is also known as WGS84, and is the most common lat-long system (there are others based on different shaped earths and different definitions of 0 degrees). It has a Proj.4 string of "+init=epsg:4326", which is a shortcut for several parameters like your shp
object has. You can transform sp
objects using spTransform
:
> shpLL = spTransform(shp, "+init=epsg:4326")
You may also want to look at the sf
package which provides faster functions for reading and transforming shapefiles.