# \#rasters

**URL:** https://discourse.julialang.org/tag/rasters/1380.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [Setting both color maps and opacity when plotting rasters and heatmaps with Makie](https://discourse.julialang.org/t/setting-both-color-maps-and-opacity-when-plotting-rasters-and-heatmaps-with-makie/133600)

<div class="topic-metadata">

**Author:** [@eugenetkj98](https://discourse.julialang.org/u/eugenetkj98)\
**Replies:** 8\
**Last updated:** [November 13, 2025, 11:05pm UTC](https://discourse.julialang.org/t/setting-both-color-maps-and-opacity-when-plotting-rasters-and-heatmaps-with-makie/133600 "2025-11-13T23:05:30Z")

</div>

Hi all, I’m looking to make a plot of some rasters (or if all else fails heatmaps) of values using Makie where the base color is independent of the opacity. Trying to blend two bits of information here where there are tw…

---

## [How to get value and matrix index at a given (x;y) point?](https://discourse.julialang.org/t/how-to-get-value-and-matrix-index-at-a-given-x-y-point/129692)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 9\
**Last updated:** [June 27, 2025, 5:04am UTC](https://discourse.julialang.org/t/how-to-get-value-and-matrix-index-at-a-given-x-y-point/129692 "2025-06-27T05:04:10Z")

</div>

I have a set of rasters with the same grid and a large number of points and need to create a CZV with these points + information from the rasters (so my questions is similar to this one, but I am using the Rasters.jl pac…

---

## [GeoTiff files retrieving metadata by using Rasters.jl as in rasterio.py](https://discourse.julialang.org/t/geotiff-files-retrieving-metadata-by-using-rasters-jl-as-in-rasterio-py/127587)

<div class="topic-metadata">

**Author:** [@JosephPollacco](https://discourse.julialang.org/u/JosephPollacco)\
**Replies:** 12\
**Last updated:** [April 2, 2025, 8:45am UTC](https://discourse.julialang.org/t/geotiff-files-retrieving-metadata-by-using-rasters-jl-as-in-rasterio-py/127587 "2025-04-02T08:45:44Z")

</div>

Hi, I am looking how to retrive metadata from GeoTiff files by using Julia language. I can obtain the relevant information by using the rasterio.jl python package, but I am struggling to perform the same commands by u…

---

## [Retrieving CRS from vector and raster data](https://discourse.julialang.org/t/retrieving-crs-from-vector-and-raster-data/107903)

<div class="topic-metadata">

**Author:** [@Bojas](https://discourse.julialang.org/u/Bojas)\
**Replies:** 7\
**Last updated:** [April 1, 2025, 2:15pm UTC](https://discourse.julialang.org/t/retrieving-crs-from-vector-and-raster-data/107903 "2025-04-01T14:15:00Z")

</div>

Hello, I’m new to Julia, as for now I was using mainly Python. What I want to do is to crop part of raster based on polygon. Both polygon and raster are in different spatial references and I have to convert either one of…

---

## [How to load a raster of a NC file with multiple monthly bands](https://discourse.julialang.org/t/how-to-load-a-raster-of-a-nc-file-with-multiple-monthly-bands/126487)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 4\
**Last updated:** [March 3, 2025, 9:18am UTC](https://discourse.julialang.org/t/how-to-load-a-raster-of-a-nc-file-with-multiple-monthly-bands/126487 "2025-03-03T09:18:30Z")

</div>

I am using the chelsa\_cmip6 script to download climatic data, and the output is a NC file with the data embedded in monthly series, like in this (small) example of precipitations. How do I load it into a vector of raste…

---

## ["Raster" syntax in GeoStats.jl](https://discourse.julialang.org/t/raster-syntax-in-geostats-jl/119214)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 0\
**Last updated:** [September 9, 2024, 11:07am UTC](https://discourse.julialang.org/t/raster-syntax-in-geostats-jl/119214 "2024-09-09T11:07:09Z")

</div>

Given that most people in the geo community are not aware of the “raster” syntax in GeoStats.jl, I collect a few examples here to facilitate the transition. This post may become part of the official project documentation…

---

## [Multithreaded broadcast on a grouped DimensionalData array](https://discourse.julialang.org/t/multithreaded-broadcast-on-a-grouped-dimensionaldata-array/117607)

<div class="topic-metadata">

**Author:** [@aasdelat](https://discourse.julialang.org/u/aasdelat)\
**Replies:** 33\
**Last updated:** [August 6, 2024, 4:04pm UTC](https://discourse.julialang.org/t/multithreaded-broadcast-on-a-grouped-dimensionaldata-array/117607 "2024-08-06T16:04:30Z")

</div>

Hello: I am using the Rasters.jl package to read and work with data on a spatial and a time dimension (two dimensions). So it is a Raster with two dimensions. I have gropued the raster by means of the groupby() functio…

---

## [Rasters: can I select certain time steps of a lazy rasterseries before or while reading it into memory?](https://discourse.julialang.org/t/rasters-can-i-select-certain-time-steps-of-a-lazy-rasterseries-before-or-while-reading-it-into-memory/116328)

<div class="topic-metadata">

**Author:** [@aasdelat](https://discourse.julialang.org/u/aasdelat)\
**Replies:** 6\
**Last updated:** [July 20, 2024, 8:38pm UTC](https://discourse.julialang.org/t/rasters-can-i-select-certain-time-steps-of-a-lazy-rasterseries-before-or-while-reading-it-into-memory/116328 "2024-07-20T20:38:28Z")

</div>

I have a bunch of grib files, each covering a different time period, but the same spatial extent. I have opened them as a RasterSeries (library Rasters.jl) with lazy=true, so that the data are not loaded into memory. da…

---

## [DimensionalData: How to use a dimension whose name is stored in a variable](https://discourse.julialang.org/t/dimensionaldata-how-to-use-a-dimension-whose-name-is-stored-in-a-variable/116098)

<div class="topic-metadata">

**Author:** [@aasdelat](https://discourse.julialang.org/u/aasdelat)\
**Replies:** 6\
**Last updated:** [June 27, 2024, 9:47pm UTC](https://discourse.julialang.org/t/dimensionaldata-how-to-use-a-dimension-whose-name-is-stored-in-a-variable/116098 "2024-06-27T21:47:51Z")

</div>

I have to use data with one time dimension and two spatial dimensions (longitude and latitude). I use the Rasters.jl library to manage them, that creates DimensionalData.jl arrays. Sometimes, I have a variable, say slp,…

---

## [Extract raster at points 2024](https://discourse.julialang.org/t/extract-raster-at-points-2024/115610)

<div class="topic-metadata">

**Author:** [@CompulsoryCoffee](https://discourse.julialang.org/u/CompulsoryCoffee)\
**Replies:** 1\
**Last updated:** [June 13, 2024, 5:42pm UTC](https://discourse.julialang.org/t/extract-raster-at-points-2024/115610 "2024-06-13T17:42:55Z")

</div>

Hi, Is there a way/package now which allows to extract the raster value at points for large dataset (10M points)? Thanks!

---

## [TrueColor raster satellite image](https://discourse.julialang.org/t/truecolor-raster-satellite-image/111401)

<div class="topic-metadata">

**Author:** [@haffner](https://discourse.julialang.org/u/haffner)\
**Replies:** 19\
**Last updated:** [March 11, 2024, 10:56am UTC](https://discourse.julialang.org/t/truecolor-raster-satellite-image/111401 "2024-03-11T10:56:34Z")

</div>

I’m trying to compose a TrueColor image from three raster channels a VIIRS granule stored in a netCDF4 file. I’d like to do this in pure Julia but haven’t figured it out yet. I can read the data using NCDatasets.jl, bu…

---

## [How to convert a Rasters.Raster{UInt8,2} to a Raster{Float32,2}?](https://discourse.julialang.org/t/how-to-convert-a-rasters-raster-uint8-2-to-a-raster-float32-2/103322)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 4\
**Last updated:** [August 29, 2023, 6:27pm UTC](https://discourse.julialang.org/t/how-to-convert-a-rasters-raster-uint8-2-to-a-raster-float32-2/103322 "2023-08-29T18:27:05Z")

</div>

Hello, as from the title, how can I convert a Rasters.Raster{UInt8,2} to a Raster{Float32,2} ? I have tried with convert(Raster{Float64,2},myraster) but this method is not defined…

---

## [What would be the best approach to handle large NetCDF sets?](https://discourse.julialang.org/t/what-would-be-the-best-approach-to-handle-large-netcdf-sets/102091)

<div class="topic-metadata">

**Author:** [@ThomasJulia](https://discourse.julialang.org/u/ThomasJulia)\
**Replies:** 10\
**Last updated:** [August 2, 2023, 10:58am UTC](https://discourse.julialang.org/t/what-would-be-the-best-approach-to-handle-large-netcdf-sets/102091 "2023-08-02T10:58:36Z")

</div>

Currently, we have python scripts able to handle large netcdf sets (100Go to 1To). Thanks to Dask and multithreading we was able to load and perform operations on chunk which would fit in memory. However, it is too slow …

---

## [How to resample (downscale) a one-hot encoded (boolean) raster?](https://discourse.julialang.org/t/how-to-resample-downscale-a-one-hot-encoded-boolean-raster/101828)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 6\
**Last updated:** [July 20, 2023, 1:51pm UTC](https://discourse.julialang.org/t/how-to-resample-downscale-a-one-hot-encoded-boolean-raster/101828 "2023-07-20T13:51:10Z")

</div>

Hello, I have “one-hot” encoded a 1x1km soil category raster, so I have a raster representing a specific soil class, 0 when is not in the class, and 1 otherwise. I would now downscale it to match my actual other data a…

---

## [Display a variable makes it to be constant ? Rasters.jl bug?](https://discourse.julialang.org/t/display-a-variable-makes-it-to-be-constant-rasters-jl-bug/101157)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 5\
**Last updated:** [July 4, 2023, 10:22am UTC](https://discourse.julialang.org/t/display-a-variable-makes-it-to-be-constant-rasters-jl-bug/101157 "2023-07-04T10:22:18Z")

</div>

I got something really odd working with Raster 0.8, Julia 1.9: This is ok: julia\> using Rasters julia\> X = 2 2 julia\> X 2 julia\> typeof(X) Int64 but (new session): julia\> using Rasters julia\> X X julia\> X = 2 ERROR: …
