-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Chapter 5: Raster-Vector Interaction #7
Conversation
This prevents giant SVGs from breaking JS :D
I think this only fails on Rasters master, with the cf branch it seems fine. Can revert at the next breaking version of Rasters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Loving it so far, and very quick work! It's a bit hard to review without the pictures, so let's get this merged asap.
My main suggestions would be to introduce the crs on its own (not a part of writing) and introducing some Julia unique features in here.
``` | ||
|
||
The `grain` array represents a categorical raster with values `0`, `1`, `2`, corresponding to categories "clay", "silt", "sand", respectively. | ||
We will create it from a specific arrangement of pixel values, using `reshape`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does Rasters support CategoricalArrays? Might be nice to introduce some Julia concepts of combining everything seamlessly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does but I don't know if that will write to file correctly, will try it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is absolutely fantastic... can't wait to see this finalized.
Minor comments / suggestions. Hopefully alt least some are helpful.
|
||
TODO: gdal_contour (via ArchGDAL??) | ||
|
||
It would be good to show how to use the provided GDAL executables though... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree... I wonder if a section on file minipulation using GDAL should be added at some point. This could include building a vrt of raster files, merging shapefiles, cropping shapefiles, converting between file formats
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree! There's a chapter in the R book https://r.geocompx.org/gis that would be perfect for that, maybe we even make this a separate chapter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another option is to include such examples in i/o chapter (building a vrt, merging files, converting between formats) and raster-vector chapter (cropping).
(Side comment: I would suggest not using shapefiles (the file format) at all, except maybe mentioning it; it is time to stop using this format imo)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shapefile is a horrible format that users need to know how to work with as there is so much legacy data out there... maybe the only example we show is how to convert a shapefile to something useful ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be also my suggestion -- guiding readers in right direction (i.e. opposite of the shapefile one:))
…compjl into as/05-raster-vector
Co-authored-by: Maarten Pronk <[email protected]>
Co-authored-by: Alex Gardner <[email protected]>
f2e9130
to
c0ecb22
Compare
Local successor to #4.
Requires the following PRs:
Add DataAPI metadata passthrough toapply
JuliaGeo/GeometryOps.jl#211geometrycolumn
to rasterizer as well inrasterize
rafaqz/Rasters.jl#745execute-dir
PumasAI/QuartoNotebookRunner.jl#184This PR copies over all data from geocompy and aims to implement ch. 5 of geocompx in Julia. Primarily uses Rasters and GeometryOps for reprojection and resampling.