SqlGeography.Reduce 方法如何工作?

发布于 2024-08-17 14:59:10 字数 281 浏览 2 评论 0原文

这个API是如何工作的?

我正在使用一些具有约 2000 个点的复杂地理(河流的几何形状)。当减少公差2048时,效果很好。但是当以容差因子 4096 减少时,它会抛出异常 “24205:指定的输入不代表有效的地理实例,因为它超出了单个半球。每个地理实例必须适合单个半球。此错误的常见原因是多边形的环方向错误。”

这是否意味着我在地理对象中有两个不同方向的几何图形(这些点仅位于单个半球),并且容差为 4096,它尝试合并这两个不同方向的几何图形但失败了?有什么办法可以避免这种情况吗?

How does this API works?

I am using some complex geography with ~2000 points (geometry of a river). While reducing with tolerance 2048, it works fine. But while reducing with tolerance factor 4096, it throws exception
"24205: The specified input does not represent a valid geography instance because it exceeds a single hemisphere. Each geography instance must fit inside a single hemisphere. A common reason for this error is that a polygon has the wrong ring orientation."

Does this mean i have two geometry of different orientation (these points are located in single hemisphere only) in geography object and with tolerance 4096 it tries to merge these two geometries of different orientation and it fails? Is there anyway to avoid such scenarios?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

×眷恋的温暖 2024-08-24 14:59:10

当 SQL Server 看到一个地理实例时,它会为其计算一个边界上限。如果顶角超过 90 度,则会抛出异常 24205“地理实例必须适合单个半球”。即使没有任何点跨越赤道,这也可能是正确的。

有关深入的答案,请参阅地理半球限制

When SQL Server sees a geography instance it computes a bounding cap for it. If the cap angle exceeds 90 degrees then it throws exception 24205 "geography instance must fit inside a single hemisphere". This can be true even if none of the points cross the equator.

For an in depth answer see the Geography Hemisphere Limitation.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文