ArchGDAL.jl
ArchGDAL.jl copied to clipboard
Add raster example to documentation
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
I'd be interested in a tutorial that describes how to:
- open a raster file
- get the projection
- plot it
- plot part of it
- extract part of the raster based on a rectangular window
- extract part of it based on a shapefile polygon in the same projection
- plot that newly extracted raster with some spatial points overlaid
- extract the raster's value under these points
- aggregate the raster to a coarser resolution
- use the raster as a standard matrix (if possible?)
- 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?
(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?
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?
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 😅).