gpt4 book ai didi

sql-server - X-max 的值必须大于 X-min 的值

转载 作者:行者123 更新时间:2023-12-02 18:48:58 25 4
gpt4 key购买 nike

我正在尝试为我的表创建空间索引:

CREATE TABLE [dbo].[GeoResult](
[Id] [int] NOT NULL,

[PointCenter] AS ([dbo].[ConvertToGeometryPoint]([LatitudeCenter],[LongitudeCenter])),

[CreatedOn] [datetime] NOT NULL,
CONSTRAINT [PK_GeoResult] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

当我尝试使用“添加空间索引”向导添加新的空间索引时,出现以下错误: The value of  X-max  must be greater than the value of X-min.

鉴于我的应用需要支持全局位置,边界框属性的最佳值应该是多少?

最佳答案

这里有几个问题。

  1. 您正在使用几何网格,但应该使用地理网格。自己进行基准测试。
  2. 文档,位于 https://learn.microsoft.com/en-us/sql/t-sql/statements/create-spatial-index-transact-sql?view=sql-server-2017 ,要求:

    Bounding-box coordinates apply only within a USING GEOMETRY_GRID clause.

    xmax must be greater than xmin and ymax must be greater than ymin. You can specify any valid float value representation, assuming that: xmax > xmin and ymax > ymin. Otherwise the appropriate errors are raised.

    There are no default values.

关于sql-server - X-max 的值必须大于 X-min 的值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23601001/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com