NumRings (lokalizacja geograficzna, typ danych)
Zwraca wartość całkowitą liczbę sygnałów w Polygon wystąpienie. In the SQL Servergeography type, external and internal rings are not distinguished, as any ring can be taken to be the external ring.
.NumRings ()
Zwracany typ
SQL Server typ zwrotny: int
Zwracany typ CLR: SqlInt32
Remarks
Ta metoda zwróci wartość NULL, jeśli nie jest to Polygon wystąpienie i zwraca 0 Jeśli instancja jest pusty. Ta metoda jest dokładne.
Przykłady
W tym przykładzie tworzony Polygon wystąpienie z dwóch sygnałów i potwierdza ma dwa pierścienie.
DECLARE @g 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), (-122.357 47.654, -122.357 47.657, -122.349 47.657, -122.349 47.650, -122.357 47.654))', 4326);
SELECT @g.NumRings();