Rasters.jl icon indicating copy to clipboard operation
Rasters.jl copied to clipboard

[Documentation] Tutorial: Building a raster from scratch

Open asinghvi17 opened this issue 1 year ago • 2 comments

It would be cool to have a tutorial that shows all the different things you can do (and have to be careful of) when building a raster from scratch.

  • Build using ranges, vectors, matrices of lookup dimensions
    • The conceptual nature of a raster as a gridded surface, as opposed to an unstructured surface (random points or arbitrary mesh) becomes clear here
    • Show that you can plot anything
  • Specify sampling
  • Specify missingval before you reproject - I ran into this issue when trying to reproject a manually constructed raster
  • All the crazy stuff you can do with Rasters.warp
  • Save and specify chunking pattern

I will try to write this tutorial but would appreciate any suggestions!

cc @alex-s-gardner @haakon-e @tiemvanderdeure (just the people I'm aware of who may have built rasters from scratch and can contribute pain points)

asinghvi17 avatar Sep 01 '24 18:09 asinghvi17

This is in the process of changing a lot for the better with Rasters.create.

Its been around for a wile for internal use but I've made it a lot better and exported in https://github.com/rafaqz/Rasters.jl/pull/695

The idea is a unified interface for creating a Raster in memory or on disk, and some goodies like a function to apply to it while its open for the first time, initialising fill values, etc.

The main stalling point on me just merging that PR is maskingval is not a great keyword for the user-facing missingval in the case there are two (mostly it will be missing but could be e.g. NaN or 0x00 for performance).

(Its in that PR because fixing all those keywords forced my hand to actually make create general and work everywhere it needs to, and some questions like this came in at the same time so it may as well be exported and/or documented)

rafaqz avatar Sep 01 '24 18:09 rafaqz

A basic version of this will go into geocompjl, but I'm not sure where the rest should lie.

asinghvi17 avatar Sep 24 '24 03:09 asinghvi17