Skip to content

Reknitted 2026 - #28

Open
SriramJallu wants to merge 2 commits into
GeoScripting-WUR:gh-pagesfrom
SriramJallu:gh-pages
Open

Reknitted 2026#28
SriramJallu wants to merge 2 commits into
GeoScripting-WUR:gh-pagesfrom
SriramJallu:gh-pages

Conversation

@SriramJallu

Copy link
Copy Markdown

Updated terra::draw('line') to vect() function to draw line from coordinates

@GreatEmerald GreatEmerald left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Here are a few points to improve before merging.

Comment thread index.Rmd Outdated
Everything seems correct.

We want to look at a transect, which we can draw by hand by selecting two points by clicking. The `draw('line')` function will help us do that. Once you run the function, you will be able to click in the plotting window of R (The `bel` object should already be present in the plot panel before running `draw('line')`). Press *esc* once you have selected the two extremities of the line.
We want to look at a transect, which we can draw by using two points. The `vect()` function will help us do that. It requires a matrix of the coordinates. Once you run the function, you will be able to click in the plotting window of R (The `bel` object should already be present in the plot panel before running `draw('line')`). Press *esc* once you have selected the two extremities of the line.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few issues here: 1) there is still some text left over from the draw() that doesn't make sense when we don't use it here, 2) we generally try to consistently use sf objects rather than terra vector objects. So it's better to use st_point() or st_line() here. In that case, the next paragraph also needs to be adjusted, since we will not have the writing issue any more.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed issue 1 and; 2 - Now using only sf objects

@GreatEmerald

Copy link
Copy Markdown
Member

I think this fixes #19, but do also check the other issues and see if they can be solved as well (though not necessarily in this pull request).

@SriramJallu

Copy link
Copy Markdown
Author

This should also close issue #26, added st_buffer. #19 should also be closed, removed the zip file.

@GreatEmerald GreatEmerald left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! One quick question below, and then it should be good to go.

Comment thread index.Rmd
## Prepare the data

```{r}
```{r, eval=FALSE}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why all the eval=FALSE? This code should run correctly in the virtual machines, and potentially produce output.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah few blocks were redownloading the data into the repo. And then later I only made text changes, so I made eval=FALSE and forgot to chage them back. Of course, the script produces output correctly. Should I change them back or not necessary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants