Opened 8 years ago

Closed 8 years ago

#3620 closed defect (fixed)

Garden regression with ST_MinimumBoundingCircle

Reported by: robe Owned by: pramsey
Priority: medium Milestone: PostGIS 2.3.0
Component: postgis Version: master
Keywords: Cc:

Description

In comparing Garden answers between 2.2.2 and 2.3.0, see a difference in Minimum Bounding circle when applied to point.

I think this may be a side-effect of a different change and is not technically less wrong than the previous answer.

So might just require breaking change notice in docs and NEWs.

In PostGIS 2.2.2

SELECT ST_AsText(ST_MinimumBoundingCircle( ST_Point(10,2),3 ));

--returns back the point

  st_astext
-------------
 POINT(10 2)

In PostGIS 2.3.0dev r15053 returns and empty geometry

SELECT ST_AsText(ST_MinimumBoundingCircle( ST_Point(10,2),3 ));

--returns back an empty polygon

   st_astext
---------------
 POLYGON EMPTY
(1 row)

Given there is no way to get a bounding circle from a point aside from doing some buffering tricks. I'm okay with eitehr.

Well I suppose on one hand 2.3.0dev at least returns a polygon though less information. I'm okay either way as long as we document this change for people expecting to get a non-empty answer back.

I'm also seeing different answers with a couple other ST_MinimumBoundingCircle LINESTRING, POLYGON, MULTISURFACE, CIRCULARSTRING, CURVEPOLYGON.

I didn't even know we had support for CURVES, on ST_MinimumBoundingCircle (but I guess as a result of that other change with CURVES that made curve support for a bunch of functions in 2.2.

Anyrate these I haven't looked at. They may be very well corrections, or slight artifacts of change in process, so may be ignorable.

Change History (4)

comment:1 by dbaston, 8 years ago

I can see merits to both "it should always return a circle" and "it should always return something that covers the inputs." Given that the latter has been in place for some time now, it seems like that should probably be kept. Can you describe the other types of different answers you're seeing?

comment:2 by robe, 8 years ago

I did a quick inspection of the others. For the malformed linestring case e.g 'LINESTRING(1 2, 1 2)':geometry, that follows the point behavior case - returns an empty polygon vs. a POINT.

For the others, not sure what's different. I think it might be some floating point difference. The hash I did says they are different, but when I look at the binary and ST_ASText, at a quick glance I'm not seeing a difference. Visually I'm not seeing a difference either. So I assume it's just a digit off somewhere. So I think those ones can be ignored.

comment:3 by dbaston, 8 years ago

In 15109:

New method to approximate minimum bounding circle polygon without using ST_Buffer. (References #2841, #3620)

comment:4 by dbaston, 8 years ago

Resolution: fixed
Status: newclosed

Reverted to original behavior in r15109

Note: See TracTickets for help on using tickets.