-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introductory tutorial similar to Rasterio's Python Quickstart #130
Conversation
Awesome :) Don't forget to add the new page here, it should probably go right below the index: Lines 11 to 12 in 47cc556
Minor nit: could you use uppercase For the picture, if possible, I'd rather not have it stored in the repository, to keep it as small as possible. Could you rebase this commit to remove it? Let me know if I can help. A solution could be to just post them in the thread here, which will give a GitHub link that we can paste in the markdown:
I believe another option would be to have Documenter generate the pictures by running the code, but I haven't looked into this option before. |
This would be great! However I must admit, I do not understand the rebase thing you talked about. Will deleting the |
If you delete the resources directory with So to remove it from history, what you could do is |
Hey, I am writing the final portion of the tutorial, involving writing a dummy 2-D array to a raster dataset, but I am not sure if what I am doing is the best way to do so (Probably not). So currently I am making the array ( AG.create(
AG.getdriver("GTiff"),
width=240,
height=180,
nbands=1,
dtype=Float32,
filename="./temporary.tif") do dataset
AG.write!(dataset, Z, 1)
end This saves the array, but, is flipped around its Y axis. So to solve this, I flipped the array around its Y axis while writing, using Apart from this, I am also unsure about the best way to insert the transformation and projection information into the raster. It would be great if you can provide an explanation of this. Thanks :) |
Sorry I forgot about this (feel free to ping again). GDAL is row-major, whereas Julia is column-major. The raster data that you get from ArchGDAL, and are expected to pass to ArchGDAL, is permuted compared to what you may expect, so rows become columns and columns become rows. This is done to avoid creating copies on every read an write, which may hurt performance. See also the notes in http://yeesian.com/ArchGDAL.jl/latest/rasters/#Reading-Raster-Values-1 and discussion in #37 (I had exactly the same initial reaction as you). So perhaps you can first
I believe this should work with the |
I think the PR is ready to be merged. Feel free to suggest any changes that you seem fit. @visr |
Cool! Could you perhaps try using this syntax: https://juliadocs.github.io/Documenter.jl/stable/man/syntax/#@repl-block? This is also used here for instance: https://raw.githubusercontent.com/yeesian/ArchGDAL.jl/master/docs/src/datasets.md It means that you can remove the output from the document, as Documenter will run the examples and paste in the output as the documentation builds. It's good to build the docs locally to confirm it is working as intended. |
From what I am understanding, @repl or @example will evaluate the script. However, for the first half of the documentation, I read in a LandSat image (quite huge, ~66MB). If there will be no such file (since such a large file cannot be included in the package) in the working directory, the evaluation should result in an error. Is there a way to download the file on-the-fly, so that the code blocks can be evaluated? |
Yep, there is, and after #138 was fixed this works directly now: ds = ArchGDAL.read("/vsicurl/http://landsat-pds.s3.amazonaws.com/c1/L8/037/034/LC08_L1TP_037034_20160712_20170221_01_T1/LC08_L1TP_037034_20160712_20170221_01_T1_B4.TIF") For reading rasters, we could also use the new Side note, when typing macro names in GitHub it is best to quote them with backticks like |
@visr please review the changes when you get the time. Thanks :) |
This is awesome, thank you so much! I am really sorry it took me so long to get around to review this PR. |
Addressing the discussion at #40, this PR is an attempt to add a tutorial in the documentation, similar to Rasterio's Python Quickstart.