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

Add raster example to documentation

Open yeesian opened this issue 7 years ago • 4 comments

prompted by #39

can follow the example in

  • https://github.com/wkearn/RasterIO.jl/blob/master/doc/RasterioGuide.ipynb

and possibly others, e.g.

  • https://www.geos.ed.ac.uk/~smudd/TopoTutorials/html/tutorial_raster_conversion.html
  • http://invisibleroads.com/tutorials/gdal-raster-extract.html

yeesian avatar May 05 '18 15:05 yeesian

I'd be interested in a tutorial that describes how to:

  1. open a raster file
  2. get the projection
  3. plot it
  4. plot part of it
  5. extract part of the raster based on a rectangular window
  6. extract part of it based on a shapefile polygon in the same projection
  7. plot that newly extracted raster with some spatial points overlaid
  8. extract the raster's value under these points
  9. aggregate the raster to a coarser resolution
  10. use the raster as a standard matrix (if possible?)
  11. apply image windowing functions to the raster using e.g. ImageFiltering.jl

I'm very willing to write this and contribute it myself, if you can get me started, possibly just with a list of functions to check out and a nod to the things that are possible. I checked your links above, the invisibleroads one is dead, the RasterIO guide has some of the right things, the geos one is mainly about reprojection. A sample raster file could be one of those from here http://chelsa-climate.org/downloads/ (e.g. the first), the polygon to clip after could be one frome https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/50m/cultural/ne_50m_admin_0_countries.zip . Can you help me get started?

mkborregaard avatar Jan 09 '19 14:01 mkborregaard

(Seems like I am 2 years late to the party) This seems like a wonderful suggestion, and I think I can implement these changes to the documentation. Even taking some examples from the tests would be a solution to what @mkborregaard is asking for. I think a solid reference point for such a cook-book style guide is the Python Quickstart guide by the Rasterio library (Python).

I would be happy to implement this, taking cues from the tests. Should I go ahead and open a PR for this?

pritamd47 avatar May 19 '20 19:05 pritamd47

Oh for sure, I think having such example workflows available in the documentation would be a huge help to a lot of people, so yes please!

I agree the rasterio quick start is a good example. Maybe it would be a good idea to try to do a more or less exact replication of that workflow? With proper attribution of course.

I think the 11 points above, besides the first few, already go into a bit more depth, and could be a nice follow up project. What do you think?

visr avatar May 19 '20 19:05 visr

Sounds good! I will start by replicating the rasterio examples (with attribution). I will open a PR soon (trying out new things in Julia is really a relief during these times 😅).

pritamd47 avatar May 20 '20 13:05 pritamd47