开发者

What is the area in a LEVEL_4 cell in a geography spatial index in SQL Server?

I have a spatial index using the geography data type in SQL Server defined as the following.

开发者_开发技巧
CREATE SPATIAL INDEX [IX_CI_Geocode] ON [dbo].[CustomerInformation] 
(
    [Geocode]
)USING  GEOGRAPHY_GRID 
WITH (
GRIDS =(LEVEL_1 = HIGH,LEVEL_2 = HIGH,LEVEL_3 = HIGH,LEVEL_4 = HIGH), 
CELLS_PER_OBJECT = 128, PAD_INDEX  = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

What is the area under the deepest cell? Basically, at Level_4, what would the width and height be of the cell in feet or meters?

For instance, a Level_1 cell is going to cover half of the United States. Level 2 cells are broken down into smaller cells. What size are the final cells?


I just figured this out. Use the following query pointing at a spatial index on a table.

declare @qs geography; SET @qs =geography::Point(39.1877151742333, -90.3541887940784, 4326).STBuffer(5000); exec sp_help_spatial_geography_index 'TableName', 'IndexName', 1, @qs;

Look at the line "Area_Of_Cell_In_LevelX" to see what the area is of the cell at each of the 4 levels.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜