Skip to main content
Bumped by Community user

I am trying to use a .tif file from USDA's CropScape, which has the proj4 string

"+proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-96 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs +ellps=GRS80 +towgs84=0,0,0"

"+proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-96 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs +ellps=GRS80 +towgs84=0,0,0"

Creating the original raster object succeeds and is plottable, but comes along with the error message

"Warning message: In .newCRS(value) : +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-96 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs +ellps=GRS80 +towgs84=0,0,0 is not a valid PROJ.4 CRS string"

"Warning message: In .newCRS(value) : +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-96 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs +ellps=GRS80 +towgs84=0,0,0 is not a valid PROJ.4 CRS string"

Likewise, trying to manually assign the CRS by typing

crs(cropscape) <- "proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-96 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs +ellps=GRS80 +towgs84=0,0,0" 

does not work and returns a similar error message, that it is not a valid PROJ.4 CRS string.

I'm no CRS or PROJ4 genius but I do not see what is wrong with this string. What is the problem here?

For reproducability: this is the code being used to generate the cropscape raster object:

cropscape <- GET(url="https://nassgeodata.gmu.edu", path="axis2/services/CDLService/GetCDLFile?year=2014&fips=06") %>% content('text') %>% str_remove(".*<returnURL>") %>% str_remove("</returnURL>.*") %>% raster() 

I am trying to use a .tif file from USDA's CropScape, which has the proj4 string

"+proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-96 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs +ellps=GRS80 +towgs84=0,0,0"

Creating the original raster object succeeds and is plottable, but comes along with the error message

"Warning message: In .newCRS(value) : +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-96 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs +ellps=GRS80 +towgs84=0,0,0 is not a valid PROJ.4 CRS string"

Likewise, trying to manually assign the CRS by typing

crs(cropscape) <- "proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-96 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs +ellps=GRS80 +towgs84=0,0,0" 

does not work and returns a similar error message, that it is not a valid PROJ.4 CRS string.

I'm no CRS or PROJ4 genius but I do not see what is wrong with this string. What is the problem here?

For reproducability: this is the code being used to generate the cropscape raster object:

cropscape <- GET(url="https://nassgeodata.gmu.edu", path="axis2/services/CDLService/GetCDLFile?year=2014&fips=06") %>% content('text') %>% str_remove(".*<returnURL>") %>% str_remove("</returnURL>.*") %>% raster() 

I am trying to use a .tif file from USDA's CropScape, which has the proj4 string

"+proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-96 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs +ellps=GRS80 +towgs84=0,0,0"

Creating the original raster object succeeds and is plottable, but comes along with the error message

"Warning message: In .newCRS(value) : +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-96 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs +ellps=GRS80 +towgs84=0,0,0 is not a valid PROJ.4 CRS string"

Likewise, trying to manually assign the CRS by typing

crs(cropscape) <- "proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-96 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs +ellps=GRS80 +towgs84=0,0,0" 

does not work and returns a similar error message, that it is not a valid PROJ.4 CRS string.

I'm no CRS or PROJ4 genius but I do not see what is wrong with this string. What is the problem here?

For reproducability: this is the code being used to generate the cropscape raster object:

cropscape <- GET(url="https://nassgeodata.gmu.edu", path="axis2/services/CDLService/GetCDLFile?year=2014&fips=06") %>% content('text') %>% str_remove(".*<returnURL>") %>% str_remove("</returnURL>.*") %>% raster() 
Source Link

What is wrong with this proj4 string that the raster package in R will not accept?

I am trying to use a .tif file from USDA's CropScape, which has the proj4 string

"+proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-96 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs +ellps=GRS80 +towgs84=0,0,0"

Creating the original raster object succeeds and is plottable, but comes along with the error message

"Warning message: In .newCRS(value) : +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-96 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs +ellps=GRS80 +towgs84=0,0,0 is not a valid PROJ.4 CRS string"

Likewise, trying to manually assign the CRS by typing

crs(cropscape) <- "proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-96 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs +ellps=GRS80 +towgs84=0,0,0" 

does not work and returns a similar error message, that it is not a valid PROJ.4 CRS string.

I'm no CRS or PROJ4 genius but I do not see what is wrong with this string. What is the problem here?

For reproducability: this is the code being used to generate the cropscape raster object:

cropscape <- GET(url="https://nassgeodata.gmu.edu", path="axis2/services/CDLService/GetCDLFile?year=2014&fips=06") %>% content('text') %>% str_remove(".*<returnURL>") %>% str_remove("</returnURL>.*") %>% raster()