Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with reprojecting code with latest version of terra and PROJ 8.0.1 #648

Closed
Robinlovelace opened this issue Sep 25, 2021 · 13 comments
Closed
Labels
binder Issues found at https://mybinder.org/v2/gh/robinlovelace/geocompr/main?urlpath=rstudio bug help wanted

Comments

@Robinlovelace
Copy link
Collaborator

Robinlovelace commented Sep 25, 2021

I think this may be an issue with terra/PROJ versions but reporting here as it affects the book, at least when it builds in the Binder environment.

Reproducible example:

remotes::install_github("rspatial/terra")
library(terra)
library(spData)
sf::sf_extSoftVersion()
cat_raster = rast(system.file("raster/nlcd.tif", package = "spDataLarge"))
crs(cat_raster)
cat_raster_wgs84 = project(cat_raster, "EPSG:4326", method = "near")

Result on computer with a recent version of PROJ:

remotes::install_github("rspatial/terra")
#> Skipping install of 'terra' from a github remote, the SHA1 (9cb87338) has not changed since last install.
#>   Use `force = TRUE` to force installation
library(terra)
#> terra version 1.4.3
library(spData)
sf::sf_extSoftVersion()
#>           GEOS           GDAL         proj.4 GDAL_with_GEOS     USE_PROJ_H 
#>        "3.9.1"        "3.3.2"        "8.0.1"         "true"         "true" 
#>           PROJ 
#>        "8.0.1"
cat_raster = rast(system.file("raster/nlcd.tif", package = "spDataLarge"))
crs(cat_raster)
#> [1] "PROJCRS[\"NAD83 / UTM zone 12N\",\n    BASEGEOGCRS[\"NAD83\",\n        DATUM[\"North American Datum 1983\",\n            ELLIPSOID[\"GRS 1980\",6378137,298.257222101,\n                LENGTHUNIT[\"metre\",1]]],\n        PRIMEM[\"Greenwich\",0,\n            ANGLEUNIT[\"degree\",0.0174532925199433]],\n        ID[\"EPSG\",4269]],\n    CONVERSION[\"UTM zone 12N\",\n        METHOD[\"Transverse Mercator\",\n            ID[\"EPSG\",9807]],\n        PARAMETER[\"Latitude of natural origin\",0,\n            ANGLEUNIT[\"degree\",0.0174532925199433],\n            ID[\"EPSG\",8801]],\n        PARAMETER[\"Longitude of natural origin\",-111,\n            ANGLEUNIT[\"degree\",0.0174532925199433],\n            ID[\"EPSG\",8802]],\n        PARAMETER[\"Scale factor at natural origin\",0.9996,\n            SCALEUNIT[\"unity\",1],\n            ID[\"EPSG\",8805]],\n        PARAMETER[\"False easting\",500000,\n            LENGTHUNIT[\"metre\",1],\n            ID[\"EPSG\",8806]],\n        PARAMETER[\"False northing\",0,\n            LENGTHUNIT[\"metre\",1],\n            ID[\"EPSG\",8807]]],\n    CS[Cartesian,2],\n        AXIS[\"(E)\",east,\n            ORDER[1],\n            LENGTHUNIT[\"metre\",1]],\n        AXIS[\"(N)\",north,\n            ORDER[2],\n            LENGTHUNIT[\"metre\",1]],\n    USAGE[\n        SCOPE[\"Engineering survey, topographic mapping.\"],\n        AREA[\"North America - between 114°W and 108°W - onshore and offshore. Canada - Alberta; Northwest Territories; Nunavut; Saskatchewan. United States (USA) - Arizona; Colorado; Idaho; Montana; New Mexico; Utah; Wyoming.\"],\n        BBOX[31.332603454538,-114,84,-108]],\n    ID[\"EPSG\",26912]]"
cat_raster_wgs84 = project(cat_raster, "EPSG:4326", method = "near")
#> Warning in x@ptr$warp(SpatRaster$new(), y, method, mask, opt): GDAL Error 1:
#> PROJ: Unrecognized horizontal grid format
#> Warning in x@ptr$warp(SpatRaster$new(), y, method, mask, opt): GDAL Error 1:
#> PROJ: hgridshift: could not find required grid(s).
#> Warning in x@ptr$warp(SpatRaster$new(), y, method, mask, opt): GDAL Error 1:
#> PROJ: pipeline: Pipeline: Bad step definition: proj=hgridshift (File not found
#> or invalid)
#> Warning in x@ptr$warp(SpatRaster$new(), y, method, mask, opt): GDAL Error 1:
#> PROJ: Unrecognized horizontal grid format
#> Warning in x@ptr$warp(SpatRaster$new(), y, method, mask, opt): GDAL Error 1:
#> PROJ: hgridshift: could not find required grid(s).
#> Warning in x@ptr$warp(SpatRaster$new(), y, method, mask, opt): GDAL Error 1:
#> PROJ: pipeline: Pipeline: Bad step definition: proj=hgridshift (File not found
#> or invalid)
#> Warning in x@ptr$warp(SpatRaster$new(), y, method, mask, opt): GDAL Error 1:
#> Too many points (484 out of 484) failed to transform, unable to compute output
#> bounds.
#> Error: [project] cannot create warp output

Created on 2021-09-25 by the reprex package (v2.0.1)

Note, this error message does not appear on older versions of PROJ.

remotes::install_github("rspatial/terra")
#> Using github PAT from envvar GITHUB_PAT
#> Skipping install of 'terra' from a github remote, the SHA1 (9cb87338) has not changed since last install.
#>   Use `force = TRUE` to force installation
library(terra)
#> terra version 1.4.3
library(spData)
sf::sf_extSoftVersion()
#>           GEOS           GDAL         proj.4 GDAL_with_GEOS     USE_PROJ_H 
#>        "3.9.0"        "3.2.1"        "7.2.1"         "true"         "true" 
#>           PROJ 
#>        "7.2.1"
cat_raster = rast(system.file("raster/nlcd.tif", package = "spDataLarge"))
crs(cat_raster)
#> [1] "PROJCRS[\"NAD83 / UTM zone 12N\",\n    BASEGEOGCRS[\"NAD83\",\n        DATUM[\"North American Datum 1983\",\n            ELLIPSOID[\"GRS 1980\",6378137,298.257222101,\n                LENGTHUNIT[\"metre\",1]]],\n        PRIMEM[\"Greenwich\",0,\n            ANGLEUNIT[\"degree\",0.0174532925199433]],\n        ID[\"EPSG\",4269]],\n    CONVERSION[\"UTM zone 12N\",\n        METHOD[\"Transverse Mercator\",\n            ID[\"EPSG\",9807]],\n        PARAMETER[\"Latitude of natural origin\",0,\n            ANGLEUNIT[\"degree\",0.0174532925199433],\n            ID[\"EPSG\",8801]],\n        PARAMETER[\"Longitude of natural origin\",-111,\n            ANGLEUNIT[\"degree\",0.0174532925199433],\n            ID[\"EPSG\",8802]],\n        PARAMETER[\"Scale factor at natural origin\",0.9996,\n            SCALEUNIT[\"unity\",1],\n            ID[\"EPSG\",8805]],\n        PARAMETER[\"False easting\",500000,\n            LENGTHUNIT[\"metre\",1],\n            ID[\"EPSG\",8806]],\n        PARAMETER[\"False northing\",0,\n            LENGTHUNIT[\"metre\",1],\n            ID[\"EPSG\",8807]]],\n    CS[Cartesian,2],\n        AXIS[\"(E)\",east,\n            ORDER[1],\n            LENGTHUNIT[\"metre\",1]],\n        AXIS[\"(N)\",north,\n            ORDER[2],\n            LENGTHUNIT[\"metre\",1]],\n    USAGE[\n        SCOPE[\"Engineering survey, topographic mapping.\"],\n        AREA[\"North America - between 114°W and 108°W - onshore and offshore. Canada - Alberta; Northwest Territories; Nunavut; Saskatchewan.  United States (USA) - Arizona; Colorado; Idaho; Montana; New Mexico; Utah; Wyoming.\"],\n        BBOX[31.33,-114,84,-108]],\n    ID[\"EPSG\",26912]]"
cat_raster_wgs84 = project(cat_raster, "EPSG:4326", method = "near")

Created on 2021-09-25 by the reprex package (v2.0.1)

@Robinlovelace Robinlovelace added binder Issues found at https://mybinder.org/v2/gh/robinlovelace/geocompr/main?urlpath=rstudio bug help wanted labels Sep 25, 2021
@mdsumner
Copy link
Contributor

Does it work if sf is also installed? If it's Linux then that will sort out the pro files thing, or sf might have same problem

@Nowosad
Copy link
Member

Nowosad commented Sep 26, 2021

I do not have this problem on slightly newer proj (and older gdal):

library(terra)
#> terra version 1.4.3
library(spData)
sf::sf_extSoftVersion()
#>           GEOS           GDAL         proj.4 GDAL_with_GEOS     USE_PROJ_H 
#>        "3.9.1"        "3.3.1"        "8.1.0"         "true"         "true" 
#>           PROJ 
#>        "8.1.0"
cat_raster = rast(system.file("raster/nlcd.tif", package = "spDataLarge"))
crs(cat_raster)
#> [1] "PROJCRS[\"NAD83 / UTM zone 12N\",\n    BASEGEOGCRS[\"NAD83\",\n        DATUM[\"North American Datum 1983\",\n            ELLIPSOID[\"GRS 1980\",6378137,298.257222101,\n                LENGTHUNIT[\"metre\",1]]],\n        PRIMEM[\"Greenwich\",0,\n            ANGLEUNIT[\"degree\",0.0174532925199433]],\n        ID[\"EPSG\",4269]],\n    CONVERSION[\"UTM zone 12N\",\n        METHOD[\"Transverse Mercator\",\n            ID[\"EPSG\",9807]],\n        PARAMETER[\"Latitude of natural origin\",0,\n            ANGLEUNIT[\"degree\",0.0174532925199433],\n            ID[\"EPSG\",8801]],\n        PARAMETER[\"Longitude of natural origin\",-111,\n            ANGLEUNIT[\"degree\",0.0174532925199433],\n            ID[\"EPSG\",8802]],\n        PARAMETER[\"Scale factor at natural origin\",0.9996,\n            SCALEUNIT[\"unity\",1],\n            ID[\"EPSG\",8805]],\n        PARAMETER[\"False easting\",500000,\n            LENGTHUNIT[\"metre\",1],\n            ID[\"EPSG\",8806]],\n        PARAMETER[\"False northing\",0,\n            LENGTHUNIT[\"metre\",1],\n            ID[\"EPSG\",8807]]],\n    CS[Cartesian,2],\n        AXIS[\"(E)\",east,\n            ORDER[1],\n            LENGTHUNIT[\"metre\",1]],\n        AXIS[\"(N)\",north,\n            ORDER[2],\n            LENGTHUNIT[\"metre\",1]],\n    USAGE[\n        SCOPE[\"Engineering survey, topographic mapping.\"],\n        AREA[\"North America - between 114°W and 108°W - onshore and offshore. Canada - Alberta; Northwest Territories; Nunavut; Saskatchewan. United States (USA) - Arizona; Colorado; Idaho; Montana; New Mexico; Utah; Wyoming.\"],\n        BBOX[31.33,-114,84,-108]],\n    ID[\"EPSG\",26912]]"
cat_raster_wgs84 = project(cat_raster, "EPSG:4326", method = "near")

Created on 2021-09-26 by the reprex package (v2.0.1)

@Robinlovelace
Copy link
Collaborator Author

Good to see the problem is not there on new PROJ, thanks for testing Jakub...

@Robinlovelace
Copy link
Collaborator Author

Does it work if sf is also installed? If it's Linux then that will sort out the pro files thing, or sf might have same problem

Good question. Contrary to my expectation, the CRS transformation worked for an sf and stars representations of the object, but with warnings:

remotes::install_github("rspatial/terra")
library(terra)
library(spData)
sf::sf_extSoftVersion()
cat_raster = rast(system.file("raster/nlcd.tif", package = "spDataLarge"))
cat_stars = stars::read_stars(system.file("raster/nlcd.tif", package = "spDataLarge"))
sf::st_crs(cat_stars)
cat_stars_4326 = sf::st_transform(cat_stars, 4326) # warnings
cat_sf = sf::st_as_sf(cat_stars)
plot(cat_sf[1:5, ]) # works
cat_sf_4326 = sf::st_transform(cat_sf[1:9, ], 4326) # warnings
mapview::mapview(cat_sf_4326)

@Robinlovelace
Copy link
Collaborator Author

Robinlovelace commented Sep 26, 2021

Warnings from transforming the stars object:

> cat_stars_4326 = sf::st_transform(cat_stars, 4326)
Unrecognized horizontal grid format
hgridshift: could not find required grid(s).
pipeline: Pipeline: Bad step definition: proj=hgridshift (File not found or invalid)

@Robinlovelace
Copy link
Collaborator Author

Any ideas how get the required file or make that warning go away?

@Robinlovelace
Copy link
Collaborator Author

Full reprex below.

remotes::install_github("rspatial/terra")
#> Skipping install of 'terra' from a github remote, the SHA1 (9cb87338) has not changed since last install.
#>   Use `force = TRUE` to force installation
library(terra)
#> terra version 1.4.3
library(spData)
sf::sf_extSoftVersion()
#>           GEOS           GDAL         proj.4 GDAL_with_GEOS     USE_PROJ_H 
#>        "3.9.1"        "3.3.2"        "8.0.1"         "true"         "true" 
#>           PROJ 
#>        "8.0.1"
cat_raster = rast(system.file("raster/nlcd.tif", package = "spDataLarge"))
cat_stars = stars::read_stars(system.file("raster/nlcd.tif", package = "spDataLarge"))
sf::st_crs(cat_stars)
#> Coordinate Reference System:
#>   User input: NAD83 / UTM zone 12N 
#>   wkt:
#> PROJCRS["NAD83 / UTM zone 12N",
#>     BASEGEOGCRS["NAD83",
#>         DATUM["North American Datum 1983",
#>             ELLIPSOID["GRS 1980",6378137,298.257222101,
#>                 LENGTHUNIT["metre",1]]],
#>         PRIMEM["Greenwich",0,
#>             ANGLEUNIT["degree",0.0174532925199433]],
#>         ID["EPSG",4269]],
#>     CONVERSION["UTM zone 12N",
#>         METHOD["Transverse Mercator",
#>             ID["EPSG",9807]],
#>         PARAMETER["Latitude of natural origin",0,
#>             ANGLEUNIT["degree",0.0174532925199433],
#>             ID["EPSG",8801]],
#>         PARAMETER["Longitude of natural origin",-111,
#>             ANGLEUNIT["degree",0.0174532925199433],
#>             ID["EPSG",8802]],
#>         PARAMETER["Scale factor at natural origin",0.9996,
#>             SCALEUNIT["unity",1],
#>             ID["EPSG",8805]],
#>         PARAMETER["False easting",500000,
#>             LENGTHUNIT["metre",1],
#>             ID["EPSG",8806]],
#>         PARAMETER["False northing",0,
#>             LENGTHUNIT["metre",1],
#>             ID["EPSG",8807]]],
#>     CS[Cartesian,2],
#>         AXIS["(E)",east,
#>             ORDER[1],
#>             LENGTHUNIT["metre",1]],
#>         AXIS["(N)",north,
#>             ORDER[2],
#>             LENGTHUNIT["metre",1]],
#>     USAGE[
#>         SCOPE["Engineering survey, topographic mapping."],
#>         AREA["North America - between 114°W and 108°W - onshore and offshore. Canada - Alberta; Northwest Territories; Nunavut; Saskatchewan. United States (USA) - Arizona; Colorado; Idaho; Montana; New Mexico; Utah; Wyoming."],
#>         BBOX[31.332603454538,-114,84,-108]],
#>     ID["EPSG",26912]]
cat_stars_4326 = sf::st_transform(cat_stars, 4326) 
cat_sf = sf::st_as_sf(cat_stars)
# plot(cat_sf[1:5, ]) # works
cat_sf_4326 = sf::st_transform(cat_sf[1:9, ], 4326)
#> Warning in CPL_transform(x, crs, aoi, pipeline, reverse, desired_accuracy, :
#> GDAL Error 1: PROJ: Unrecognized horizontal grid format
#> Warning in CPL_transform(x, crs, aoi, pipeline, reverse, desired_accuracy, :
#> GDAL Error 1: PROJ: hgridshift: could not find required grid(s).
#> Warning in CPL_transform(x, crs, aoi, pipeline, reverse, desired_accuracy, :
#> GDAL Error 1: PROJ: pipeline: Pipeline: Bad step definition: proj=hgridshift
#> (File not found or invalid)
#> Warning in CPL_transform(x, crs, aoi, pipeline, reverse, desired_accuracy, :
#> GDAL Error 1: PROJ: Unrecognized horizontal grid format
#> Warning in CPL_transform(x, crs, aoi, pipeline, reverse, desired_accuracy, :
#> GDAL Error 1: PROJ: hgridshift: could not find required grid(s).
#> Warning in CPL_transform(x, crs, aoi, pipeline, reverse, desired_accuracy, :
#> GDAL Error 1: PROJ: pipeline: Pipeline: Bad step definition: proj=hgridshift
#> (File not found or invalid)
#> Warning in CPL_transform(x, crs, aoi, pipeline, reverse, desired_accuracy, :
#> GDAL Error 1: PROJ: Unrecognized horizontal grid format
#> Warning in CPL_transform(x, crs, aoi, pipeline, reverse, desired_accuracy, :
#> GDAL Error 1: PROJ: hgridshift: could not find required grid(s).
#> Warning in CPL_transform(x, crs, aoi, pipeline, reverse, desired_accuracy, :
#> GDAL Error 1: PROJ: pipeline: Pipeline: Bad step definition: proj=hgridshift
#> (File not found or invalid)
#> Warning in CPL_transform(x, crs, aoi, pipeline, reverse, desired_accuracy, :
#> GDAL Error 1: PROJ: Unrecognized horizontal grid format
#> Warning in CPL_transform(x, crs, aoi, pipeline, reverse, desired_accuracy, :
#> GDAL Error 1: PROJ: hgridshift: could not find required grid(s).
#> Warning in CPL_transform(x, crs, aoi, pipeline, reverse, desired_accuracy, :
#> GDAL Error 1: PROJ: pipeline: Pipeline: Bad step definition: proj=hgridshift
#> (File not found or invalid)
#> Warning in CPL_transform(x, crs, aoi, pipeline, reverse, desired_accuracy, :
#> GDAL Error 1: PROJ: Unrecognized horizontal grid format
#> Warning in CPL_transform(x, crs, aoi, pipeline, reverse, desired_accuracy, :
#> GDAL Error 1: PROJ: hgridshift: could not find required grid(s).
#> Warning in CPL_transform(x, crs, aoi, pipeline, reverse, desired_accuracy, :
#> GDAL Error 1: PROJ: pipeline: Pipeline: Bad step definition: proj=hgridshift
#> (File not found or invalid)
#> Warning in CPL_transform(x, crs, aoi, pipeline, reverse, desired_accuracy, :
#> GDAL Error 1: PROJ: Unrecognized horizontal grid format
#> Warning in CPL_transform(x, crs, aoi, pipeline, reverse, desired_accuracy, :
#> GDAL Error 1: PROJ: hgridshift: could not find required grid(s).
#> Warning in CPL_transform(x, crs, aoi, pipeline, reverse, desired_accuracy, :
#> GDAL Error 1: PROJ: pipeline: Pipeline: Bad step definition: proj=hgridshift
#> (File not found or invalid)
#> Warning in CPL_transform(x, crs, aoi, pipeline, reverse, desired_accuracy, :
#> GDAL Error 1: PROJ: Unrecognized horizontal grid format
#> Warning in CPL_transform(x, crs, aoi, pipeline, reverse, desired_accuracy, :
#> GDAL Error 1: PROJ: hgridshift: could not find required grid(s).
#> Warning in CPL_transform(x, crs, aoi, pipeline, reverse, desired_accuracy, :
#> GDAL Error 1: PROJ: pipeline: Pipeline: Bad step definition: proj=hgridshift
#> (File not found or invalid)
#> Warning in CPL_transform(x, crs, aoi, pipeline, reverse, desired_accuracy, :
#> GDAL Error 1: PROJ: Unrecognized horizontal grid format
#> Warning in CPL_transform(x, crs, aoi, pipeline, reverse, desired_accuracy, :
#> GDAL Error 1: PROJ: hgridshift: could not find required grid(s).
#> Warning in CPL_transform(x, crs, aoi, pipeline, reverse, desired_accuracy, :
#> GDAL Error 1: PROJ: pipeline: Pipeline: Bad step definition: proj=hgridshift
#> (File not found or invalid)
#> Warning in CPL_transform(x, crs, aoi, pipeline, reverse, desired_accuracy, :
#> GDAL Error 1: PROJ: Unrecognized horizontal grid format
#> Warning in CPL_transform(x, crs, aoi, pipeline, reverse, desired_accuracy, :
#> GDAL Error 1: PROJ: hgridshift: could not find required grid(s).
#> Warning in CPL_transform(x, crs, aoi, pipeline, reverse, desired_accuracy, :
#> GDAL Error 1: PROJ: pipeline: Pipeline: Bad step definition: proj=hgridshift
#> (File not found or invalid)
warnings()

Created on 2021-09-26 by the reprex package (v2.0.1)

@Robinlovelace
Copy link
Collaborator Author

Robinlovelace commented Sep 26, 2021

My guess: sf and stars can handle the situation when the 'required grid(s)' are not present but emit a warning and transform the object less accurately. terra does not have such a fallback option. 2 pottential solutions come to mind:

  1. Upstream changes in the terra codebase to make it use a fallback transformation pipeline and emit a warning not an error
  2. Silently check for the 'required grid(s)' with code in the geocompr repo and download them if they are not there

Not sure either solution is possible/appropriate.

Wider question: is there a way to download new transform grids from the R command line? Could be worth a section in the book if so.

@Nowosad
Copy link
Member

Nowosad commented Sep 26, 2021

My suggestions:

  1. Open a new issue about this in the terra repo to share this discovery
  2. Yes, there is a way to download new transform grids (at least in sf) - I plan to write about it in the 6th chapter. You need to set sf_proj_network to TRUE (it is FALSE by default).
sf_proj_network(TRUE)

@Robinlovelace
Copy link
Collaborator Author

Minor update on this, issue still appears on Binder, this is the issue I get after running bookdown::serve_book() in that rather specific environment:

label: 06-reproj-31
Quitting from lines 473-474 (06-reproj.Rmd) 
Error: [project] cannot create warp output

Execution halted
Error in Rscript_render(f, render_args, render_meta, add1, add2) : 
  Failed to compile 06-reproj.Rmd

Source: https://mybinder.org/v2/gh/robinlovelace/geocompr/main?urlpath=rstudio

@Nowosad
Copy link
Member

Nowosad commented Oct 11, 2021

Could it be related to having PROJ 8.0.1 (as oppose to e.g., PROJ 8.1.0)?

@Robinlovelace
Copy link
Collaborator Author

Could be...

@Robinlovelace
Copy link
Collaborator Author

Fixed on the new version of binder discussed in #691

Test it here: https://mybinder.org/v2/gh/robinlovelace/geocompr/main?urlpath=rstudio

> library(terra)
terra version 1.5.2
> library(spData)
Warning message:
multiple methods tables found for ‘approxNA’ 
> sf::sf_extSoftVersion()
          GEOS           GDAL         proj.4 GDAL_with_GEOS     USE_PROJ_H           PROJ 
       "3.8.0"        "3.0.4"        "6.3.1"         "true"         "true"        "6.3.1" 
> cat_raster = rast(system.file("raster/nlcd.tif", package = "spDataLarge"))
> crs(cat_raster)
[1] "PROJCRS[\"NAD83 / UTM zone 12N\",\n    BASEGEOGCRS[\"NAD83\",\n        DATUM[\"North American Datum 1983\",\n            ELLIPSOID[\"GRS 1980\",6378137,298.257222101,\n                LENGTHUNIT[\"metre\",1]]],\n        PRIMEM[\"Greenwich\",0,\n            ANGLEUNIT[\"degree\",0.0174532925199433]],\n        ID[\"EPSG\",4269]],\n    CONVERSION[\"UTM zone 12N\",\n        METHOD[\"Transverse Mercator\",\n            ID[\"EPSG\",9807]],\n        PARAMETER[\"Latitude of natural origin\",0,\n            ANGLEUNIT[\"degree\",0.0174532925199433],\n            ID[\"EPSG\",8801]],\n        PARAMETER[\"Longitude of natural origin\",-111,\n            ANGLEUNIT[\"degree\",0.0174532925199433],\n            ID[\"EPSG\",8802]],\n        PARAMETER[\"Scale factor at natural origin\",0.9996,\n            SCALEUNIT[\"unity\",1],\n            ID[\"EPSG\",8805]],\n        PARAMETER[\"False easting\",500000,\n            LENGTHUNIT[\"metre\",1],\n            ID[\"EPSG\",8806]],\n        PARAMETER[\"False northing\",0,\n            LENGTHUNIT[\"metre\",1],\n            ID[\"EPSG\",8807]]],\n    CS[Cartesian,2],\n        AXIS[\"(E)\",east,\n            ORDER[1],\n            LENGTHUNIT[\"metre\",1]],\n        AXIS[\"(N)\",north,\n            ORDER[2],\n            LENGTHUNIT[\"metre\",1]],\n    USAGE[\n        SCOPE[\"unknown\"],\n        AREA[\"North America - 114°W to 108°W and NAD83 by country\"],\n        BBOX[31.33,-114,84,-108]],\n    ID[\"EPSG\",26912]]"
> cat_raster_wgs84 = project(cat_raster, "EPSG:4326", method = "near")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
binder Issues found at https://mybinder.org/v2/gh/robinlovelace/geocompr/main?urlpath=rstudio bug help wanted
Projects
None yet
Development

No branches or pull requests

3 participants