I think that by using readOGR to import a shapefile renders worthless to put proj4string to the script since if any coords are available in the shapefile, it will be transported through the readOGR.
Therefore, proj4string is expedient only if we use another import function for example readShapeSpatial
(for polygons, lines or points) or by using readOGR, but in the case that the shapefile does not contain the coordinates/projection:
When checking if the shapefile has projection information and if it has not, should I add proj4string although I have put readOGR?
Best Answer
As JeffreyEvans states,
readOGR
from thergdal
library imports a CRS if there is one embedded in the shapefile. You can check by (example using a shp I've been playing with):If this returns
NA
you can specify a CRS with:You can obtain the EPSG CRS strings from http://spatialreference.org/
To answer your specific question, yes, you should define a projection if one is not specified.
If one is not certain which CRS to assign/define, refer to the following post:
And if one wants to reproject a spatial object in R, i.e., change its projection, then refer to: