Consider the following query:
WITH geoms AS( SELECT ST_Buffer(ST_MakePoint(10,10),5,200) as circle, ST_MakeEnvelope(5,5,15,15) as square ) SELECT ST_Snap(square,circle,15) geom FROM geoms;
I would expect two possible outcomes:
- The square being made completely into a circle (points are being introduced to the segments)
- The 4 vertices of the square are snapped to their closest neighbours on the circle (the square would fit into the circle)
but the actual outcome is this:
Here, only 4 vertices are snapped to their corresponding nearest square neigbours.
I don't understand what happens in the first case. Somebody else does? (my real use-case is more complex, but seems to boil down to this problem)