yeesian / ArchGDAL.jl

A high level API for GDAL - Geospatial Data Abstraction Library
https://yeesian.github.io/ArchGDAL.jl/stable/
Other
142 stars 26 forks source link

Add raster example to documentation #40

Open yeesian opened 6 years ago

yeesian commented 6 years ago

prompted by #39

can follow the example in

and possibly others, e.g.

mkborregaard commented 5 years ago

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?

pritamd47 commented 4 years ago

(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?

visr commented 4 years ago

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?

pritamd47 commented 4 years ago

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 😅).