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.
evetion
left a comment
There was a problem hiding this comment.
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.
Does Rasters support CategoricalArrays? Might be nice to introduce some Julia concepts of combining everything seamlessly?
There was a problem hiding this comment.
It does but I don't know if that will write to file correctly, will try it!
alex-s-gardner
left a comment
There was a problem hiding this comment.
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.
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.
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.
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.
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.
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 <git@evetion.nl>
Co-authored-by: Alex Gardner <alex.s.gardner@jpl.nasa.gov>
f2e9130 to
c0ecb22
Compare
Local successor to #4.
Requires the following PRs:
Add DataAPI metadata passthrough toapplyJuliaGeo/GeometryOps.jl#211geometrycolumnto rasterizer as well inrasterizerafaqz/Rasters.jl#745execute-dirPumasAI/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.