Opened 12 years ago
Closed 12 years ago
#1929 closed defect (fixed)
regression issue: ST_Polygon used to return simplest polygon
Reported by: | robe | Owned by: | dustymugs |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 2.1.0 |
Component: | raster | Version: | master |
Keywords: | Cc: |
Description
In 2.0, when I wrote the docs: http://postgis.refractions.net/documentation/manual-svn/RT_ST_Polygon.html
ST_Polygon would return a polygon or multipolygon. Now I see it always seems to return a multipolygon even if that multipolygon only contains one polygon. The answer is different too, but I have to verify dataset is the same to be sure.
If polygon/multipolygon is intentional it should probably be flagged as such in the docs. Also docs are missing an enhanced flag to denote the change from partial plpgsql based to full faster C-based. Is that okay to put in or are you still working on things and want to wait.
Change History (3)
comment:1 by , 12 years ago
comment:2 by , 12 years ago
I actually prefer the multipolygon behavior as it guarantees that the output will always be multipolygon. Another thing that did change with the C version is that the code will validate that the union of the pixel polygons is valid and if not will call GEOS's make-valid function.
I'll double-check the changes you made in r0086 and add any revisions. Once I've done that, I'll close this ticket.
documented at r10086
Let's keep the multipolygon behavior. i like the fact that the type is now always the same. If people want a polygon they can do an ST_UnaryUnion wrap.