# Reading ENVI style multispectral images with archGDAL

**URL:** https://discourse.julialang.org/t/reading-envi-style-multispectral-images-with-archgdal/79702
**Category:** Geo
**Created:** [April 19, 2022, 6:48pm UTC](https://discourse.julialang.org/t/reading-envi-style-multispectral-images-with-archgdal/79702 "2022-04-19T18:48:35Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Arrigo\_Benedetti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/arrigo_benedetti/32/25545_2.png) [@Arrigo\_Benedetti](https://discourse.julialang.org/u/Arrigo_Benedetti)
#### Post date: [April 19, 2022, 6:48pm UTC](https://discourse.julialang.org/t/reading-envi-style-multispectral-images-with-archgdal/79702/1 "2022-04-19T18:48:35Z")

</div>

I have several multispectral images with separate ENVI style header text files and I would like to load them with archGDAL.jl. I looked at the documentation of `archGDAL.read()` but I could not find how to do it. Maybe archGDAL.jl is not the right library for this?

---

<div class="post-metadata">

### Author: ![visr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/visr/32/17204_2.png) [@visr](https://discourse.julialang.org/u/visr)
#### Post date: [April 19, 2022, 7:28pm UTC](https://discourse.julialang.org/t/reading-envi-style-multispectral-images-with-archgdal/79702/2 "2022-04-19T19:28:21Z")

</div>

It should be. I don’t know this particular file format but according to [ENVI – ENVI .hdr Labelled Raster — GDAL documentation](https://gdal.org/drivers/raster/envi.html) it is supported in GDAL by default. What happens if you just `ArchGDAL.read("path/to/file")`?

---

<div class="post-metadata">

### Author: ![Arrigo\_Benedetti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/arrigo_benedetti/32/25545_2.png) [@Arrigo\_Benedetti](https://discourse.julialang.org/u/Arrigo_Benedetti)
#### Post date: [April 19, 2022, 9:43pm UTC](https://discourse.julialang.org/t/reading-envi-style-multispectral-images-with-archgdal/79702/3 "2022-04-19T21:43:10Z")

</div>

> [@visr](#):
>
> ArchGDAL.read(“path/to/file”)

Yes, that works. `ArchGDAL.read("path/to/file")` infers the header filename by appending `.hdr` to `file`. Thanks!

---

<div class="post-metadata">

### Author: ![Fliks](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fliks/32/2494_2.png) [@Fliks](https://discourse.julialang.org/u/Fliks)
#### Post date: [April 20, 2022, 9:17am UTC](https://discourse.julialang.org/t/reading-envi-style-multispectral-images-with-archgdal/79702/4 "2022-04-20T09:17:38Z")

</div>

You might be interested in using the `ArchGDAL.readraster` function to open the ENVI stack to open the data as a lazy loaded diskarray.  
[https://yeesian.com/ArchGDAL.jl/stable/rasters/#The-RasterDataset-type](https://yeesian.com/ArchGDAL.jl/stable/rasters/#The-RasterDataset-type)

---

<div class="post-metadata">

### Author: ![Raf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raf/32/3383_2.png) [@Raf](https://discourse.julialang.org/u/Raf)
#### Post date: [April 20, 2022, 2:09pm UTC](https://discourse.julialang.org/t/reading-envi-style-multispectral-images-with-archgdal/79702/5 "2022-04-20T14:09:13Z")

</div>

Probably it will just work in Rasters.jl too, and lazy load by default.

```julia
using Rasters
rast = Raster(file_path)

```
