问题描述
有没有办法从另一个几何体中减去几何体?一种反向STUnion ..
我遇到的问题是我需要确保一个形状适合另一个(不更改较大的形状)。我想我可以使用STIntersection来获得in中的形状。然而,STIntersection并不准确,并且会产生一种可以(并且不)等同于真实交集的形状。
如果您随后采用原始形状的STD差异,则可以轻松地看到这一点。
所以,我想要做的是给两个形状,我想从另一个中减去一个 - 例如
任何想法?
编辑:现在,我已经从STBuffer(-1)版本的更大形状创建了我的交集,这应该解释STIntersection的数学变化,精度略有降低。然而,我仍然很想知道你是否可以从另一个几何体中减去几何体。 .STDifference( )
。不需要先交叉,然后减去交点。直接减去。
Is there a way to subtract a geometry from another? A kind of reverse STUnion..
The problem I am having is that I need to ensure a shape fits within another (without changing the larger shape). I thought I could use the STIntersection to get the shape thats "in". However, STIntersection is not accurate and produces a shape that can (and does) not equate to the true intersection.
You can easily see this if you then take the STDifference of the original shape.
So , what I would like to do is given two shapes I want to subtract one from the other - e.g. Take the STIntersection and then subtract the STDifference.
Any ideas?
Edit: For now, I have created my intersection from a STBuffer(-1) version of the bigger shape, this should account the mathematical variation of STIntersection with a slight reduction in accuracy. However, I would still love to know if you can subtract a geometry from another..
Just use .STDifference()
. No need to intersect first, then subtract the intersection. Just subtract directly.
这篇关于从另一个SQL Server几何中减去的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!