|
Let's walk the sequence of calls in the reverse order: GeomConvertToLine converts a geom (in this case, a multi-point) into a line. Do we want the conversion to keep branches? Yes, we do, if the original geom contains three branches, the resulting line should contain three branches as well, these branches should not be joined, it's just natural. GeomConvertToLine running on a geom that is already a line should just return the same line, right? Then it should not join branches, it should keep them. Suppose we didn't have GeomConvertToPoint and had just GeomMergePoints. GeomMergePoints takes a set of points / multi-points, including those with branches, and joins them into a single geom. Do we want it to keep branches? Again, yes, we do, it's natural. If a particular object had three branches with 10 coordinates each, perhaps they have been split that way for a reason, that's useful info, why throw it away. GeomMergeLines / Areas don't throw that kind of info away, why should GeomMergePoints, etc. That's why we need GeomConvertToPoint - it takes a multi-point with tons of branches returned by GeomMergePoints and joins all coordinates keeping the order into a single branch - which can then be turned into a single line branch in GeomConvertToLine. GeomConvertToPoint is there for its False parameter.
|