SqlGeography.Reduce 方法如何工作?
这个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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当 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.