[postgis-users] ST_MinkowskiSum

Stephen Mather stephen at smathermather.com
Sat Dec 7 20:41:12 PST 2013


Hmm, partially answering my own question, but it's obvious the output is
not 2D, but I can't say I quite understand the product it is creating... .

Best,
Steve


On Sat, Dec 7, 2013 at 5:55 PM, Stephen Mather <stephen at smathermather.com>wrote:

> Hit send too soon...
>
> Hi All,
>
> Digging SFCGAL... .  Quick question-- is ST_MinkowskiSum a 2D calculation
> of the Minkowski Sum when non-polyhedral surfaces are fed in?  For example,
> I tried this:
>
> WITH pointt AS (
>
> SELECT ST_MakePoint(0,0,0) AS the_geom
>
> ),
>
> buffered AS (
>
> SELECT ST_Buffer(the_geom, 30, 20) AS the_geom FROM pointt
>
> ),
>
> rotatedOnItsSideX AS (
>
> SELECT ST_RotateX(the_geom, 0.25 * pi()) AS the_geom from buffered
>
> ),
>
> minkowski_sum AS (
>
> SELECT ST_MinkowskiSum(x.the_geom, b.the_geom) AS the_geom FROM
>
> rotatedOnItsSideX x, buffered b
>
> )
>
> SELECT ST_AsText(the_geom) from minkowski_sum;
>
>
> I get:
>
>
> MULTIPOLYGON(((-60 -7.45012945754965e-14,-59.9075200119938
> -2.35377287183542,-59.8150400239877 -4.01814163088313,-59.538170229848
> -6.35740271025471,-59.2613004357083 -8.01151008244411,-58.8017478297844
> -10.3218370469144,-58.3421952238606 -11.9554849102494, (...)
>
>
> Thanks,
>
> Best,
>
> Steve
>
>
>
>
> On Sat, Dec 7, 2013 at 5:51 PM, Stephen Mather <stephen at smathermather.com>wrote:
>
>> Hi All,
>>
>> Digging SFCGAL... .  Quick question-- is ST_MinkowskiSum a 2D calculation
>> of the Minkowski Sum when non-polyhedral surfaces are fed in?  For example,
>> I tried this:
>>
>> WITH pointt AS (
>>
>> SELECT ST_MakePoint(0,0,0) AS the_geom
>>
>> ),
>>
>> buffered AS (
>>
>> SELECT ST_Buffer(the_geom, 30, 20) AS the_geom FROM pointt
>>
>> ),
>>
>> rotatedOnItsSideX AS (
>>
>> SELECT ST_RotateX(the_geom, 0.25 * pi()) AS the_geom from buffered
>>
>> ),
>>
>> minkowski_sum AS (
>>
>> SELECT ST_MinkowskiSum(x.the_geom, b.the_geom) AS the_geom FROM
>>
>> rotatedOnItsSideX x, buffered b
>>
>> )
>>
>> SELECT 1 as gid, ST_AsText(the_geom) from minkowski_sum;
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20131207/64ff7a42/attachment.html>


More information about the postgis-users mailing list