Skip to content
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

clarrification on ch05 text describing table 5.1 #798

Closed
defuneste opened this issue May 13, 2022 · 5 comments
Closed

clarrification on ch05 text describing table 5.1 #798

defuneste opened this issue May 13, 2022 · 5 comments
Assignees

Comments

@defuneste
Copy link
Contributor

Hi @Robinlovelace and @Nowosad

I have trouble understanding few sentences describing table 5.1 in chp 05 .

This one is difficult: https://github.com/Robinlovelace/geocompr/blob/main/05-geometry-operations.Rmd#L524

Each input simple feature object with only one element (first column) is transformed directly into another geometry type.

And this one is maybe incomplete :

You can see that, for example, when you cast a multipoint consisting of five pairs of coordinates into a point.

here : https://github.com/Robinlovelace/geocompr/blob/main/05-geometry-operations.Rmd#L524

++

@Robinlovelace
Copy link
Collaborator

As discussed on Discord, a good next step could be to chat it over. I would be up for that at some point next week.

Link to the content online: https://geocompr.robinlovelace.net/geometric-operations.html#tab:sfs-st-cast

And permalink to the source code:

https://github.com/Robinlovelace/geocompr/blob/fe65a3a0255b06bbb4860fa91009496f5d124fbb/05-geometry-operations.Rmd#L519-L549

Nowosad added a commit that referenced this issue May 14, 2022
@Nowosad
Copy link
Member

Nowosad commented May 14, 2022

Hi guys -- please look at https://github.com/Robinlovelace/geocompr/pull/799 and let me know what you think.

@Robinlovelace
Copy link
Collaborator

Looking better. Suggested changes building on your changes here Jakub: https://github.com/Robinlovelace/geocompr/pull/800/files

A couple of points: in the table it is not clear what each input and output is, are they sfc objects of different lengths (number of rows when in sf data frames)?

And the word 'element' is not clear. I think 'sfg object' could be clearer.

Robinlovelace pushed a commit that referenced this issue May 14, 2022
@Nowosad
Copy link
Member

Nowosad commented May 14, 2022

The inputs are based on the objects from https://github.com/geocompr/geocompr.github.io/blob/source/content/post/wip/casting-geometries-extended.Rmd.
So -- the first column represents input objects (with various geometry types), and all of the rest columns is "what will happen if you type transform the input object to some other geometry".

@Robinlovelace
Copy link
Collaborator

According to comments by @defuneste here https://github.com/Robinlovelace/geocompr/pull/799#issuecomment-1126802887 this seems fixed. Thanks for reporting and for the quick fix!

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

No branches or pull requests

3 participants