I have raster in .bil format which I want to save in GRASS GIS with r.out.ascii. I get this result in .txt file:

north: 1N
south: 0
east: 1E
west: 0
rows: 1
cols: 1

I suppose it is something wrong, because of dimensions of this .txt file. I didn't change any options in r.out.ascii window.

Thank you for your help.


I think you need to import the file to a Grass GIS dataset then after that you can export to the format you wish.

Also you can easily convert "GUIless" way, it using GDAL with this command on your shell

gdal_translate -of AAIGrid yourfile.bil outputfile.asc 

This is for Arc/Info type more options here Gdal Raster formasts

Or try Saga GIS if none of the above work...

Hope it helps!

|improve this answer|||||
  • Saga GIS apparently does not support .bil format. I tried that function but it seems that .bil format is not supported. Maybe some other solution? Thank you. – againstflow Jan 23 '12 at 22:39
  • You can import it to Saga, via the Gdal import raster. One question do you have the header file for .bil file, another file with the same name but with a .hdr extension? – Ulmi Jan 24 '12 at 11:15
  • I have .hdr file with every .bil file. When I try to import it in Saga via the Gdal import raster it gives me an error: XML parsing error: not well formed (invalid token) at line 1. Parameters file could not be imported. Do you know why that happens? – againstflow Jan 24 '12 at 15:57
  • Sorry really don't know why, maybe a problem with the files...been using the .bil files from the worldclim dataset with no problems on saga and grass. worldclim.org/download – Ulmi Jan 26 '12 at 12:44
  • 1
    GRASS 6.4 and later can easily import multi-GB files. You may use r.in.bin or r.in.gdal to import the BIL, then use "g.region rast=thismap" to set the computational region properly prior to export it with r.out.gdal. – markusN Jan 28 '12 at 19:11

You write "I have raster in .bil format" - fine, but you also need to have the related metadata. Then you write "which I want to save in GRASS GIS with r.out.ascii." - likely you want to import the map into GRASS GIS? Then it is r.in.bin.

If you want to export a raster map from GRASS to BIL, then use r.out.bin or r.out.gdal. If to ASCII format, then r.out.ascii. Hope this helps.

|improve this answer|||||

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.