5

Trying to merge multiple raster layers (TIFF's) with the same extent with Saga-GIS Mosaic raster layers. The only reason I'm using this Mosiac-thing is because it lets me merge multiple layers (hundreds of them) and retain only the minimum value. But I end up with this error:

'NoneType' object has no attribute 'crs'

What am I doing wrong?

Log, Mosaic-options and raster metadata below.

Mosaic-options:

enter image description here

TIFF-metadata:

Driver
GDAL provider
GTiff
GeoTIFF
Dataset Description
/Users/Jonas/not_cum_test_0_Invisibility.tiff
AREA_OR_POINT=Area
Band 1
STATISTICS_MAXIMUM=0
STATISTICS_MEAN=-34.217218834805
STATISTICS_MINIMUM=-133.25929260254
STATISTICS_STDDEV=29.597849327319
Dimensions
X: 695 Y: 712 Bands: 1
Origin
671356,6.58518e+06
Pixel Size
2.00012,-2.00053
No Data Value
nan 
Data Type
Float32 - Thirty two bit floating point 
Pyramid overviews
Layer Spatial Reference System
+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
Layer Extent (layer original source projection)
671356.3201076468685642,6583758.8905753996223211 : 672746.4011552316369489,6585183.2697039842605591
Band
Band 1
Band No
1
Min Val
-133.2592926025
Max Val
0.0000000000
Range
133.2592926025
Mean
-34.2172188348
Sum of squares
433496013.7477690578
Standard Deviation
29.5978792338
Sum of all cells
-16932048.5682150051
Cell Count
494840 

Saga-GIS error log:

Algorithm Mosaic raster layers starting...
    io_gdal 0 -TRANSFORM 1 -INTERPOL 0 -GRIDS "/var/folders/0x/bvgzg4c56nq94kfk_j2zzxkw0000gn/T/processing43e4ecf7b3a942ebbaea0a0f1d203ea3/c4cf34846dd944cfa14836c72f295c17/notcumtest3Invisibility.sgrd" -FILES "/Users/Jonas/not_cum_test_3_Invisibility.tiff"
    io_gdal 0 -TRANSFORM 1 -INTERPOL 0 -GRIDS "/var/folders/0x/bvgzg4c56nq94kfk_j2zzxkw0000gn/T/processing43e4ecf7b3a942ebbaea0a0f1d203ea3/4fa2106d203044cbb7e2d6df7386a625/notcumtest2Invisibility.sgrd" -FILES "/Users/Jonas/not_cum_test_2_Invisibility.tiff"
    io_gdal 0 -TRANSFORM 1 -INTERPOL 0 -GRIDS "/var/folders/0x/bvgzg4c56nq94kfk_j2zzxkw0000gn/T/processing43e4ecf7b3a942ebbaea0a0f1d203ea3/608f4aaa09594965a9c919ef809143bf/notcumtest1Invisibility.sgrd" -FILES "/Users/Jonas/not_cum_test_1_Invisibility.tiff"
    io_gdal 0 -TRANSFORM 1 -INTERPOL 0 -GRIDS "/var/folders/0x/bvgzg4c56nq94kfk_j2zzxkw0000gn/T/processing43e4ecf7b3a942ebbaea0a0f1d203ea3/0ddef947d1b44e30ab1c8b806ed45a82/notcumtest0Invisibility.sgrd" -FILES "/Users/Jonas/not_cum_test_0_Invisibility.tiff"
    grid_tools "Mosaicking" -TARGET_DEFINITION 0 -GRIDS "/var/folders/0x/bvgzg4c56nq94kfk_j2zzxkw0000gn/T/processing43e4ecf7b3a942ebbaea0a0f1d203ea3/c4cf34846dd944cfa14836c72f295c17/notcumtest3Invisibility.sgrd;/var/folders/0x/bvgzg4c56nq94kfk_j2zzxkw0000gn/T/processing43e4ecf7b3a942ebbaea0a0f1d203ea3/4fa2106d203044cbb7e2d6df7386a625/notcumtest2Invisibility.sgrd;/var/folders/0x/bvgzg4c56nq94kfk_j2zzxkw0000gn/T/processing43e4ecf7b3a942ebbaea0a0f1d203ea3/608f4aaa09594965a9c919ef809143bf/notcumtest1Invisibility.sgrd;/var/folders/0x/bvgzg4c56nq94kfk_j2zzxkw0000gn/T/processing43e4ecf7b3a942ebbaea0a0f1d203ea3/0ddef947d1b44e30ab1c8b806ed45a82/notcumtest0Invisibility.sgrd" -NAME "Mosaic" -TYPE 7 -INTERPOL 0 -OVERLAP 2 -BLEND_DIST 10 -MATCH 0 -TARGET_USER_XMIN 671356.320108 -TARGET_USER_XMAX 672746.401155 -TARGET_USER_YMIN 6583758.89058 -TARGET_USER_YMAX 6585183.2697 -TARGET_USER_SIZE 100 -TARGET_USER_FITS 0 -TARGET_OUT_GRID "/var/folders/0x/bvgzg4c56nq94kfk_j2zzxkw0000gn/T/processing43e4ecf7b3a942ebbaea0a0f1d203ea3/990cd25158734cbba3f7e43a0cd73813/TARGETOUTGRID.sdat"
    /Users/Jonas/.qgis2//processing/saga_batch_job.sh: line 3: 91765 Segmentation fault: 11 saga_cmd io_gdal 0 -TRANSFORM 1 -INTERPOL 0 -GRIDS "/var/folders/0x/bvgzg4c56nq94kfk_j2zzxkw0000gn/T/processing43e4ecf7b3a942ebbaea0a0f1d203ea3/c4cf34846dd944cfa14836c72f295c17/notcumtest3Invisibility.sgrd" -FILES "/Users/Jonas/not_cum_test_3_Invisibility.tiff"
    /Users/Jonas/.qgis2//processing/saga_batch_job.sh: line 4: 91767 Segmentation fault: 11 saga_cmd io_gdal 0 -TRANSFORM 1 -INTERPOL 0 -GRIDS "/var/folders/0x/bvgzg4c56nq94kfk_j2zzxkw0000gn/T/processing43e4ecf7b3a942ebbaea0a0f1d203ea3/4fa2106d203044cbb7e2d6df7386a625/notcumtest2Invisibility.sgrd" -FILES "/Users/Jonas/not_cum_test_2_Invisibility.tiff"
    /Users/Jonas/.qgis2//processing/saga_batch_job.sh: line 5: 91768 Segmentation fault: 11 saga_cmd io_gdal 0 -TRANSFORM 1 -INTERPOL 0 -GRIDS "/var/folders/0x/bvgzg4c56nq94kfk_j2zzxkw0000gn/T/processing43e4ecf7b3a942ebbaea0a0f1d203ea3/608f4aaa09594965a9c919ef809143bf/notcumtest1Invisibility.sgrd" -FILES "/Users/Jonas/not_cum_test_1_Invisibility.tiff"
    /Users/Jonas/.qgis2//processing/saga_batch_job.sh: line 6: 91769 Segmentation fault: 11 saga_cmd io_gdal 0 -TRANSFORM 1 -INTERPOL 0 -GRIDS "/var/folders/0x/bvgzg4c56nq94kfk_j2zzxkw0000gn/T/processing43e4ecf7b3a942ebbaea0a0f1d203ea3/0ddef947d1b44e30ab1c8b806ed45a82/notcumtest0Invisibility.sgrd" -FILES "/Users/Jonas/not_cum_test_0_Invisibility.tiff"
    Error: executing tool [Mosaicking]
    ____________________________

    ##### ## ##### ##
    ### ### ## ###
    ### # ## ## #### # ##
    ### ##### ## # #####
    ##### # ## ##### # ##
    ____________________________

    SAGA Version: 2.2.3

    ____________________________
    library path: /Applications/QGIS.app/Contents/MacOS/lib/saga/
    library name: libgrid_tools
    library : Tools
    tool : Mosaicking
    author : O.Conrad (c) 2003-12
    ____________________________

    Load grid: /var/folders/0x/bvgzg4c56nq94kfk_j2zzxkw0000gn/T/processing43e4ecf7b3a942ebbaea0a0f1d203ea3/c4cf34846dd944cfa14836c72f295c17/notcumtest3Invisibility.sgrd...
    failed
    Load grid: /var/folders/0x/bvgzg4c56nq94kfk_j2zzxkw0000gn/T/processing43e4ecf7b3a942ebbaea0a0f1d203ea3/4fa2106d203044cbb7e2d6df7386a625/notcumtest2Invisibility.sgrd...
    failed
    Load grid: /var/folders/0x/bvgzg4c56nq94kfk_j2zzxkw0000gn/T/processing43e4ecf7b3a942ebbaea0a0f1d203ea3/608f4aaa09594965a9c919ef809143bf/notcumtest1Invisibility.sgrd...
    failed
    Load grid: /var/folders/0x/bvgzg4c56nq94kfk_j2zzxkw0000gn/T/processing43e4ecf7b3a942ebbaea0a0f1d203ea3/0ddef947d1b44e30ab1c8b806ed45a82/notcumtest0Invisibility.sgrd...
    failed
    Mosaicking: could not initialize data objects
    Converting outputs

    'NoneType' object has no attribute 'crs' See log for more details

QGIS about:

QGIS version
2.14.8-Essen
QGIS code branch
Release 2.14
Compiled against Qt
4.8.6
Running against Qt
4.8.6
Compiled against GDAL/OGR
2.1.2
Running against GDAL/OGR
2.1.2
Compiled against GEOS
3.5.1-CAPI-1.9.1
Running against GEOS
3.5.1-CAPI-1.9.1 r4246
PostgreSQL Client Version
9.4.9
SpatiaLite Version
4.3.0a
QWT Version
6.1.3
PROJ.4 Version
492
QScintilla2 Version
2.9.3
1

Can't reproduce this as I don't have a suitable set of rasters to test this with.

However from your error logs I can see that SAGA is segfaulting (crashing). The "None type has no attribute crs" is Processing complaining that the output rasters are empty (because SAGA GIS crashed)

If the reason for doing this is to find the minimum value of a series of aligned rasters, you could try the GRASS r.series algorithm for this instead. It does the same thing, and may be a suitable work-around. (It's certainly available in 2.18, not sure about your version)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.