[GRASS-user] error when importing soil grids data into GRASS

Veronica Andreo veroandreo at gmail.com
Tue Dec 7 09:11:53 PST 2021


Dear all,

I'm trying to import soil grids data for south america into grass gis by
means of r.import and the vsicurl driver and I'm facing different errors
according to the soilgrid version I use. See below:

Fist attempt:

gdalinfo /vsicurl/
https://files.isric.org/soilgrids/latest/data/ocd/ocd_0-5cm_mean.vrt
Driver: VRT/Virtual Raster
Files: /vsicurl/
https://files.isric.org/soilgrids/latest/data/ocd/ocd_0-5cm_mean.vrt
       /vsicurl/
https://files.isric.org/soilgrids/latest/data/ocd/ocd_0-5cm_mean.vrt.ovr
       /vsicurl/
https://files.isric.org/soilgrids/latest/data/ocd/./ocd_0-5cm_mean/tileSG-018-027/tileSG-018-027_2-4.tif
       /vsicurl/
https://files.isric.org/soilgrids/latest/data/ocd/./ocd_0-5cm_mean/tileSG-018-027/tileSG-018-027_1-1.tif
...
Size is 159246, 58034
Coordinate System is:
PROJCRS["Interrupted_Goode_Homolosine",
    BASEGEOGCRS["GCS_WGS_1984 ellipse",
        DATUM["World Geodetic System 1984",
            ELLIPSOID["WGS 84",6378137,298.257223563,
                LENGTHUNIT["metre",1]],
            ID["EPSG",6326]],
        PRIMEM["Greenwich",0,
            ANGLEUNIT["Degree",0.0174532925199433]]],
    CONVERSION["unnamed",
        METHOD["Interrupted Goode Homolosine"]],
    CS[Cartesian,2],
        AXIS["(E)",east,
            ORDER[1],
            LENGTHUNIT["metre",1,
                ID["EPSG",9001]]],
        AXIS["(N)",north,
            ORDER[2],
            LENGTHUNIT["metre",1,
                ID["EPSG",9001]]]]

r.import input="/vsicurl/
https://files.isric.org/soilgrids/latest/data/ocd/ocd_0-5cm_mean.vrt"
output=ocd_0_5cm_mean extent=region
...
Selected PROJ pipeline:
+proj=pipeline +step +proj=unitconvert +xy_in=deg +xy_out=rad +step
+proj=igh +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84
************************
Reproyectado primitivas...
Construyendo topología para el mapa vectorial
<tmp_r_import_region_localhost_localdomain_918305 at PERMANENT>...
Registrando primitivas...
Construyendo áreas.
 100%
Adjuntando islas...
 100%
Adjuntando centróides...
 100%
Importando mapa ráster <ocd_0_5cm_mean>...
ERROR 4: `/vsicurl/
https://files.isric.org/soilgrids/latest/data/ocd/./ocd_0-5cm_mean/tileSG-022-030/tileSG-022-030_2-3.tif'
not recognized as a supported file format.
ERROR: Unable to read row 11740
ERROR: Unable to import GDAL dataset
       </vsicurl/
https://files.isric.org/soilgrids/latest/data/ocd/ocd_0-5cm_mean.vrt>

Second attempt, newer dataset soilgrids 2.0 pre-release

r.import input="/vsicurl/
https://storage.googleapis.com/isric-share-soilgrids/pre-release/wv1500/wv1500_0-5cm_mean.tif"
output=wv1500_0_5cm_mean extent=region
Warning 1: /vsicurl/
https://storage.googleapis.com/isric-share-soilgrids/pre-release/wv1500/wv1500_0-5cm_mean.tif:
This file used to have optimizations in its layout, but those have been, at
least partly, invalidated by later changes
ADVERTENCIA: Actualizando el sistema de referencia espacial con la
             definición proj4 incrustada.
...
Selected PROJ pipeline:
+proj=pipeline +step +proj=unitconvert +xy_in=deg +xy_out=rad +step
+proj=igh +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84
************************
Reproyectado primitivas...
Construyendo topología para el mapa vectorial
<tmp_r_import_region_localhost_localdomain_918176 at PERMANENT>...
Registrando primitivas...
Construyendo áreas.
 100%
Adjuntando islas...
 100%
Adjuntando centróides...
 100%
Warning 1: /vsicurl/
https://storage.googleapis.com/isric-share-soilgrids/pre-release/wv1500/wv1500_0-5cm_mean.tif:
This file used to have optimizations in its layout, but those have been, at
least partly, invalidated by later changes
ADVERTENCIA: Actualizando el sistema de referencia espacial con la
             definición proj4 incrustada.
Importando mapa ráster <wv1500_0_5cm_mean>...
 100%
Removiendo vector <tmp_r_import_region_localhost_localdomain_918176>
Removiendo vector <tmp_r_import_region_localhost_localdomain_918176>
Estimated target resolution for input band <wv1500_0_5cm_mean>:
0.0022003864773300253
Reprojecting <wv1500_0_5cm_mean>...
ADVERTENCIA: proj_create() failed for '(null)'
ERROR: Unable to initialize coordinate transformation
ERROR: Unable to to reproject raster <wv1500_0_5cm_mean>

It imports the raster but fails at re-projection... CRS is unknown in the
tif

gdalinfo /vsicurl/
https://storage.googleapis.com/isric-share-soilgrids/pre-release/wv1500/wv1500_0-5cm_mean.tif
Warning 1: /vsicurl/
https://storage.googleapis.com/isric-share-soilgrids/pre-release/wv1500/wv1500_0-5cm_mean.tif:
This file used to have optimizations in its layout, but those have been, at
least partly, invalidated by later changes
Driver: GTiff/GeoTIFF
Files: /vsicurl/
https://storage.googleapis.com/isric-share-soilgrids/pre-release/wv1500/wv1500_0-5cm_mean.tif
Size is 159246, 58034
Coordinate System is:
PROJCRS["unknown",
    BASEGEOGCRS["unknown",
        DATUM["World Geodetic System 1984",
            ELLIPSOID["WGS 84",6378137,298.257223563,
                LENGTHUNIT["metre",1]],
            ID["EPSG",6326]],
        PRIMEM["Greenwich",0,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8901]]],
    CONVERSION["unknown",
        METHOD["Interrupted Goode Homolosine"],
        PARAMETER["Longitude of natural origin",0,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8802]],
...

Any suggestion? The second attempt seems a problem of the data provider not
defining the CRS properly. But what about the first case, where the CRS is
defined, any ideas on why the projection is not recognized? Any experience
importing these data?

Thanks much in advance!
Vero

My system info:
Versión de GRASS: 8.0.dev

Fecha de compilación: 2021-10-13

GDAL: 3.2.2

PROJ: 7.2.1

GEOS: 3.9.0

SQLite: 3.34.1

Python: 3.9.7

wxPython: 4.0.7

Plataforma: Linux-5.14.9-200.fc34.x86_64-x86_64-with-glibc2.33
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20211207/b72d9412/attachment.html>


More information about the grass-user mailing list