Aracılığıyla paylaş


STIntersection (coğrafi konum veri türü)

Noktalarını temsil eden bir nesne döndürür nerede bir geographybir başka örneği kestiği geographyörneği.

Sözdizimi

.STIntersection ( other_geography )

Bağımsız değişkenler

  • other_geography
    Başka bir geographyörneğini hangi örneğinde ile **STIntersection()**Çağrılmakta.

Dönüş Türleri

SQL Server dönüş türü: geography

clr döndürme türü:SqlGeography

Açıklamalar

İki coğrafi konum örnekleri kesişim döndürülür.

**STIntersection()**her zaman döndürür null If kayma başvuru tanımlayıcıları (SRIDs) geographyörnekleri eşleşmiyor.

SQL Serverbir Yarımküre büyük kayma örnekleri destekler.  SQL Serverdahil FullGlobeolası sonuçları kümesi durumlarda sunucuda geri döndü.

Yalnızca giriş örnekleri circular arc kesimleri içeriyorsa sonuç circular arc parçalarını içerebilir.

Örnekler

A.Bir çokgen ve LineString bilgisayar

Aşağıdaki örnek STIntersection()kesişim hesaplamak için bir Polygona LineString.

DECLARE @g geography;
DECLARE @h geography;
SET @g = geography::STGeomFromText('POLYGON((-122.358 47.653, -122.348 47.649, -122.348 47.658, -122.358 47.658, -122.358 47.653))', 4326);
SET @h = geography::STGeomFromText('LINESTRING(-122.360 47.656, -122.343 47.656)', 4326);
SELECT @g.STIntersection(@h).ToString();

DECLARE @g geography;
DECLARE @h geography;
SET @g = geography::STGeomFromText('POLYGON((-122.358 47.653, -122.348 47.649, -122.348 47.658, -122.358 47.658, -122.358 47.653))', 4326);
SET @h = geography::STGeomFromText('LINESTRING(-122.360 47.656, -122.343 47.656)', 4326);
SELECT @g.STIntersection(@h).ToString();

B.Bir çokgen ve bir CurvePolygon bilgi işlem

Aşağıdaki örnek bir circular arc kesimi içeren örneği döndürür.

DECLARE @g geography;
DECLARE @h geography;
SET @g = geography::STGeomFromText('POLYGON((-122.358 47.653, -122.348 47.649, -122.348 47.658, -122.358 47.658, -122.358 47.653))', 4326);
SET @h = geography::STGeomFromText('CURVEPOLYGON(CIRCULARSTRING(-122.351 47.656, -122.341 47.656, -122.341 47.661, -122.351 47.661, -122.351 47.656))', 4326);
SELECT @g.STIntersection(@h).ToString();

DECLARE @g geography;
DECLARE @h geography;
SET @g = geography::STGeomFromText('POLYGON((-122.358 47.653, -122.348 47.649, -122.348 47.658, -122.358 47.658, -122.358 47.653))', 4326);
SET @h = geography::STGeomFromText('CURVEPOLYGON(CIRCULARSTRING(-122.351 47.656, -122.341 47.656, -122.341 47.661, -122.351 47.661, -122.351 47.656))', 4326);
SELECT @g.STIntersection(@h).ToString();

C.FullGlobe simetrik fark bilgi işlem

Aşağıdaki örnek simetrik fark karşılaştıran bir Polygonile FullGlobe.

DECLARE @g geography = 'POLYGON((-122.358 47.653, -122.348 47.649, -122.348 47.658, -122.358 47.658, -122.358 47.653))';
SELECT @g.STIntersection('FULLGLOBE').ToString();

DECLARE @g geography = 'POLYGON((-122.358 47.653, -122.348 47.649, -122.348 47.658, -122.358 47.658, -122.358 47.653))';
SELECT @g.STIntersection('FULLGLOBE').ToString();

Ayrıca bkz.

Diğer Kaynaklar

Coğrafya örnekleri üzerinde ogc yöntemleri