1

The title says it all. I've got a bunch of .bil files, which I can open in R using the raster command pointed to the path to the .bil file. But I don't know how to efficiently incorporate the contents of the other files, which seem to be metadata, into the raster layer in order to georeference it.

Alternatively, could I convert these sets of files to geotiffs using a system() call to gdal_translate? What would be the syntax for that?

1
  • How about using readOGR from the rgdal package?
    – user32309
    Jul 14, 2014 at 7:46

1 Answer 1

1

if you want to convert to geotiff with raster package:

input_name=raster("c:/file.bil") #if you use 
output_name="c:/output.tif")
writeRaster(input_name, output_name,format="GTiff",datatype='INT1U',overwrite=TRUE)

the data type depends of your input data type, in this case 8bits.

if you want to convert to geotiff with gdalUtils package:

gdal_translate(input_name, output_name, ot='INT1U', of = "GTiff")

which other software will you use? envi? erdas?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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