-
-
Notifications
You must be signed in to change notification settings - Fork 722
Update linestopolygons algorithm description #9784
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
base: master
Are you sure you want to change the base?
Conversation
I didn't attach visualization (print screen) because it's a pretty long one in render. |
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.
Hi @phidrho
Really nice stuff. It will certainly help a lot of users.
- OUTPUT | ||
- NOTE | ||
|
||
* - **Feature a**: Single line LineString |
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.
* - **Feature a**: Single line LineString | |
* - **Feature a**: Single segment LineString |
Lines to polygons on linestrings | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
Features with 3 or more vertices are expected on input: **start point - vertex/vertices - end point** |
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.
The first example contradicts this statement. And as I suggest later, I'd just merge concept of single and multiline segments together
Lines to polygons on linestrings | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
Features with 3 or more vertices are expected on input: **start point - vertex/vertices - end point** |
Generates a polygon layer from line layer, considering LineString geometry with three | ||
or more vertices as polygon rings. Input LineString geometry doesn't need to close a loop, |
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.
Nitpicking.. Not really true because when you use a line with two vertices, you also get a polygon layer. Empty polygon geometry, as stated later, still a polygon layer.
Generates a polygon layer from line layer, considering LineString geometry with three | |
or more vertices as polygon rings. Input LineString geometry doesn't need to close a loop, | |
Generates a polygon layer using as polygon rings the individual line features from an input line layer. | |
Input LineString geometry doesn't need to close a loop, |
algorithm will automatically connect last to first point when forming a polygon. | ||
Result is always promoted to MultiPolygon. | ||
LineString geometry that have less than three vertices will produce | ||
new polygon features with **EMPTY** MultiPolygon geometry, attributes are kept. |
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.
new polygon features with **EMPTY** MultiPolygon geometry, attributes are kept. | |
new polygon features with **EMPTY** geometry. |
The attribute table of the output layer is the same as the one of | ||
the input layer. |
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.
The attribute table of the output layer is the same as the one of | |
the input layer. | |
Attributes of the input line feature are ALWAYS kept in the output polygon geometry. |
And then I wonder if we need to repeat it for every example below
|
||
.. list-table:: | ||
:header-rows: 1 | ||
:widths: 30 30 40 |
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.
:widths: 30 30 40 | |
:widths: 30 30 40 | |
:class: longtable |
This allows in the PDF build to have long tables split across pages
| | ||
| **Output has a valid (empty) geometry.** | ||
|
||
* - **Feature b**: LineString with three vertices |
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.
Does the number of vertice/segments matters? It is more the situation of a not closed linestring with more than one segment, no?
This can be fixed by using :ref:`qgisfixgeometries` algorithm with two possible scenarios: | ||
|
||
1. *Fixing by structure repair method* - two parts will dissolve into MultiPolygon geometry with one part | ||
2. *Fixing by linework repair method* - equal to symmetrical difference of two parts which results MultiPolygon geometry with one part (doughnut shape in this case) |
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.
2. *Fixing by linework repair method* - equal to symmetrical difference of two parts which results MultiPolygon geometry with one part (doughnut shape in this case) | |
2. *Fixing by linework repair method* - equal to symmetrical difference of two parts which results in MultiPolygon geometry with one part (doughnut shape in this case) |
?
:width: 25 em | ||
:align: center | ||
|
||
Two distinct LineStrings, one geometrically contained inside another |
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.
(here and below) Are LineString and MultiPolygon (written with that casing) pluralizable? How about
Two distinct LineStrings, one geometrically contained inside another | |
Two distinct line features, one geometrically contained inside another |
- | **Feature e**: MultiPolygon | ||
| **Feature f**: MultiPolygon |
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.
How does this render in HTML?
Goal:
Create a better documentation for native LinesToPolygons processing algorthm.
Please review and suggest additional edits if needed.
After we finish final version, I will prepare similar one for native Polygonize algorithm.
Ticket(s): #