Hi,
This is what I would do.

Check if the problem in the lzw compression.  My understanding is that lzw is 
not use when creating raster with gdal using this method.  I found that out 
because my lidar DEM where being created using that command but the file were 
not compress.  Remove it from the command and test.  Perhaps the Windows is 
more tolerant to the file having the lzw tag (not sure this is the case) 
without it being actually compressed.

It also may be a memory problem on Ubuntu.  The lidar DEMs are big.  Try using 
the same script on a smaller subset of the data.

Nicolas

> Le 30 juill. 2018 à 11:13, Cliff Patterson <[email protected]> a écrit 
> :
> 
> I am producing DEMs from LiDAR data using gdal_grid. All processes compete 
> fine, but the resulting DEM does not load into QGIS 2.18 on my Ubuntu 16.04 
> machine but they load fine on my Windows machines (same version of QGIS). 
> When I look at layer properties on Ubuntu machine, the overviews that are 
> produced are not recognized and when I try to rebuild within QGIS, I get an 
> error that I cannot produce overviews for this file type -- it's a Geotif. 
> 
> DEM is produced using the following:
> 
> gdal_grid -zfield field_3 -a nearest:radius1=20:radius2=20 -a_srs epsg:26916 
> -txe 607900.7    648882.51 -tye 5322415.07 5349297.05 -outsize 40981.81 
> 26881.98 -co "BIGTIFF=YES" -co "COMPRESS=LZW" --config -a_nodata 0 -l ground2 
> ground2.vrt ground2_grid_1m_nearest_radius20.tif --config GDAL_NUM_THREADS 
> ALL_CPUS --config GDAL_CACHEMAX 2000
> 
> I then turn 0s into NoData with Gdal_calc
> 
> gdal_calc.py --co="COMPRESS=LZW" -A ground2_grid_1m_nearest_radius20.tif 
> --outfile=ground2_grid_1m_nearest_radius20_nodata0.tif --calc="A*(A>0)" 
> --NoDataValue=0
> 
> Then I build overviews with gdaladdo
> 
> gdaladdo -clean --config COMPRESS_OVERVIEW LZW --config INTERLEAVE_OVERVIEW 
> PIXEL -r average ground2_grid_1m_nearest_radius20_nodata0.tif 2 4 8 16 32 64 
> 128 256 512 1024
> 
> Gdalinfo says....
> 
> Driver: GTiff/GeoTIFF
> Files: ground2_grid_1m_nearest_radius20_nodata0.tif
> Size is 40981, 26881
> Coordinate System is:
> PROJCS["NAD83 / UTM zone 16N",
>     GEOGCS["NAD83",
>         DATUM["North_American_Datum_1983",
>             SPHEROID["GRS 1980",6378137,298.257222101,
>                 AUTHORITY["EPSG","7019"]],
>             TOWGS84[0,0,0,0,0,0,0],
>             AUTHORITY["EPSG","6269"]],
>         PRIMEM["Greenwich",0,
>             AUTHORITY["EPSG","8901"]],
>         UNIT["degree",0.0174532925199433,
>             AUTHORITY["EPSG","9122"]],
>         AUTHORITY["EPSG","4269"]],
>     PROJECTION["Transverse_Mercator"],
>     PARAMETER["latitude_of_origin",0],
>     PARAMETER["central_meridian",-87],
>     PARAMETER["scale_factor",0.9996],
>     PARAMETER["false_easting",500000],
>     PARAMETER["false_northing",0],
>     UNIT["metre",1,
>         AUTHORITY["EPSG","9001"]],
>     AXIS["Easting",EAST],
>     AXIS["Northing",NORTH],
>     AUTHORITY["EPSG","26916"]]
> Origin = (607900.699999999953434,5322415.070000000298023)
> Pixel Size = (1.000019765257072,1.000036456977029)
> Metadata:
>   AREA_OR_POINT=Area
> Image Structure Metadata:
>   COMPRESSION=LZW
>   INTERLEAVE=BAND
> Corner Coordinates:
> Upper Left  (  607900.700, 5322415.070) ( 85d33' 8.00"W, 48d 2'45.22"N)
> Lower Left  (  607900.700, 5349297.050) ( 85d32'43.44"W, 48d17'15.62"N)
> Upper Right (  648882.510, 5322415.070) ( 85d 0' 9.50"W, 48d 2'15.55"N)
> Lower Right (  648882.510, 5349297.050) ( 84d59'35.63"W, 48d16'45.69"N)
> Center      (  628391.605, 5335856.060) ( 85d16'24.08"W, 48d 9'46.71"N)
> Band 1 Block=40981x1 Type=Float64, ColorInterp=Gray
>   NoData Value=0
>   Overviews: 20491x13441, 10246x6721, 5123x3361, 2562x1681, 1281x841, 
> 641x421, 321x211, 161x106, 81x53, 41x27
> 
> So as you can see, overviews are produced and the raster is comrpessed with 
> LZW. But... it will not load in QGIS and causes it to crash (on Ubuntu). 
> Loads great on Widows... (boo!)
> 
> Thoughts? 
> 
> Cliff
> _______________________________________________
> Qgis-user mailing list
> [email protected]
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
_______________________________________________
Qgis-user mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to