kadyb / rgugik

Download datasets from Polish Head Office of Geodesy and Cartography
https://kadyb.github.io/rgugik/
Other
33 stars 4 forks source link

Vig revs #36

Closed Nowosad closed 4 years ago

kadyb commented 4 years ago
  1. "(...) plants and birds is protected" <- shouldn't there be "are"?
  2. "centroid (geometric center)" <- it may be better to leave the explanation in brackets, because not everyone can be familiar with a centroid term.
  3. "allows working" or "allows to work"? In orthophotomap.Rmd is "which allows to work with spatiotemporal arrays".
  4. "The matrix cells contain exactly the same areas." <- areas (in terms of extent) of rasters are the same from the beginning. I think the word "object" is more accurate.
  5. Raster attributes. I would leave an explanation of the attributes with examples, this concept needs to be explained to beginners.
  6. "which we can convert into a simple geometry" <- we "must" rather than we "can", otherwise the function won't work.
  7. "# first layer only" <- change it to "plot DTM" and name chunk - maybe "LINE". Also add arg main = "DTM [m]".
  8. "col = hcl.colors(9, palette = "RdYlGn")" <- maybe let's leave the single color scale, because the range starts from 0.
Nowosad commented 4 years ago
1. "(...) plants and birds is protected" <- shouldn't there be "are"?

2. "centroid (geometric center)" <- it may be better to leave the explanation in brackets, because not everyone can be familiar with a centroid term.

3. "allows working" or "allows to work"? In `orthophotomap.Rmd` is "which allows to work with spatiotemporal arrays".

4. "The matrix cells contain exactly the same areas." <- areas (in terms of extent) of rasters are the same from the beginning. I think the word "object" is more accurate, or the word "information".

5. **Raster attributes**. I would leave an explanation of the attributes with examples, this concept needs to be explained to beginners.

6. "which we can convert into a simple geometry" <- we "must" rather than we "can", otherwise the function won't work.

7. "# first layer only" <- change it to "plot DTM" and name chunk - maybe "LINE".

8. "col = hcl.colors(9, palette = "RdYlGn")" <- maybe let's leave the single color scale, because the range starts from 0.
  1. Depends on the context.

A/ In addition, the oak-hornbeam forest with rare species of plants (lilium martagon, ceratophyllum submersum) and birds (european nightjar, black woodpecker) is protected. (Here - forest is protected) B/ In addition, the oak-hornbeam forest with rare species of plants (lilium martagon, ceratophyllum submersum) and birds (european nightjar, black woodpecker) are protected. (Incorrect) C/ In addition, it is covered by the oak-hornbeam forest with rare species of plants (lilium martagon, ceratophyllum submersum) and birds (european nightjar, black woodpecker) protected. (Here - plants and birds are protected)

  1. Both are fine, although "allows working" is usually better.
  2. I would suggest avoiding the term "object" - cells are not objects, and a cell does not represent any object. Cell is just a discretization of a space.
  3. Explanation of what are attributes, etc. could be useful here. However, the previous version was hard to understand and read. Feel free to change 2, 6-8.
kadyb commented 4 years ago

Comparison of extract functions by line in:

raster

pts_matrix = matrix(c(357121.7, 515765.5,
                      357321.2, 516017.9),
                    ncol = 2, byrow = TRUE)
line = spLines(pts_matrix, crs = CRS('+init=EPSG:2180'))
elev_line = extract(DTM, line)[[1]]

stars

pts_matrix = matrix(c(357121.7, 515765.5,
                      357321.2, 516017.9),
                    ncol = 2, byrow = TRUE)
line = st_sfc(st_linestring(pts_matrix), crs = 2180)
line = st_line_sample(line, density = 1)
line = st_cast(line, "POINT")
elev_line = st_extract(DEM, line)[[1]]

So, it is much easier and user-friendly in raster.

Nowosad commented 4 years ago

Comparison of extract functions by line in:

raster

pts_matrix = matrix(c(357121.7, 515765.5,
                      357321.2, 516017.9),
                    ncol = 2, byrow = TRUE)
line = spLines(pts_matrix, crs = CRS('+init=EPSG:2180'))
elev_line = extract(DTM, line)[[1]]

stars

pts_matrix = matrix(c(357121.7, 515765.5,
                      357321.2, 516017.9),
                    ncol = 2, byrow = TRUE)
line = st_sfc(st_linestring(pts_matrix), crs = 2180)
line = st_line_sample(line, density = 1)
line = st_cast(line, "POINT")
elev_line = st_extract(DEM, line)[[1]]

So, it is much easier and user-friendly in raster.

Yep, for many operations raster is more user-friendly. (Sidenote: you should avoid using CRS('+init=EPSG:2180')). You can also prepare a reprex and suggest adding support for lines to st_extract().

kadyb commented 4 years ago

https://github.com/r-spatial/stars/issues/334

kadyb commented 4 years ago
  1. Maybe "The matrix contains exactly the same areas at the cell level."? Or leave it as it is?
Nowosad commented 4 years ago

How about replacing "We now can combine our models into one stack. The matrix cells contain exactly the same areas." to

"Now, both models have the same dimensions (the number of rows and columns) and spatial resolution. Thus, we can combine them into one object." ?

kadyb commented 4 years ago

I like it, I will use it.