Skip to content

transforming error before cropping #12

Description

@COverton-CWA

This may be a system issue on my end involving a recent QGIS install as my default PROJ_LIB and GDAL_DATA environment variables originally pointed to a postgres install rather than rtools but...

I can't transform vectors to the abundance raster crs:

> median_abund<-load_raster("Abert's Towhee", product = "abundance", metric = "median", resolution = "9km") 
> northamerica <- st_read(system.file("shapes/world.gpkg", package="spData")) %>% filter(continent == "North America")
> northamerica<-northamerica %>% st_transform(st_crs(median_abund))

results in

Warning in CPL_transform(x, crs, aoi, pipeline, reverse, desired_accuracy,  :
  GDAL Error 6: Cannot find coordinate operations from `{
  "$schema": "https://proj.org/schemas/v0.7/projjson.schema.json",
  "type": "ProjectedCRS",
  "name": "unknown",
  "base_crs": {
    "type": "GeographicCRS",
    "name": "unknown",
    "datum": {
      "type": "GeodeticReferenceFrame",
      "name": "World Geodetic System 1984",
      "ellipsoid": {
        "name": "WGS 84",
        "semi_major_axis": 6378137,
        "inverse_flattening": 298.257223563
      },
      "id": {
        "authority": "EPSG",
        "code": 6326
      }
    },
    "coordinate_system": {
      "subtype": "ellipsoidal",
      "axis": [
        {
          "name": "Latitude",
          "abbreviation": "lat",
          "direction": "north",
          "unit": "degree"
        },
        {
          "name": "Longitude",
          "abbreviation": "lon",
          "direction": "east",
          "unit": "degree"
        }
      ]
    }
  },
  "conversion": {
    "name": "unknown",
    "method": {

Error: OGRCreateCoordinateTransformation(): transformation not available

as does

northamerica<-exact_extract(median_abund, northamerica, 'sum')

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions