クリップ抜出


CLIP
選択したジオメトリでレコードをクリップする。

USE MapGdb
GO

DECLARE @nagano AS GEOMETRY;

SELECT
 @nagano = Geometry::UnionAggregate(Shape) 
FROM
 JPN71 
WHERE
 KEN = '長野県';

SELECT @nagano;

SELECT
ID,
Shape.STIntersection(@nagano) CLIPED
FROM
(SELECT 1 AS ID, Geometry::UnionAggregate(Shape) AS Shape FROM ROAD WHERE YURYO = 1) AS TAB
WHERE
TAB.Shape.STIntersects(@nagano) = 1;

GO
カテゴリー: 開発 タグ: パーマリンク