Export (0) Print
Expand All

ReorientObject (geography Data Type)

Applies To: SQL Server 2014, SQL Server 2016 Preview

Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).

Returns a geography instance with interchanged interior regions and exterior regions.

This geography data type method supports FullGlobe instances or spatial instances that are larger than a hemisphere.

Applies to: SQL Server (SQL Server 2012 through current version), Azure SQL Database.

.ReorientObject (geography)


Is another geography instance on which ReorientObject() is invoked.

SQL Server return type: geography

CLR return type: SqlGeography

This method changes the ring orientation of all Polygons in a GeometryCollection but does not remove or change any Points or Linestrings in the given collection.

If a GeometryCollection is passed to this method, each instance in the collection is reoriented, but the collection as a whole is not reoriented.

DECLARE @R GEOGRAPHY = GEOGRAPHY::Parse('Polygon((-10 -10, -10 10, 10 10, 10 -10, -10 -10))');
SELECT @R.ReorientObject().STAsText();
--Result: POLYGON ((10 10, -10 10, -10 -10, 10 -10, 10 10))
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2015 Microsoft