Opened 3 years ago
Closed 3 years ago
#4981 closed enhancement (fixed)
ST_StartPoint support any geometry
Reported by: | kalenik | Owned by: | robe |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 3.2.0 |
Component: | postgis | Version: | master |
Keywords: | Cc: |
Description
ST_StartPoint can be enhanced to pick start point from any geometry. Will be useful for cases when you need to get any point from any geometry fastest way possible.
Change History (7)
comment:1 by , 3 years ago
comment:2 by , 3 years ago
If the aim is "fast", ST_PointOnSurface isn't fast. Also, ST_StartPoint is about getting the "start" vertex, not a point on the "surface" of the object, so they are really not doing the same thing.
Rather, I question whether it is ok for standard-defined signatures to behave differently from specified, but I think we broke that rule already
comment:3 by , 3 years ago
I went through OGC specification and, yes, it doesn't describe how ST_StartPoint should behave for geometries that are not linestrings. Should implementer decide whether to return NULL or try to return best possible result? Returning something seems like better option than returning nothing but it is arguable.
comment:4 by , 3 years ago
Following the same approach, I was just hit by ST_ExteriorRing(<multipolygon-with-just-one-element>) also returning NULL. It would be good to have a general option for what to do in these cases.
comment:5 by , 3 years ago
Milestone: | PostGIS 3.3.0 → PostGIS 3.2.0 |
---|
Will if we are set on it and kalenik already provided a patch, can't think of why we don't just do it in 3.2.0, since we haven't called alpha yet. So pushing back to 3.2
comment:6 by , 3 years ago
Owner: | changed from | to
---|
I question changing the behavior of ST_StartPoint when we have ST_PointOnSuface that already does that.