-
-
Notifications
You must be signed in to change notification settings - Fork 307
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
v.rast.stats: note about vector overlap limitation #1730
Conversation
@metzm: may we merge this documentation change? |
Close/reopen to awake flake8 test |
rasterization process. Statistics for these vectors will thus be partial. | ||
<p>If an area has several categories in the selected layer (equivalent | ||
to overlapping polygons in Simple Features), only one category will be | ||
kept during the rasterization process. Statistics for the skipped |
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.
Shouldn't skipped there be replaced by kept? The skipped will be skipped, no? So the resulting stats for kept categories will be partial.
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.
In the case of two polygons partially overlapping, you have three topological areas where one area has two categories, shared with the other two areas:
- area 1: category 1
- area 2: category 2
- area 3: categories 1, 2
Let's assume, for area 3 category 1 has been used: statistics for category 1 are complete and for category 2 incomplete because category 2 has been skipped for area 3. Thus resulting stats for skipped categories are partial.
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.
Thanks for clarification, Markus. I re-created the plot in a paper here. So, you mean it's partial because category 2 will be considered only in area 2 in this case then?
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 have added a more detailed explanation. OK, @veroandreo?
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.
Yes, thanks Markus :)
An example to create a vector in nc_spm_08 where areas have multiple categories and to get the number of areas that have multiple categories (requires PR #2085):
|
* explain behaviour and incomplete stats if areas have multiple categories in the selected layer Co-authored-by: Markus Metz <33666869+metzm@users.noreply.github.com>
* explain behaviour and incomplete stats if areas have multiple categories in the selected layer Co-authored-by: Markus Metz <33666869+metzm@users.noreply.github.com>
* explain behaviour and incomplete stats if areas have multiple categories in the selected layer Co-authored-by: Markus Metz <33666869+metzm@users.noreply.github.com>
* explain behaviour and incomplete stats if areas have multiple categories in the selected layer Co-authored-by: Markus Metz <33666869+metzm@users.noreply.github.com>
Short note warning the user that if the vector map contains overlapping vectors, only one category will be picked during the rasterization process.
I'm suggesting that note because it took me a while recently before understanding why I was not always getting the stats I was expecting...