0

I have a file of 5gb in a .asc form. The first lines are

ncols 43200 nrows 18000 xllcorner -180 yllcorner -60 cellsize 0.0083333333333333 NODATA_value -9999

It is a global layer. Trying to convert it to .tif is not possible since maybe it is to big. I converted it using QGIS and raster --> translate to a .nc file, but it seems that the result is not as expected. I get values for the north hemisphere above 20Lat only but not for the south(all value have the same.

Any suggestions on how can I convert it and in what form?

In the properties in Qgis the file has the following information:

CRS EPSG:4326 - WGS 84
Geographic Extent -180.0000000000000000,-60.0000000000000000 : 180.0000000000000000,90.0000000000000000
Unit degrees
Width 43200
Height 18000
Data type Float64 - Sixty four bit floating point
GDAL Driver Description AAIGrid
GDAL Driver Metadata Arc/Info ASCII Grid
Dataset Description C:/lbii.asc
Compression

Band 1

More information

Dimensions X: 43200 Y: 18000 Bands: 1
Origin -180,90
Pixel Size 0.008333333333333333218,-0.008333333333333333218

When converting it to a .img i get the following image(almost same as .nc)

Image in img format

GeoF
  • 391
  • 2
  • 8
  • 1
    Please [Edit] the question instead of commenting on your own post. I would agree that the data is corrupt, possibly at download. Because it is ASCII, a simple file scan would find binary corruption. – Vince Aug 01 '19 at 15:13
  • Yes you are right. The data were corrupt. Thanks – GeoF Aug 02 '19 at 07:38

1 Answers1

1

Yes, gdal from out the command line should do the trick, and will be one of the fastest options! Now the question is in which format you want it. As it is quite big I would suggest using the format binary grid. To make such a translation, you need to make use of a commandline with gdal installed in it. Supposing you use windows: Press the windows key and type in osgeo4wshell. Navigate to C: by typing C:, and type in the following command:

gdal_translate -of "ENVI" C:\Ibii.asc C:\Ibii_Visual_Image.flt

For questions concerning the use of gdal, have a look here. Or search online for similar situations.

Roberto Zeeland
  • 519
  • 2
  • 11