ST_OffsetCurve Documentation should explicitly mention variable return type
In 99% of cases, ST_OffsetCurve returns a LineString, and this is the intuitive return type. However, in the remaining 1% of cases, it in fact returns a MultiLineString. (The fact that some of those appear to be unjustifiably so is probably another ticket!)
In many cases, programmers would simply assign the output to a linestring. This will cause intermittent bugs when a Multilinestring is returned.
The documentation should explicitly say that this may be the case, allowing a programmer to allow for that possibility.
It would be good to illustrate this possibility with an example, such as a jigsaw-tongue type structure where the width of the narrow part of the tongue is less than twice the offset distance.
Change History
(9)
Milestone: |
PostGIS 2.1.2 → PostGIS 2.2.0
|
Milestone: |
PostGIS 2.2.0 → PostGIS 2.1.9
|
Milestone: |
PostGIS 2.1.9 → PostGIS 2.2.6
|
Version: |
2.1.x → 2.2.x
|
Milestone: |
PostGIS 2.2.6 → PostGIS 2.2.7
|
Milestone: |
PostGIS 2.2.7 → PostGIS 2.5.0
|
Milestone: |
PostGIS 2.5.0 → PostGIS 2.4.5
|
Milestone: |
PostGIS 2.4.5 → PostGIS 2.4.6
|
Resolution: |
→ fixed
|
Status: |
new → closed
|
I may push this back if I have time or to 2.1.3 -- just getting it out of the 2.1.2 queue so we can release soon.