To return a GML representation of a geography instanceĪsGml (geography Data Type) Querying the Properties and Behaviors of geography InstancesĪll geography instances have a number of properties that can be retrieved through methods that SQL Server provides. To return the WKB representation of a geography instance To return the WKT representation of a geography instance including any Z and M values To return the WKT representation of a geography instance You can use the following methods to return either the WKT or WKB format of a geography instance: GeomFromGML (geography Data Type) Returning Well-Known Text and Well-Known Binary from a geography Instance To construct any type of geography instance from GML input SQL Server supports a subset of GML.įor more information on Geography Markup Language, see the OGC Specification: OGC Specifications, Geography Markup Language. The geography data type provides a method that generates a geography instance from GML, an XML representation of a geography instance. STGeomCollFromWKB (geography Data Type)STGeomCollFromWKB (geography Data Type) Constructing a geography Instance from GML Text Input To construct a geography Geometr圜ollection instance from WKB input To construct a geography MultiPolygon instance from WKB input To construct a geography Polygon instance from WKB input To construct a geography MultiLineString instance from WKB input To construct a geography LineString instance from WKB input
To construct a geography MultiPoint instance from WKB input To construct a geography Point instance from WKB input To construct any type of geography instance from WKB input The following functions accept WKB input to construct geography instances: WKB is a binary format specified by the OGC that permits Geography data to be exchanged between a client application and an SQL database. STGeomCollFromText (geography Data Type) Constructing a geography Instance from Well-Known Binary Input To construct a geography Geometr圜ollection instance from WKT input To construct a geography MultiPolygon instance from WKT input To construct a geography Polygon instance from WKT input To construct a geography MultiLineString instance from WKT input To construct a geography LineString instance from WKT input
To construct a geography MultiPoint instance from WKT input To construct a geography Point instance from WKT input To construct any type of geography instance from WKT input The WKT standard is a text string that allows geography data to be exchanged in textual form. The geography data type provides several built-in methods that generate a geography from the Open Geospatial Consortium (OGC) WKT representation. STDifference (geography Data Type) Constructing a geography Instance from Well-Known Text Input To create a geography from the points where one geography does not overlap another To create a geography from the union of two geography instances To create a geography from the intersection of two geography instances To create a buffer around a geography, allowing for a toleranceīufferWithTolerance (geography Data Type) The geography data type provides numerous built-in methods you can use to create new geography instances based on existing instances. Creating or constructing a new geography instance Creating a New geography Instance from an Existing Instance You can create table columns of type geography and operate on geography data in the same manner as you would use other system-supplied types. The geography type is predefined and available in each database. The SQL Server geography data type stores ellipsoidal (round-earth) data, such as GPS latitude and longitude coordinates. NET common language runtime (CLR) data type in SQL Server. The geography spatial data type, geography, represents data in a round-earth coordinate system. Applies to: SQL Server (all supported versions) Azure SQL Database Azure SQL Managed Instance