SlideShare une entreprise Scribd logo
1  sur  106
Télécharger pour lire hors ligne
•
•
•
SQL Server Spatial Summary
OVERVIEW                                            FEATURES
• 2 Spatial Data Types (CLR UDT)                    • 2D Vector Data Support
• Comprehensive set of Spatial Methods              • Open Geospatial Consortium Simple
• High Performance Spatial Indexes                    Features for SQL compatible
• Spatial Industry Standards Support                • Supported By Major GIS Vendors
• Spatial Library                                     ESRI, Intergraph, Autodesk, Pitney Bowes, Safe, etc.
•Management Studio Integration                      • Standard feature in all SQL Server Editions
• Cloud-enabled                                     • Support for very large spatial objects (2GB)
                                                    • Supported in SS Reporting Services
                                                    • Redistributable Spatial Library
DETAILS
• Geography data type for geodetic data
• Geometry data type for planar data
• Standard spatial methods
   STIntersects, STBuffer, STLength, STArea, etc.
• Standard spatial format support (WKT, WBK, GML)
• Multiple spatial indexes per column
• Multiple spatial columns per table
• Create new CLR-based spatial functions
  with the Sink/Builder APIs
• SQL Azure Spatial support
• Support for circular (curve) spatial objects
• Support for full globe geography objects
• Optimized performance for the sphere                                                     Ed Katibah, SQL Server, July 1, 2008
2 Spatial Datatypes

 • Geography (Geodetic)
 • Geometry (Planar)

Geography

 •   Ellipsoidal coordinate support only (e.g. WGS 84)
 •   Core set of geospatial methods
 •   No OGC/ISO standards compliance (though many standards components are there)
 •   Geospatial index
 •   Designed as a simple, straight-forward geospatial implementation

Geometry
 •   Planar coordinate support only (georeferenced and non-georeferenced)
 •   Complete set of spatial methods
 •   OGC/ISO standards compliance (OGC SFS v1.1, ISO 19125)
 •   Spatial index
 •   Comprehensive spatial/geospatial offering supporting 2D planimetric
     applications
POINT            MULTIPOINT




LINESTRING       MULTILINESTRING




CIRCULARSTRING   COMPOUNDCURVE




POLYGON          MULTIPOLYGON



                 GEOMETRYCOLLEC
CURVEPOLYGON
                 TION



FULLGLOBE
Spatial Data Type Support

 Spatial Methods

• Retrieving Properties of Geometry Objects
• Constructing Geometry Objects
• Returning WKT, WKB and GML
• Querying Validity, Instance Type, and Geometry Collection
  Information
• Determining the Relationship between Two Geometries
• Creating New Geometries


 Spatial Indexes

 • 4 Spatial indexes, two for geometry and two for geography
Vector Data
• Redmond to Belgrade
• Does it go through France?
Shortest path is a Great Circle…
What is the distance from Anchorage to Tokyo?
•

•

•

•
Geometry Data Type                Geography Data Type
       STIntersects()=1                  STIntersects()=1
       STOverlaps()=1                    STOverlaps()=1*
       STEquals() = 1                    STEquals() = 1
       STTouches() = 1
       STWithin() = 1                    STWithin() = 1*
       STContains() = 1                  STContains() = 1*
       STDistance() < value**            STDistance() < value**
       STDistance() <= value**           STDistance() <= value**
       Filter() = 1                      Filter() = 1


*New to SQL Server Code-Named “Denali” CTP3
**STDistance() also participates in the new “Denali” Nearest Neighbor (NN) query plan
•

•

•

•
•
    −
    −


•
    −
    −


•

•
    −
    −


•
Auto Grid Spatial Index

                           Index Construction
CREATE SPATIAL INDEX idxGeog        CREATE SPATIAL INDEX idxGeom
  ON table(geography column)          ON table(geometry column)
  USING GEOGRAPHY_AUTO_GRID;          USING GEOMETRY_AUTO_GRID;

                  or                                   or

CREATE SPATIAL INDEX idxGeog    CREATE SPATIAL INDEX idxGeom
  ON table(geography column)      ON table(geometry column)
  USING GEOGRAPHY_AUTO_GRID       USING GEOMETRY_AUTO_GRID
  WITH (CELLS_PER_OBJECT = 32);   WITH (CELLS_PER_OBJECT = 32);



Geography Type:                     Geometry Type:
Default Cells per Object: 12        Default Cells per Object: 8
New Spatial Index Hint

SPATIAL_WINDOW_MAX_CELLS
Fine tuning at runtime for spatial indexes


 SELECT *
   FROM table t
     WITH (SPATIAL_WINDOW_MAX_CELLS=32)
       WHERE t.geom.STIntersects(@window)=1;


 The default value is 512 for geometry and
 768 for geography. In SQL Server 2008, this
 value was hardcoded at 1024.
Relative Performance
•                                 Optimal value (theoretical) is
                                somewhere between two extremes




           Default values:                        Time needed to
    512 - Geometry AUTO grid                   process false positives
    768 - Geography AUTO grid
    1024 - MANUAL grids
Spatial Index Compression


CREATE SPATIAL INDEX idxGeog
  ON table(geography column)
  USING GEOGRAPHY_GRID
  WITH (
    DATA_COMPRESSION = <page | row>
  );

On the basis of internal tests, with compression:
• 40%-50% smaller than uncompressed counterparts
• 5%-10% performance overhead for small indexes
• For large indexes, performance improvements are observed
•


•
•

•

•

•
•
    
    
    

•

•

•
LINESTRING (0 50, 90 50, 180 50,
270 50, 0 50)



  Linestring segments in the
  geography type define the
  minimum distance path on the
  underlying ellipsoid.
CIRCULARSTRING (0 50, 90 50,
180 50, 270 50, 0 50)


  Circularstring segments in the
  geography type define a circular
  path. A good example is a latitude
  parallel.
Circular Arcs
Geography Type Considerations

                                CIRCULARSTRING
                                (0 50, 90 50, 180 50, 270 50, 0 50)


                                If a circular linestring is closed, a
                                curve polygon can be created


                                CURVEPOLYGON (CIRCULARSTRING
                                 (0 50, 90 50, 180 50, 270 50, 0 50))


                                Coordinate pair order is important
                                for the geography type. This set
                                of coordinates is ordered according
                                to the “left foot rule” for exterior
                                rings.
New Methods for Circular Arcs

                                BufferWithCurves()

                                This method will construct the
                                resulting polygon with circular
                                arcs, often resulting in a
                                dramatically smaller spatial
                                object.


                                DECLARE @g GEOGRAPHY =
                                GEOGRAPHY::STGeomFromText('CIRCULARSTRING(0 50,
                                45 50, 90 50)',4326)
                                DECLARE @b GEOGRAPHY =
                                @g.BufferWithCurves(500000)
                                SELECT @b.STNumPoints()
                                --Number of vertices: 11

                                DECLARE @g GEOGRAPHY =
                                GEOGRAPHY::STGeomFromText('CIRCULARSTRING(0 50,
                                45 50, 90 50)',4326)
                                DECLARE @b GEOGRAPHY = @g.STBuffer(500000)
                                SELECT @b.STNumPoints()
                                --Number of vertices: 257
New Methods for Circular Arcs
continued…

   • STNumCurves()
     Returns the number of curves in an object

   • STCurveN()
     Used for iteration through the list of the edges

   • STCurveToLine()
     Convert curve components to a linestring

   • CurveToLineWithTolerance()
     Same as above but with user specific tolerance
Existing Methods And Circular Arcs

         All existing method work on circular arcs




                     STIntersects() example
New and Updated Methods and Aggregates for
all Types

 ShortestLineTo();
 returns a linestring which represents the
 shortest distance between 2 objects


  HasZ, HasM
  [boolean] returns 0 or 1 if object has Z or
  M-value components
New and Updated Methods and Aggregates for all
Types




UnionAggregate()

EnvelopeAggregate()

CollectionAggregate()

ConvexHullAggregate()
The following aggregate examples will use this core data

SELECT geog FROM Counties
 WHERE name_1 = 'Washington„
--Results: 39 rows, 1 for each county in the State of Washington


                                       All aggregates are static methods which
                                       work for either the Geography or
                                       the Geometry data types. For instance,
                                       consider the geography aggregate:

                                         Geography::UnionAggregate(geog)

                                        and its counterpart for geometry:

                                         Geometry::UnionAggregate(geom)
Definition: Combines multiple spatial objects into a single spatial object,
removing interior boundaries, where applicable.

SELECT Geography::UnionAggregate(geog) FROM Counties
 WHERE name_1 = 'Washington';
Definition: Returns a bounding circular object as a CurvePolygon which encloses
     one or more spatial objects.

    SELECT Geography::EnvelopeAggregate(geog).STCurveToLine() FROM Counties
     WHERE name_1 = 'Washington';




Notes: STCurveToLine() method employed to assist in circular object rendering with visualization
programs which do not support curve objects.
Definition: Returns a 5 point polygon (rectangle) which encloses one or
    more spatial objects.
    SELECT Geometry::EnvelopeAggregate(geom) FROM Counties
     WHERE name_1 = 'Washington';




Notes: County input objects are in a US-wide Albers
projection which accounts for the apparent data
rotation.
Definition: Returns a geometry collection with one geometry part for each sp
  object(s) in the selection set.

  SELECT Geography::CollectionAggregate(geog) FROM Counties
   WHERE name_1 = 'Washington';




Notes: Unlike the UnionAggregate, adjoining
interior boundaries are not removed for polygons
Definition: Returns a convex hull polygon which encloses one or more spatial
objects.

SELECT Geography::ConvexHullAggregate(geog) FROM Counties
 WHERE name_1 = 'Washington';
•
•
•


•



•
• STLength()
       Now works on both valid and invalid linestrings; STLength now
       works on invalid linestrings. Typically a linestring is invalid due to
       overlapping segment caused by anomalies such as inaccurate GPS
       measurements.

• MinDbCompatibilityLevel()
       Method used for backward compatibility; indicates if spatial
       objects can be recognized by SQL Server 2008 and SQL Server
       2008 R2.

• IsValidDetailed()
       Provides commentary on what is wrong with invalid objects
   24400: Valid

   24401: Not valid, reason unknown.

   24402: Not valid because point ({0}) is an isolated point, which is not valid in this type of object.

   24403: Not valid because some pair of polygon edges overlap.

   24404: Not valid because polygon ring ({0}) intersects itself or some other ring.

   24405: Not valid because some polygon ring intersects itself or some other ring.

   24406: Not valid because curve ({0}) degenerates to a point.

   24407: Not valid because polygon ring ({0}) collapses to a line at point ({1}).

   24408: Not valid because polygon ring ({0}) is not closed.

   24409: Not valid because some portion of polygon ring ({0}) lies in the interior of a polygon.

   24410: Not valid because ring ({0}) is the first ring in a polygon of which it is not the exterior ring.

   24411: Not valid because ring ({0}) lies outside the exterior ring ({1}) of its polygon.

   24412: Not valid because the interior of a polygon with rings ({0}) and ({1}) is not connected.

   24413: Not valid because of two overlapping edges in curve ({0}).

   24414: Not valid because an edge of curve ({0}) overlaps an edge of curve ({1}).

   24415: Not valid some polygon has an invalid ring structure.

   24416: Not valid because in curve ({0}) the edge that starts at point ({1}) is either a line or a degenerate arc with antipodal endpoints.
declare @p geography = 'Polygon((2 2, 4 4, 4 2, 2 4, 2 2))'
select @p.IsValidDetailed()
--Results: 24409: Not valid because some portion of polygon ring (1)
--         lies in the interior of a polygon.
All constructions and relations are now done with 48 bits of precision in
Denali, compared to 27 bits used in SQL Server 2008 and 2008 R2.



For example, consider the following coordinate which was processed using the
STUnion() method in SQL Server 2008



-82.339026 29.661245              -82.339025999885052 29.662144999951124

In Denali, the greater numerical precision typically maintains the precision of the
original coordinates. Here is the result of the same STUnion() method in Denali, as
above


-82.339026 29.661245              82.339026 29.661245
•

•

•

•

•

•
•
•
Full Globe
Geography Type Enhancement

                             CURVEPOLYGON
                             (CIRCULARSTRING (0 50, 90 50,
                             180 50, 270 50, 0 50))
                               Coordinate pair order is important
                               for the geography type. This set
                               of coordinates is ordered according
                               to the “left foot rule” for exterior
                               rings.

                             What happens if the coordinates
                             defining the exterior ring are
                             reversed?
Full Globe
Geography Type Enhancement
                  CURVEPOLYGON
                  (CIRCULARSTRING (0 50, 90 50,
                  180 50, 270 50, 0 50))
                   If we reverse the order of the
                   coordinate pairs, using the
                   “right foot rule” for interior
                   rings, this curve polygon now
                   represents “the rest of the globe”.
                  CURVEPOLYGON
                  (CIRCULARSTRING (0 50, 270 50,
                  180 50, 90 50, 0 50))
•

•

    −
    −
•

•
•
    −
    −
    −
    −
•

•
    −
    −
    −
    −
SELECT GEOGRAPHY::STGeomFromText('FULLGLOBE', 4326) -- WGS84

SELECT GEOGRAPHY::STGeomFromText('FULLGLOBE', 4326).STArea() -- WGS84
--Results: 510065621710996

SELECT GEOGRAPHY::STGeomFromText('FULLGLOBE', 4322).STArea() -- WGS72
--Results: 510065312469083

DECLARE @wgs84_area FLOAT =
 (SELECT GEOGRAPHY::STGeomFromText('FULLGLOBE', 4326).STArea()) -- WGS84
DECLARE @wgs72_area FLOAT =
 (SELECT GEOGRAPHY::STGeomFromText('FULLGLOBE', 4322).STArea()) -- WGS72
SELECT @wgs84_area - @wgs72_area AS [DIFFERENCE]
--Results: 309241913.4375
On March 20, 2010, the trimaran, Groupama 3,
became the fastest boat to circumnavigate the
Earth non-stop, ever (including power boats)…
in 48 days, 7 hours and 44 minutes…




                                                …and of course, it‟s GPS-equipped…
DECLARE @t GEOGRAPHY = (SELECT Track FROM Groupama_Track7)
         SELECT TOP 16 CNTRY_NAME, SOVEREIGN,
           POP_CNTRY, @t.STDistance(Geography) AS [DISTANCE FROM TRACK]
          FROM Countries ORDER BY @t.STDistance(Geography)

CNTRY_NAME             SOVEREIGN        POP_CNTRY   DISTANCE FROM TRACK
France                 France           57757060    0
New Zealand            New Zealand      3528197     7115.41609170632
Chile                  Chile            13772710    15409.5690252515
Spain                  Spain            39267780    37144.5519830663
Portugal               Portugal         9625516     57621.7065806319
Argentina              Argentina        33796870    106198.966899358
United Kingdom         United Kingdom   56420180    158636.063519451
Cape Verde             Cape Verde       413573      165226.105053976
Guernsey               United Kingdom   62920       177654.285742873
Jersey                 United Kingdom   87848       189169.527892158
Brazil                 Brazil           151525400   205920.063533954
Falkland Is.           United Kingdom   2136        237487.364201179
Fr. So. & Ant. Lands   France           -99999      397707.475465133
Ireland                Ireland          5015975     416683.669375291
Australia              Australia        17827520    418237.701906367
South Africa           South Africa     40634126    430605.825881581
New Geography Methods


                        ReorientObject()

                        • This method will reverse the
                          order of coordinates which
                          define polygon rings.

                        • This method is a no-op on
                          line strings, circular arcs and
                          points.

                        • This method does not work
                          with the geometry type.
•




•
•
•




*Average time for NN query is ~236ms
SELECT TOP(5) *
  FROM Restaurants r
    WHERE r.type = ‘Italian’
      AND r.position.STDistance(@me) IS NOT NULL
    ORDER BY r.position.STDistance(@me)

It can also be expressed with limited maximum distance

SELECT TOP(5) *
  FROM Restaurants r
    WHERE r.type = ‘Italian’
      AND r.position.STDistance(@me) < @max_range
    ORDER BY r.position.STDistance(@me)
•
    −
    −
    −
    −
    −


•
    −
    −
•

•

•
Two new helper methods are available:

• sp_help_spatial_geography_histogram
• sp_help_spatial_geometry_histogram

They can be used for investigating spatial index efficiency or analyzing spatial
data in general. The histograms could be also shown on a SSMS map.

The data can be used for external visualization:
•

    CREATE TABLE location (
           id int primary key,
           x float(max),
           y float(max),
           range float(max),
           geom as
               geometry::Point(x, y, 0)
                    .STBuffer(range) PERSISTED );
•
Client Side Library Changes

 New sink interfaces are available IGeometrySink110 and
 IGeographySink110. They should be used in the future. They must be
 used for objects incompatible with SQL Server 2008:

 • Objects bigger than a logical hemisphere
 • Objects with circular arcs
 • Invalid geography

 However, the old sinks will continue to work for SQL Server 2008
 compatible objects.

 Geometry and Geography builders (SqlGeometryBuilder and
 SqlGeographyBuilder) now support circular arc constructions.

 New method “Deserialize” is added on the client library to both types.
•
    −
    −
•
    −
        −
        −
    −
        −
        −

    −
SQL Server 2008 Spatial Data http://www.microsoft.com/sqlserver/2008/en/us/spatial-data.aspx


•                            http://sqlspatialtools.codeplex.com
•                            http://dataconnector.codeplex.com/


•                  http://blogs.msdn.com/b/isaac/
•              http://blogs.msdn.com/edkatibah/
•                            http://www.sqlskills.com/BLOGS/BOBB/


•
           http://social.technet.microsoft.com/wiki/contents/articles/4136.aspx
•
           http://social.technet.microsoft.com/wiki/contents/articles/new-spatial-features-in-the-sql-azure-q2-
2011-service-release.aspx
•                              http://social.msdn.microsoft.com/Forums/en-US/sqlspatial/threads


•                                                         http://msdn.microsoft.com/en-
    us/library/ee320529.aspx
•                                             http://msdn.microsoft.com/en-
    us/library/ee642046(v=SQL.105).aspx


•
    http://downloads.solidq.com/insidetsql/
•                                               http://www.apress.com/book/view/1430218290
•

USE Sample_USA
GO

--Update database compatibility
ALTER DATABASE Sample_USA
 SET COMPATIBILITY_LEVEL = 110;
GO
•

    USE World;
    GO

    --Update database compatibility
    ALTER DATABASE World
     SET COMPATIBILITY_LEVEL = 110;
    GO
•
    −
    −
    −
    −
    −
    −
    −
•
    −
•
    −
•
    −
•
    −
•
    −
•



DECLARE @g GEOGRAPHY;
SET @g = GEOGRAPHY::STGeomFromText('
  CIRCULARSTRING(0 -23.43778, 0 0, 0 23.43778)
',4326);
SELECT @g;
GO
•


DECLARE @g GEOGRAPHY;
SET @g = GEOGRAPHY::STGeomFromText('
  COMPOUNDCURVE(
   CIRCULARSTRING(0 -23.43778, 0 0, 0 23.43778),
   CIRCULARSTRING(0 23.43778, -45 23.43778, -90 23.43778),
   CIRCULARSTRING(-90 23.43778, -90 0, -90 -23.43778),
   CIRCULARSTRING(-90 -23.43778, -45 -23.43778, 0 -23.43778))
',4326);
SELECT @g;
GO
•



DECLARE @g GEOGRAPHY;
SET @g = GEOGRAPHY::STGeomFromText('
 COMPOUNDCURVE(
   (0 -23.43778, 0 23.43778),
   CIRCULARSTRING(0 23.43778, -45 23.43778, -90 23.43778),
   (-90 23.43778, -90 -23.43778),
   CIRCULARSTRING(-90 -23.43778, -45 -23.43778, 0 -23.43778))
 ',4326);
SELECT @g;
GO
•


DECLARE @a GEOGRAPHY = 'LineSTring(-118 34, -119 35)'
DECLARE @b GEOGRAPHY = 'Polygon((-120 22, -119 22, -119 23, -120 23, -120 22))'
SELECT @a.ShortestLineTo(@b)
UNION ALL
SELECT @a
UNION ALL
SELECT @b
GO
•



    DECLARE @g GEOGRAPHY;
    SET @g = GEOGRAPHY::STGeomFromText('
      CURVEPOLYGON(
        COMPOUNDCURVE(
          (0 -23.43778, 0 23.43778),
          CIRCULARSTRING(0 23.43778, -45 23.43778, -90 23.43778),
          (-90 23.43778, -90 -23.43778),
          CIRCULARSTRING(-90 -23.43778, -45 -23.43778, 0 -23.43778)
        )
      )
    ',4326);
    SELECT @g;
    GO
•
•


DECLARE @g GEOGRAPHY
SET @g = GEOGRAPHY::STGeomFromText('
  GEOMETRYCOLLECTION(
    COMPOUNDCURVE(
       CIRCULARSTRING(0 23.43778, -45 23.43778, -90 23.43778),
       (-90 23.43778, -90 -23.43778)
    ),
    COMPOUNDCURVE(
       CIRCULARSTRING(-90 -23.43778, -45 -23.43778, 0 -23.43778),
       (0 -23.43778, 0 23.43778)
    )
  )
',4326);
SELECT @g;
GO
•


USE Sample_USA;
GO

--Union Aggregates - Geography
SELECT Geography::UnionAggregate(geog) FROM Counties
 WHERE NAME_1 = 'Washington';
GO

--Union Aggregates - Geometry
SELECT Geometry::UnionAggregate(geom) FROM Counties
 WHERE NAME_1 = 'Washington';
GO
•

USE Sample_USA;
GO

--Envelope Aggregate - Geography
SELECT Geography::EnvelopeAggregate(geog) FROM Counties
 WHERE NAME_1 = 'Washington'
UNION ALL
SELECT geog from Counties
 WHERE NAME_1 = 'Washington'
GO

--Envelope Aggregate - Geometry (why are the county spatial objects "rotated")
SELECT Geometry::EnvelopeAggregate(geom) FROM Counties
 WHERE NAME_1 = 'Washington'
UNION ALL
SELECT geom from Counties
 WHERE NAME_1 = 'Washington'
GO
•
USE Sample_USA;
GO

--Collection Aggregate
SELECT Geography::CollectionAggregate(geog) FROM Counties
 WHERE NAME_1 = 'Washington';
GO

--Is it really a single object - if so, how many parts does it have?
DECLARE @a GEOGRAPHY = (SELECT Geography::CollectionAggregate(geog)
FROM Counties
 WHERE NAME_1 = 'Washington');
SELECT @a.STNumGeometries();
GO
--Results: 39
--Coincidentally, this is exactly the same number of counties in the State of
Washington ;-)
SELECT COUNT(*) FROM Counties
 WHERE NAME_1 = 'Washington';
GO
•

    USE Sample_USA;
    GO

    --Convex Hull - Geography
    SELECT Geography::ConvexHullAggregate(geog) FROM Counties
     WHERE NAME_1 = 'Washington'
    UNION ALL
    SELECT geog from Counties
     WHERE NAME_1 = 'Washington„
    GO

    --Convex Hull - Geometry
    SELECT Geometry::ConvexHullAggregate(geom) FROM Counties
     WHERE NAME_1 = 'Washington'
    UNION ALL
    SELECT geom from Counties
     WHERE NAME_1 = 'Washington„
    GO
•




DECLARE @p geography = 'Polygon((2 2, 4 4, 4 2, 2 4, 2 2))'
SELECT @p.IsValidDetailed();
GO
--Results: 24409: Not valid because some portion of polygon ring (1)
--     lies in the interior of a polygon.
•
--Invalid LineStrings - new behavior
DECLARE @line geometry = 'LineString(1 1, 2.1 1, 2.0 1, 4 1)'
SELECT @line.STIsValid();
GO
--Results: 0 (invalid)

DECLARE @line geometry = 'LineString(1 1, 2.1 1, 2.0 1, 4 1)'
SELECT @line.IsValidDetailed();
GO
--Results: 24413: Not valid because of two overlapping edges in curve (1).
•

--You can still perform metric operations
DECLARE @line geometry = 'LineString(1 1, 2.1 1, 2.0 1, 4 1)'
SELECT @line.STLength();
GO
--Results: 3.2

--You cannot perform other operations, however
DECLARE @line geometry = 'LineString(1 1, 2.1 1, 2.0 1, 4 1)'
SELECT @line.STBuffer(.5);
GO
--Results: 24144: This operation cannot be completed because the instance is not
valid.
•



USE World;
GO

DECLARE @g GEOGRAPHY
SET @g = GEOGRAPHY::STGeomFromText('
  CURVEPOLYGON(
    CIRCULARSTRING(0 50, 90 50, 180 50, 270 50, 0 50)
  )
',4326);
SELECT @g
UNION ALL
SELECT geography from World.dbo.Countries
GO
•



USE World;
GO

DECLARE @g GEOGRAPHY
SET @g = GEOGRAPHY::STGeomFromText('
  CURVEPOLYGON(
    CIRCULARSTRING(0 50, 90 50, 180 50, 270 50, 0 50)
  )
',4326);
SELECT @g.ReorientObject()
UNION ALL
SELECT geography from World.dbo.Countries
GO
•
--Buffer
DECLARE @g GEOGRAPHY =
GEOGRAPHY::STGeomFromText('CIRCULARSTRING(0 50, 45 50, 90 50)',4326)
DECLARE @b GEOGRAPHY = @g.STBuffer(500000)
SELECT @b --.STNumPoints()
UNION ALL
SELECT geography from World.dbo.Countries
GO
--Number of vertices: 257

--BufferWithCurves
DECLARE @g GEOGRAPHY =
GEOGRAPHY::STGeomFromText('CIRCULARSTRING(0 50, 45 50, 90 50)',4326)
DECLARE @b GEOGRAPHY = @g.BufferWithCurves(500000)
SELECT @b --.STNumPoints()
UNION ALL
SELECT geography from World.dbo.Countries
GO
--Number of vertices: 11
•
    −
    −
    −
    −
    −
GEOGRAPHY              GEOMETRY          Denali CTP   Minimum DB
                                                      Compatibility
                                                      Level
OGC Methods
STArea()               STArea()                       100
STAsBinary()           STAsBinary()                   100
STAsText()             STAsText()                     100
                       STBoundary()                   100
STBuffer()             STBuffer()                     100
see EnvelopeCenter()   STCentroid()                   100
STContains()           STContains()      CTP1         100
STConvexHull()         STConvexHull()    CTP1         100
                       STCrosses()                    100
STCurveN()             STCurveN()        CTP1         110
STCurveToLine()        STCurveToLine()   CTP1         110
STDifference()         STDifference()                 100
STDimension()          STDimension()                  100
STDisjoint()           STDisjoint()                   100
GEOGRAPHY                 GEOMETRY            Denali CTP   Minimum DB
                                                           Compatibility
                                                           Level
OGC Methods, continued
see EnvelopeAggregate()   STEnvelope()                     100
STEquals()                STEquals()                       100
na                        STExteriorRing()                 100
STGeometryN()             STGeometryN()                    100
STGeometryType()          STGeometryType()                 100
na                        STInteriorRingN()                100
STIntersections()         STIntersections()                100
STIntersects()            STIntersects()                   100
STIsClosed()              STIsClosed()                     100
STIsEmpty()               STIsEmpty()                      100
na                        STIsRing()                       100
                          STIsSimple()                     100
STIsValid()               STIsValid()         CTP1         100
GEOGRAPHY                GEOMETRY              Denali CTP   Minimum DB
                                                            Compatibility Level
OGC Methods, continued
STNumGeometries()        STNumGeometries()                  100
na                       STNumInteriorRing()                100
STNumPoints()            STNumPoints()                      100
STOverlaps()             STOverlaps()          CTP1         100
STPointN()               STPointN()                         100
                         STPointOnSurface()                 100
                         STRelate()                         100
STSrid                   STSrid                             100
STStartPoint()           STStartPoint()                     100
STSymDifference()        STSymDifference()                  100
                         STTouches()                        100
STUnion()                STUnion()                          100
STWithin()               STWithin()            CTP1         100
na                       STX                                100
na                       STY                                100
GEOGRAPHY                    GEOMETRY                     Denali CTP   Minimum DB
                                                                       Compatibility Level
Extended Methods
ASTextZM()                   ASTextZM()                                100
BufferWithCurves()           BufferWithCurves()           CTP1         110
BufferWithTolerance()        BufferWithTolerance()                     100
CurveToLineWithTolerance()   CurveToLineWithTolerance()   CTP1         110
EnvelopeAngle()              na                                        100
EnvelopeCenter()             na                                        100
Filter()                     Filter()                                  100
HasM                         HasM                         CTP3         100
HasZ                         HasZ                         CTP3         100
InstanceOf()                 InstanceOf()                              100
IsNull()                     IsNull()                                  100
IsValidDetailed()            IsValidDetailed()            CTP3         100
Lat                          na                                        100
Long                         na                                        100
GEOGRAPHY                     GEOMETRY                    Denali CTP   Minimum DB
                                                                       Compatibility
                                                                       Level
Extended Methods, continued
MinDbCompatibilityLevel()     MinDbCompatibilityLevel()   CTP1         100
Reduce()                      Reduce()                                 100
ReorientObject()              na                          CTP1         100
NumRings()                    na                                       100
RingN()                       na                                       100
ShortestLineTo()              ShortestLineTo()            CTP1         100
ToString()                    ToString()                               100
Z                             Z                                        100
GEOGRAPHY              GEOMETRY               Denali CTP   Minimum DB
                                                           Compatibility Level
OGC Static Methods
STGeomCollFromText()   STGeomCollFromText()                100
STGeomFromText()       STGeomFromText()                    100
STLineFromText()       STLineFromText()                    100
STPointFromText()      STPointFromText()                   100
STPolyFromText()       STPolyFromText()                    100
STMLineFromText()      STMLineFromText()                   100
STMPointFromText()     STMPointFromText()                  100
STMPolyFromText()      STMPolyFromText()                   100
STGeomCollFromWKB()    STGeomCollFromWKB()                 100
STGeomFromWKB()        STGeomFromWKB()                     100
STLineFromWKB()        STLineFromWKB()                     100
STPointFromWKB()       STPointFromWKB()                    100
STPolyFromWKB()        STPolyFromWKB()                     100
STMLineFromWKB()       STMLineFromWKB()                    100
STMPointFromWKB()      STMPointFromWKB()                   100
STMPolyFromWKB()       STMPolyFromWKB()                    100
GEOGRAPHY                              GEOMETRY                Denali CTP   Minimum DB
                                                                            Compatibility
                                                                            Level
Extended Static Methods
GeomFromGML()                          GeomFromGML()                        100
Parse()                                Parse()                              100
Point()                                Point()                              100
Null()                                 Null()                               100
Aggregates (Extended Static Methods)
CollectionAggregate()                  CollectionAggregate()   CTP1         100

ConvexHullAggregate()                  ConvexHullAggregate()   CTP1         100

EnvelopeAggregate()                    EnvelopeAggregate()     CTP1         100

UnionAggregate()                       UnionAggregate()        CTP1         100
Covering the earth and the cloud the next generation of spatial in sql server and sql azure

Contenu connexe

Tendances

Ijcga1
Ijcga1Ijcga1
Ijcga1
ijcga
 
11.vibrational characteristics of visco elstic plate with varying thickness
11.vibrational characteristics of visco elstic plate with varying thickness11.vibrational characteristics of visco elstic plate with varying thickness
11.vibrational characteristics of visco elstic plate with varying thickness
Alexander Decker
 

Tendances (19)

Theories and Engineering Technics of 2D-to-3D Back-Projection Problem
Theories and Engineering Technics of 2D-to-3D Back-Projection ProblemTheories and Engineering Technics of 2D-to-3D Back-Projection Problem
Theories and Engineering Technics of 2D-to-3D Back-Projection Problem
 
Computer Graphics Unit 2
Computer Graphics Unit 2Computer Graphics Unit 2
Computer Graphics Unit 2
 
A Hough Transform Based On a Map-Reduce Algorithm
A Hough Transform Based On a Map-Reduce AlgorithmA Hough Transform Based On a Map-Reduce Algorithm
A Hough Transform Based On a Map-Reduce Algorithm
 
2020 preTEST3A
2020 preTEST3A2020 preTEST3A
2020 preTEST3A
 
The Turbidity (TB) Varies with Time And Space in The Reservoir Using GWR And ...
The Turbidity (TB) Varies with Time And Space in The Reservoir Using GWR And ...The Turbidity (TB) Varies with Time And Space in The Reservoir Using GWR And ...
The Turbidity (TB) Varies with Time And Space in The Reservoir Using GWR And ...
 
A Rapid Location Independent Full Tensor Gravity Algorithm
A Rapid Location Independent Full Tensor Gravity AlgorithmA Rapid Location Independent Full Tensor Gravity Algorithm
A Rapid Location Independent Full Tensor Gravity Algorithm
 
Cab travel time prediction using ensemble models
Cab travel time prediction using ensemble modelsCab travel time prediction using ensemble models
Cab travel time prediction using ensemble models
 
Highs and Lows: A Resel-based Approach to the Analysis of Data from Geophysic...
Highs and Lows: A Resel-based Approach to the Analysis of Data from Geophysic...Highs and Lows: A Resel-based Approach to the Analysis of Data from Geophysic...
Highs and Lows: A Resel-based Approach to the Analysis of Data from Geophysic...
 
Evolution of 3D Surface Parameters: A Comprehensive Survey
Evolution of 3D Surface Parameters: A Comprehensive SurveyEvolution of 3D Surface Parameters: A Comprehensive Survey
Evolution of 3D Surface Parameters: A Comprehensive Survey
 
Masters Thesis Defense Presentation
Masters Thesis Defense PresentationMasters Thesis Defense Presentation
Masters Thesis Defense Presentation
 
Ijcga1
Ijcga1Ijcga1
Ijcga1
 
Development of Methodology for Determining Earth Work Volume Using Combined S...
Development of Methodology for Determining Earth Work Volume Using Combined S...Development of Methodology for Determining Earth Work Volume Using Combined S...
Development of Methodology for Determining Earth Work Volume Using Combined S...
 
Spatial interpolation comparison
Spatial interpolation comparisonSpatial interpolation comparison
Spatial interpolation comparison
 
Performance features12102 doag_2014
Performance features12102 doag_2014Performance features12102 doag_2014
Performance features12102 doag_2014
 
SIFT/SURF can achieve scale, rotation and illumination invariant during image...
SIFT/SURF can achieve scale, rotation and illumination invariant during image...SIFT/SURF can achieve scale, rotation and illumination invariant during image...
SIFT/SURF can achieve scale, rotation and illumination invariant during image...
 
Edge Extraction with an Anisotropic Vector Field using Divergence Map
Edge Extraction with an Anisotropic Vector Field using Divergence MapEdge Extraction with an Anisotropic Vector Field using Divergence Map
Edge Extraction with an Anisotropic Vector Field using Divergence Map
 
Comparative study of results obtained by analysis of structures using ANSYS, ...
Comparative study of results obtained by analysis of structures using ANSYS, ...Comparative study of results obtained by analysis of structures using ANSYS, ...
Comparative study of results obtained by analysis of structures using ANSYS, ...
 
11.vibrational characteristics of visco elstic plate with varying thickness
11.vibrational characteristics of visco elstic plate with varying thickness11.vibrational characteristics of visco elstic plate with varying thickness
11.vibrational characteristics of visco elstic plate with varying thickness
 
2014-06-20 Multinomial Logistic Regression with Apache Spark
2014-06-20 Multinomial Logistic Regression with Apache Spark2014-06-20 Multinomial Logistic Regression with Apache Spark
2014-06-20 Multinomial Logistic Regression with Apache Spark
 

Similaire à Covering the earth and the cloud the next generation of spatial in sql server and sql azure

Stockage, manipulation et analyse de données matricielles avec PostGIS Raster
Stockage, manipulation et analyse de données matricielles avec PostGIS RasterStockage, manipulation et analyse de données matricielles avec PostGIS Raster
Stockage, manipulation et analyse de données matricielles avec PostGIS Raster
ACSG Section Montréal
 
Representing and Querying Geospatial Information in the Semantic Web
Representing and Querying Geospatial Information in the Semantic WebRepresenting and Querying Geospatial Information in the Semantic Web
Representing and Querying Geospatial Information in the Semantic Web
Kostis Kyzirakos
 
Building Scalable Semantic Geospatial RDF Stores
Building Scalable Semantic Geospatial RDF StoresBuilding Scalable Semantic Geospatial RDF Stores
Building Scalable Semantic Geospatial RDF Stores
Kostis Kyzirakos
 

Similaire à Covering the earth and the cloud the next generation of spatial in sql server and sql azure (20)

Opensource gis development - part 2
Opensource gis development - part 2Opensource gis development - part 2
Opensource gis development - part 2
 
Geek Sync | Having Fun with Spatial Data
Geek Sync | Having Fun with Spatial DataGeek Sync | Having Fun with Spatial Data
Geek Sync | Having Fun with Spatial Data
 
The state of geo in ElasticSearch
The state of geo in ElasticSearchThe state of geo in ElasticSearch
The state of geo in ElasticSearch
 
Stockage, manipulation et analyse de données matricielles avec PostGIS Raster
Stockage, manipulation et analyse de données matricielles avec PostGIS RasterStockage, manipulation et analyse de données matricielles avec PostGIS Raster
Stockage, manipulation et analyse de données matricielles avec PostGIS Raster
 
Cloud conf-varna-2014-mihail mateev-spatial-data-and-microsoft-azure-sql-data...
Cloud conf-varna-2014-mihail mateev-spatial-data-and-microsoft-azure-sql-data...Cloud conf-varna-2014-mihail mateev-spatial-data-and-microsoft-azure-sql-data...
Cloud conf-varna-2014-mihail mateev-spatial-data-and-microsoft-azure-sql-data...
 
2017 RM-URISA Track: Spatial SQL - The Best Kept Secret in the Geospatial World
2017 RM-URISA Track:  Spatial SQL - The Best Kept Secret in the Geospatial World2017 RM-URISA Track:  Spatial SQL - The Best Kept Secret in the Geospatial World
2017 RM-URISA Track: Spatial SQL - The Best Kept Secret in the Geospatial World
 
Representing and Querying Geospatial Information in the Semantic Web
Representing and Querying Geospatial Information in the Semantic WebRepresenting and Querying Geospatial Information in the Semantic Web
Representing and Querying Geospatial Information in the Semantic Web
 
MUMS: Transition & SPUQ Workshop - Gradient-Free Construction of Active Subsp...
MUMS: Transition & SPUQ Workshop - Gradient-Free Construction of Active Subsp...MUMS: Transition & SPUQ Workshop - Gradient-Free Construction of Active Subsp...
MUMS: Transition & SPUQ Workshop - Gradient-Free Construction of Active Subsp...
 
Building Scalable Semantic Geospatial RDF Stores
Building Scalable Semantic Geospatial RDF StoresBuilding Scalable Semantic Geospatial RDF Stores
Building Scalable Semantic Geospatial RDF Stores
 
Computer Graphics Unit 1
Computer Graphics Unit 1Computer Graphics Unit 1
Computer Graphics Unit 1
 
Geoprocessing(Building Your Own Tool) and Geostatistical Analysis(An Introdu...
Geoprocessing(Building Your Own Tool)  and Geostatistical Analysis(An Introdu...Geoprocessing(Building Your Own Tool)  and Geostatistical Analysis(An Introdu...
Geoprocessing(Building Your Own Tool) and Geostatistical Analysis(An Introdu...
 
SQLPASS AD404-M Spatial Index MRys
SQLPASS AD404-M Spatial Index MRysSQLPASS AD404-M Spatial Index MRys
SQLPASS AD404-M Spatial Index MRys
 
Algorithmic Techniques for Parametric Model Recovery
Algorithmic Techniques for Parametric Model RecoveryAlgorithmic Techniques for Parametric Model Recovery
Algorithmic Techniques for Parametric Model Recovery
 
Mining interesting locations and travel sequences from gps trajectories
Mining interesting locations and travel sequences from gps trajectoriesMining interesting locations and travel sequences from gps trajectories
Mining interesting locations and travel sequences from gps trajectories
 
02 Geographic scripting in uDig - halfway between user and developer
02 Geographic scripting in uDig - halfway between user and developer02 Geographic scripting in uDig - halfway between user and developer
02 Geographic scripting in uDig - halfway between user and developer
 
Data Processing Using THEOS Satellite Imagery for Disaster Monitoring (Case S...
Data Processing Using THEOS Satellite Imagery for Disaster Monitoring (Case S...Data Processing Using THEOS Satellite Imagery for Disaster Monitoring (Case S...
Data Processing Using THEOS Satellite Imagery for Disaster Monitoring (Case S...
 
Day 6 - PostGIS
Day 6 - PostGISDay 6 - PostGIS
Day 6 - PostGIS
 
Opensource gis development - part 4
Opensource gis development - part 4Opensource gis development - part 4
Opensource gis development - part 4
 
SQL Geography Datatypes by Jared Nielsen and the FUZION Agency
SQL Geography Datatypes by Jared Nielsen and the FUZION AgencySQL Geography Datatypes by Jared Nielsen and the FUZION Agency
SQL Geography Datatypes by Jared Nielsen and the FUZION Agency
 
Sql Saturday Spatial Data Ss2008 Michael Stark Copy
Sql Saturday Spatial Data Ss2008 Michael Stark   CopySql Saturday Spatial Data Ss2008 Michael Stark   Copy
Sql Saturday Spatial Data Ss2008 Michael Stark Copy
 

Plus de Texas Natural Resources Information System

From creekology to rocket science the evolution of remote sensing gis in oilg...
From creekology to rocket science the evolution of remote sensing gis in oilg...From creekology to rocket science the evolution of remote sensing gis in oilg...
From creekology to rocket science the evolution of remote sensing gis in oilg...
Texas Natural Resources Information System
 

Plus de Texas Natural Resources Information System (20)

Txgio presentation rgsm_gps_pearson_062012
Txgio presentation rgsm_gps_pearson_062012Txgio presentation rgsm_gps_pearson_062012
Txgio presentation rgsm_gps_pearson_062012
 
Usslsc cgsic regional austin 061312
Usslsc cgsic regional austin 061312Usslsc cgsic regional austin 061312
Usslsc cgsic regional austin 061312
 
Using gps technology at the texas general land
Using gps technology at the texas general landUsing gps technology at the texas general land
Using gps technology at the texas general land
 
Ussls austin civil utility - klein - 061312 - final
Ussls austin   civil utility - klein - 061312 - finalUssls austin   civil utility - klein - 061312 - final
Ussls austin civil utility - klein - 061312 - final
 
Tx dot gps applications fuegner
Tx dot gps applications   fuegnerTx dot gps applications   fuegner
Tx dot gps applications fuegner
 
Tnris 2012
Tnris 2012Tnris 2012
Tnris 2012
 
Nmc ussls charter 2012
Nmc ussls charter 2012Nmc ussls charter 2012
Nmc ussls charter 2012
 
Nationwide dgps (ndgps) lt mendoza
Nationwide dgps (ndgps)   lt mendozaNationwide dgps (ndgps)   lt mendoza
Nationwide dgps (ndgps) lt mendoza
 
Lyle tamucc 2
Lyle tamucc 2Lyle tamucc 2
Lyle tamucc 2
 
Dirks cgsic brief 2012
Dirks cgsic brief 2012Dirks cgsic brief 2012
Dirks cgsic brief 2012
 
Connected vehicle highway network applications
Connected vehicle highway network applicationsConnected vehicle highway network applications
Connected vehicle highway network applications
 
Cgsic presentation humphreys
Cgsic presentation humphreysCgsic presentation humphreys
Cgsic presentation humphreys
 
Cgsic navcen
Cgsic navcenCgsic navcen
Cgsic navcen
 
Gnss international policy regional cgsic (austin - jun2012)
Gnss international policy   regional cgsic (austin - jun2012)Gnss international policy   regional cgsic (austin - jun2012)
Gnss international policy regional cgsic (austin - jun2012)
 
From creekology to rocket science the evolution of remote sensing gis in oilg...
From creekology to rocket science the evolution of remote sensing gis in oilg...From creekology to rocket science the evolution of remote sensing gis in oilg...
From creekology to rocket science the evolution of remote sensing gis in oilg...
 
Early warning forecast of an oil spill bp deepwater horizon in the gulf
Early warning forecast of an oil spill bp deepwater horizon in the gulfEarly warning forecast of an oil spill bp deepwater horizon in the gulf
Early warning forecast of an oil spill bp deepwater horizon in the gulf
 
We are the music makers and we are the dreamers of dreams
We are the music makers and we are the dreamers of dreamsWe are the music makers and we are the dreamers of dreams
We are the music makers and we are the dreamers of dreams
 
Volunteered geographic information (vgi) for the national map
Volunteered geographic information (vgi) for the national mapVolunteered geographic information (vgi) for the national map
Volunteered geographic information (vgi) for the national map
 
Uav image recognition technology and applications
Uav image recognition technology and applicationsUav image recognition technology and applications
Uav image recognition technology and applications
 
Texas high water marks crowd sourcing history, culture, and geography
Texas high water marks   crowd sourcing history, culture, and geographyTexas high water marks   crowd sourcing history, culture, and geography
Texas high water marks crowd sourcing history, culture, and geography
 

Dernier

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Dernier (20)

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 

Covering the earth and the cloud the next generation of spatial in sql server and sql azure

  • 1.
  • 3. SQL Server Spatial Summary OVERVIEW FEATURES • 2 Spatial Data Types (CLR UDT) • 2D Vector Data Support • Comprehensive set of Spatial Methods • Open Geospatial Consortium Simple • High Performance Spatial Indexes Features for SQL compatible • Spatial Industry Standards Support • Supported By Major GIS Vendors • Spatial Library ESRI, Intergraph, Autodesk, Pitney Bowes, Safe, etc. •Management Studio Integration • Standard feature in all SQL Server Editions • Cloud-enabled • Support for very large spatial objects (2GB) • Supported in SS Reporting Services • Redistributable Spatial Library DETAILS • Geography data type for geodetic data • Geometry data type for planar data • Standard spatial methods STIntersects, STBuffer, STLength, STArea, etc. • Standard spatial format support (WKT, WBK, GML) • Multiple spatial indexes per column • Multiple spatial columns per table • Create new CLR-based spatial functions with the Sink/Builder APIs • SQL Azure Spatial support • Support for circular (curve) spatial objects • Support for full globe geography objects • Optimized performance for the sphere Ed Katibah, SQL Server, July 1, 2008
  • 4. 2 Spatial Datatypes • Geography (Geodetic) • Geometry (Planar) Geography • Ellipsoidal coordinate support only (e.g. WGS 84) • Core set of geospatial methods • No OGC/ISO standards compliance (though many standards components are there) • Geospatial index • Designed as a simple, straight-forward geospatial implementation Geometry • Planar coordinate support only (georeferenced and non-georeferenced) • Complete set of spatial methods • OGC/ISO standards compliance (OGC SFS v1.1, ISO 19125) • Spatial index • Comprehensive spatial/geospatial offering supporting 2D planimetric applications
  • 5. POINT MULTIPOINT LINESTRING MULTILINESTRING CIRCULARSTRING COMPOUNDCURVE POLYGON MULTIPOLYGON GEOMETRYCOLLEC CURVEPOLYGON TION FULLGLOBE
  • 6. Spatial Data Type Support Spatial Methods • Retrieving Properties of Geometry Objects • Constructing Geometry Objects • Returning WKT, WKB and GML • Querying Validity, Instance Type, and Geometry Collection Information • Determining the Relationship between Two Geometries • Creating New Geometries Spatial Indexes • 4 Spatial indexes, two for geometry and two for geography
  • 8.
  • 9.
  • 10.
  • 11. • Redmond to Belgrade • Does it go through France?
  • 12. Shortest path is a Great Circle…
  • 13. What is the distance from Anchorage to Tokyo?
  • 15. Geometry Data Type Geography Data Type STIntersects()=1 STIntersects()=1 STOverlaps()=1 STOverlaps()=1* STEquals() = 1 STEquals() = 1 STTouches() = 1 STWithin() = 1 STWithin() = 1* STContains() = 1 STContains() = 1* STDistance() < value** STDistance() < value** STDistance() <= value** STDistance() <= value** Filter() = 1 Filter() = 1 *New to SQL Server Code-Named “Denali” CTP3 **STDistance() also participates in the new “Denali” Nearest Neighbor (NN) query plan
  • 17. − − • − − • • − − •
  • 18. Auto Grid Spatial Index Index Construction CREATE SPATIAL INDEX idxGeog CREATE SPATIAL INDEX idxGeom ON table(geography column) ON table(geometry column) USING GEOGRAPHY_AUTO_GRID; USING GEOMETRY_AUTO_GRID; or or CREATE SPATIAL INDEX idxGeog CREATE SPATIAL INDEX idxGeom ON table(geography column) ON table(geometry column) USING GEOGRAPHY_AUTO_GRID USING GEOMETRY_AUTO_GRID WITH (CELLS_PER_OBJECT = 32); WITH (CELLS_PER_OBJECT = 32); Geography Type: Geometry Type: Default Cells per Object: 12 Default Cells per Object: 8
  • 19. New Spatial Index Hint SPATIAL_WINDOW_MAX_CELLS Fine tuning at runtime for spatial indexes SELECT * FROM table t WITH (SPATIAL_WINDOW_MAX_CELLS=32) WHERE t.geom.STIntersects(@window)=1; The default value is 512 for geometry and 768 for geography. In SQL Server 2008, this value was hardcoded at 1024.
  • 21. Optimal value (theoretical) is somewhere between two extremes Default values: Time needed to 512 - Geometry AUTO grid process false positives 768 - Geography AUTO grid 1024 - MANUAL grids
  • 22. Spatial Index Compression CREATE SPATIAL INDEX idxGeog ON table(geography column) USING GEOGRAPHY_GRID WITH ( DATA_COMPRESSION = <page | row> ); On the basis of internal tests, with compression: • 40%-50% smaller than uncompressed counterparts • 5%-10% performance overhead for small indexes • For large indexes, performance improvements are observed
  • 25.    • • •
  • 26. LINESTRING (0 50, 90 50, 180 50, 270 50, 0 50) Linestring segments in the geography type define the minimum distance path on the underlying ellipsoid. CIRCULARSTRING (0 50, 90 50, 180 50, 270 50, 0 50) Circularstring segments in the geography type define a circular path. A good example is a latitude parallel.
  • 27. Circular Arcs Geography Type Considerations CIRCULARSTRING (0 50, 90 50, 180 50, 270 50, 0 50) If a circular linestring is closed, a curve polygon can be created CURVEPOLYGON (CIRCULARSTRING (0 50, 90 50, 180 50, 270 50, 0 50)) Coordinate pair order is important for the geography type. This set of coordinates is ordered according to the “left foot rule” for exterior rings.
  • 28. New Methods for Circular Arcs BufferWithCurves() This method will construct the resulting polygon with circular arcs, often resulting in a dramatically smaller spatial object. DECLARE @g GEOGRAPHY = GEOGRAPHY::STGeomFromText('CIRCULARSTRING(0 50, 45 50, 90 50)',4326) DECLARE @b GEOGRAPHY = @g.BufferWithCurves(500000) SELECT @b.STNumPoints() --Number of vertices: 11 DECLARE @g GEOGRAPHY = GEOGRAPHY::STGeomFromText('CIRCULARSTRING(0 50, 45 50, 90 50)',4326) DECLARE @b GEOGRAPHY = @g.STBuffer(500000) SELECT @b.STNumPoints() --Number of vertices: 257
  • 29. New Methods for Circular Arcs continued… • STNumCurves() Returns the number of curves in an object • STCurveN() Used for iteration through the list of the edges • STCurveToLine() Convert curve components to a linestring • CurveToLineWithTolerance() Same as above but with user specific tolerance
  • 30. Existing Methods And Circular Arcs All existing method work on circular arcs STIntersects() example
  • 31. New and Updated Methods and Aggregates for all Types ShortestLineTo(); returns a linestring which represents the shortest distance between 2 objects HasZ, HasM [boolean] returns 0 or 1 if object has Z or M-value components
  • 32. New and Updated Methods and Aggregates for all Types UnionAggregate() EnvelopeAggregate() CollectionAggregate() ConvexHullAggregate()
  • 33. The following aggregate examples will use this core data SELECT geog FROM Counties WHERE name_1 = 'Washington„ --Results: 39 rows, 1 for each county in the State of Washington All aggregates are static methods which work for either the Geography or the Geometry data types. For instance, consider the geography aggregate: Geography::UnionAggregate(geog) and its counterpart for geometry: Geometry::UnionAggregate(geom)
  • 34. Definition: Combines multiple spatial objects into a single spatial object, removing interior boundaries, where applicable. SELECT Geography::UnionAggregate(geog) FROM Counties WHERE name_1 = 'Washington';
  • 35. Definition: Returns a bounding circular object as a CurvePolygon which encloses one or more spatial objects. SELECT Geography::EnvelopeAggregate(geog).STCurveToLine() FROM Counties WHERE name_1 = 'Washington'; Notes: STCurveToLine() method employed to assist in circular object rendering with visualization programs which do not support curve objects.
  • 36. Definition: Returns a 5 point polygon (rectangle) which encloses one or more spatial objects. SELECT Geometry::EnvelopeAggregate(geom) FROM Counties WHERE name_1 = 'Washington'; Notes: County input objects are in a US-wide Albers projection which accounts for the apparent data rotation.
  • 37. Definition: Returns a geometry collection with one geometry part for each sp object(s) in the selection set. SELECT Geography::CollectionAggregate(geog) FROM Counties WHERE name_1 = 'Washington'; Notes: Unlike the UnionAggregate, adjoining interior boundaries are not removed for polygons
  • 38. Definition: Returns a convex hull polygon which encloses one or more spatial objects. SELECT Geography::ConvexHullAggregate(geog) FROM Counties WHERE name_1 = 'Washington';
  • 41. • STLength() Now works on both valid and invalid linestrings; STLength now works on invalid linestrings. Typically a linestring is invalid due to overlapping segment caused by anomalies such as inaccurate GPS measurements. • MinDbCompatibilityLevel() Method used for backward compatibility; indicates if spatial objects can be recognized by SQL Server 2008 and SQL Server 2008 R2. • IsValidDetailed() Provides commentary on what is wrong with invalid objects
  • 42. 24400: Valid  24401: Not valid, reason unknown.  24402: Not valid because point ({0}) is an isolated point, which is not valid in this type of object.  24403: Not valid because some pair of polygon edges overlap.  24404: Not valid because polygon ring ({0}) intersects itself or some other ring.  24405: Not valid because some polygon ring intersects itself or some other ring.  24406: Not valid because curve ({0}) degenerates to a point.  24407: Not valid because polygon ring ({0}) collapses to a line at point ({1}).  24408: Not valid because polygon ring ({0}) is not closed.  24409: Not valid because some portion of polygon ring ({0}) lies in the interior of a polygon.  24410: Not valid because ring ({0}) is the first ring in a polygon of which it is not the exterior ring.  24411: Not valid because ring ({0}) lies outside the exterior ring ({1}) of its polygon.  24412: Not valid because the interior of a polygon with rings ({0}) and ({1}) is not connected.  24413: Not valid because of two overlapping edges in curve ({0}).  24414: Not valid because an edge of curve ({0}) overlaps an edge of curve ({1}).  24415: Not valid some polygon has an invalid ring structure.  24416: Not valid because in curve ({0}) the edge that starts at point ({1}) is either a line or a degenerate arc with antipodal endpoints.
  • 43. declare @p geography = 'Polygon((2 2, 4 4, 4 2, 2 4, 2 2))' select @p.IsValidDetailed() --Results: 24409: Not valid because some portion of polygon ring (1) -- lies in the interior of a polygon.
  • 44. All constructions and relations are now done with 48 bits of precision in Denali, compared to 27 bits used in SQL Server 2008 and 2008 R2. For example, consider the following coordinate which was processed using the STUnion() method in SQL Server 2008 -82.339026 29.661245 -82.339025999885052 29.662144999951124 In Denali, the greater numerical precision typically maintains the precision of the original coordinates. Here is the result of the same STUnion() method in Denali, as above -82.339026 29.661245 82.339026 29.661245
  • 47. Full Globe Geography Type Enhancement CURVEPOLYGON (CIRCULARSTRING (0 50, 90 50, 180 50, 270 50, 0 50)) Coordinate pair order is important for the geography type. This set of coordinates is ordered according to the “left foot rule” for exterior rings. What happens if the coordinates defining the exterior ring are reversed?
  • 48. Full Globe Geography Type Enhancement CURVEPOLYGON (CIRCULARSTRING (0 50, 90 50, 180 50, 270 50, 0 50)) If we reverse the order of the coordinate pairs, using the “right foot rule” for interior rings, this curve polygon now represents “the rest of the globe”. CURVEPOLYGON (CIRCULARSTRING (0 50, 270 50, 180 50, 90 50, 0 50))
  • 49. • • − − • •
  • 50. − − − −
  • 51. • • − − − −
  • 52. SELECT GEOGRAPHY::STGeomFromText('FULLGLOBE', 4326) -- WGS84 SELECT GEOGRAPHY::STGeomFromText('FULLGLOBE', 4326).STArea() -- WGS84 --Results: 510065621710996 SELECT GEOGRAPHY::STGeomFromText('FULLGLOBE', 4322).STArea() -- WGS72 --Results: 510065312469083 DECLARE @wgs84_area FLOAT = (SELECT GEOGRAPHY::STGeomFromText('FULLGLOBE', 4326).STArea()) -- WGS84 DECLARE @wgs72_area FLOAT = (SELECT GEOGRAPHY::STGeomFromText('FULLGLOBE', 4322).STArea()) -- WGS72 SELECT @wgs84_area - @wgs72_area AS [DIFFERENCE] --Results: 309241913.4375
  • 53.
  • 54.
  • 55.
  • 56. On March 20, 2010, the trimaran, Groupama 3, became the fastest boat to circumnavigate the Earth non-stop, ever (including power boats)… in 48 days, 7 hours and 44 minutes… …and of course, it‟s GPS-equipped…
  • 57.
  • 58.
  • 59.
  • 60.
  • 61. DECLARE @t GEOGRAPHY = (SELECT Track FROM Groupama_Track7) SELECT TOP 16 CNTRY_NAME, SOVEREIGN, POP_CNTRY, @t.STDistance(Geography) AS [DISTANCE FROM TRACK] FROM Countries ORDER BY @t.STDistance(Geography) CNTRY_NAME SOVEREIGN POP_CNTRY DISTANCE FROM TRACK France France 57757060 0 New Zealand New Zealand 3528197 7115.41609170632 Chile Chile 13772710 15409.5690252515 Spain Spain 39267780 37144.5519830663 Portugal Portugal 9625516 57621.7065806319 Argentina Argentina 33796870 106198.966899358 United Kingdom United Kingdom 56420180 158636.063519451 Cape Verde Cape Verde 413573 165226.105053976 Guernsey United Kingdom 62920 177654.285742873 Jersey United Kingdom 87848 189169.527892158 Brazil Brazil 151525400 205920.063533954 Falkland Is. United Kingdom 2136 237487.364201179 Fr. So. & Ant. Lands France -99999 397707.475465133 Ireland Ireland 5015975 416683.669375291 Australia Australia 17827520 418237.701906367 South Africa South Africa 40634126 430605.825881581
  • 62. New Geography Methods ReorientObject() • This method will reverse the order of coordinates which define polygon rings. • This method is a no-op on line strings, circular arcs and points. • This method does not work with the geometry type.
  • 64. • • *Average time for NN query is ~236ms
  • 65. SELECT TOP(5) * FROM Restaurants r WHERE r.type = ‘Italian’ AND r.position.STDistance(@me) IS NOT NULL ORDER BY r.position.STDistance(@me) It can also be expressed with limited maximum distance SELECT TOP(5) * FROM Restaurants r WHERE r.type = ‘Italian’ AND r.position.STDistance(@me) < @max_range ORDER BY r.position.STDistance(@me)
  • 66. − − − − − • − −
  • 68. Two new helper methods are available: • sp_help_spatial_geography_histogram • sp_help_spatial_geometry_histogram They can be used for investigating spatial index efficiency or analyzing spatial data in general. The histograms could be also shown on a SSMS map. The data can be used for external visualization:
  • 69. CREATE TABLE location ( id int primary key, x float(max), y float(max), range float(max), geom as geometry::Point(x, y, 0) .STBuffer(range) PERSISTED ); •
  • 70. Client Side Library Changes New sink interfaces are available IGeometrySink110 and IGeographySink110. They should be used in the future. They must be used for objects incompatible with SQL Server 2008: • Objects bigger than a logical hemisphere • Objects with circular arcs • Invalid geography However, the old sinks will continue to work for SQL Server 2008 compatible objects. Geometry and Geography builders (SqlGeometryBuilder and SqlGeographyBuilder) now support circular arc constructions. New method “Deserialize” is added on the client library to both types.
  • 71. − − • − − − − − − −
  • 72. SQL Server 2008 Spatial Data http://www.microsoft.com/sqlserver/2008/en/us/spatial-data.aspx • http://sqlspatialtools.codeplex.com • http://dataconnector.codeplex.com/ • http://blogs.msdn.com/b/isaac/ • http://blogs.msdn.com/edkatibah/ • http://www.sqlskills.com/BLOGS/BOBB/ • http://social.technet.microsoft.com/wiki/contents/articles/4136.aspx • http://social.technet.microsoft.com/wiki/contents/articles/new-spatial-features-in-the-sql-azure-q2- 2011-service-release.aspx
  • 73. http://social.msdn.microsoft.com/Forums/en-US/sqlspatial/threads • http://msdn.microsoft.com/en- us/library/ee320529.aspx • http://msdn.microsoft.com/en- us/library/ee642046(v=SQL.105).aspx • http://downloads.solidq.com/insidetsql/ • http://www.apress.com/book/view/1430218290
  • 74. • USE Sample_USA GO --Update database compatibility ALTER DATABASE Sample_USA SET COMPATIBILITY_LEVEL = 110; GO
  • 75. USE World; GO --Update database compatibility ALTER DATABASE World SET COMPATIBILITY_LEVEL = 110; GO
  • 76. − − − − − − −
  • 77.
  • 78.
  • 79.
  • 80.
  • 81.
  • 82. • DECLARE @g GEOGRAPHY; SET @g = GEOGRAPHY::STGeomFromText(' CIRCULARSTRING(0 -23.43778, 0 0, 0 23.43778) ',4326); SELECT @g; GO
  • 83. • DECLARE @g GEOGRAPHY; SET @g = GEOGRAPHY::STGeomFromText(' COMPOUNDCURVE( CIRCULARSTRING(0 -23.43778, 0 0, 0 23.43778), CIRCULARSTRING(0 23.43778, -45 23.43778, -90 23.43778), CIRCULARSTRING(-90 23.43778, -90 0, -90 -23.43778), CIRCULARSTRING(-90 -23.43778, -45 -23.43778, 0 -23.43778)) ',4326); SELECT @g; GO
  • 84. • DECLARE @g GEOGRAPHY; SET @g = GEOGRAPHY::STGeomFromText(' COMPOUNDCURVE( (0 -23.43778, 0 23.43778), CIRCULARSTRING(0 23.43778, -45 23.43778, -90 23.43778), (-90 23.43778, -90 -23.43778), CIRCULARSTRING(-90 -23.43778, -45 -23.43778, 0 -23.43778)) ',4326); SELECT @g; GO
  • 85. • DECLARE @a GEOGRAPHY = 'LineSTring(-118 34, -119 35)' DECLARE @b GEOGRAPHY = 'Polygon((-120 22, -119 22, -119 23, -120 23, -120 22))' SELECT @a.ShortestLineTo(@b) UNION ALL SELECT @a UNION ALL SELECT @b GO
  • 86. DECLARE @g GEOGRAPHY; SET @g = GEOGRAPHY::STGeomFromText(' CURVEPOLYGON( COMPOUNDCURVE( (0 -23.43778, 0 23.43778), CIRCULARSTRING(0 23.43778, -45 23.43778, -90 23.43778), (-90 23.43778, -90 -23.43778), CIRCULARSTRING(-90 -23.43778, -45 -23.43778, 0 -23.43778) ) ) ',4326); SELECT @g; GO
  • 87. • • DECLARE @g GEOGRAPHY SET @g = GEOGRAPHY::STGeomFromText(' GEOMETRYCOLLECTION( COMPOUNDCURVE( CIRCULARSTRING(0 23.43778, -45 23.43778, -90 23.43778), (-90 23.43778, -90 -23.43778) ), COMPOUNDCURVE( CIRCULARSTRING(-90 -23.43778, -45 -23.43778, 0 -23.43778), (0 -23.43778, 0 23.43778) ) ) ',4326); SELECT @g; GO
  • 88. • USE Sample_USA; GO --Union Aggregates - Geography SELECT Geography::UnionAggregate(geog) FROM Counties WHERE NAME_1 = 'Washington'; GO --Union Aggregates - Geometry SELECT Geometry::UnionAggregate(geom) FROM Counties WHERE NAME_1 = 'Washington'; GO
  • 89. • USE Sample_USA; GO --Envelope Aggregate - Geography SELECT Geography::EnvelopeAggregate(geog) FROM Counties WHERE NAME_1 = 'Washington' UNION ALL SELECT geog from Counties WHERE NAME_1 = 'Washington' GO --Envelope Aggregate - Geometry (why are the county spatial objects "rotated") SELECT Geometry::EnvelopeAggregate(geom) FROM Counties WHERE NAME_1 = 'Washington' UNION ALL SELECT geom from Counties WHERE NAME_1 = 'Washington' GO
  • 90. • USE Sample_USA; GO --Collection Aggregate SELECT Geography::CollectionAggregate(geog) FROM Counties WHERE NAME_1 = 'Washington'; GO --Is it really a single object - if so, how many parts does it have? DECLARE @a GEOGRAPHY = (SELECT Geography::CollectionAggregate(geog) FROM Counties WHERE NAME_1 = 'Washington'); SELECT @a.STNumGeometries(); GO --Results: 39 --Coincidentally, this is exactly the same number of counties in the State of Washington ;-) SELECT COUNT(*) FROM Counties WHERE NAME_1 = 'Washington'; GO
  • 91. USE Sample_USA; GO --Convex Hull - Geography SELECT Geography::ConvexHullAggregate(geog) FROM Counties WHERE NAME_1 = 'Washington' UNION ALL SELECT geog from Counties WHERE NAME_1 = 'Washington„ GO --Convex Hull - Geometry SELECT Geometry::ConvexHullAggregate(geom) FROM Counties WHERE NAME_1 = 'Washington' UNION ALL SELECT geom from Counties WHERE NAME_1 = 'Washington„ GO
  • 92. • DECLARE @p geography = 'Polygon((2 2, 4 4, 4 2, 2 4, 2 2))' SELECT @p.IsValidDetailed(); GO --Results: 24409: Not valid because some portion of polygon ring (1) -- lies in the interior of a polygon.
  • 93. • --Invalid LineStrings - new behavior DECLARE @line geometry = 'LineString(1 1, 2.1 1, 2.0 1, 4 1)' SELECT @line.STIsValid(); GO --Results: 0 (invalid) DECLARE @line geometry = 'LineString(1 1, 2.1 1, 2.0 1, 4 1)' SELECT @line.IsValidDetailed(); GO --Results: 24413: Not valid because of two overlapping edges in curve (1).
  • 94. • --You can still perform metric operations DECLARE @line geometry = 'LineString(1 1, 2.1 1, 2.0 1, 4 1)' SELECT @line.STLength(); GO --Results: 3.2 --You cannot perform other operations, however DECLARE @line geometry = 'LineString(1 1, 2.1 1, 2.0 1, 4 1)' SELECT @line.STBuffer(.5); GO --Results: 24144: This operation cannot be completed because the instance is not valid.
  • 95. • USE World; GO DECLARE @g GEOGRAPHY SET @g = GEOGRAPHY::STGeomFromText(' CURVEPOLYGON( CIRCULARSTRING(0 50, 90 50, 180 50, 270 50, 0 50) ) ',4326); SELECT @g UNION ALL SELECT geography from World.dbo.Countries GO
  • 96. • USE World; GO DECLARE @g GEOGRAPHY SET @g = GEOGRAPHY::STGeomFromText(' CURVEPOLYGON( CIRCULARSTRING(0 50, 90 50, 180 50, 270 50, 0 50) ) ',4326); SELECT @g.ReorientObject() UNION ALL SELECT geography from World.dbo.Countries GO
  • 97. • --Buffer DECLARE @g GEOGRAPHY = GEOGRAPHY::STGeomFromText('CIRCULARSTRING(0 50, 45 50, 90 50)',4326) DECLARE @b GEOGRAPHY = @g.STBuffer(500000) SELECT @b --.STNumPoints() UNION ALL SELECT geography from World.dbo.Countries GO --Number of vertices: 257 --BufferWithCurves DECLARE @g GEOGRAPHY = GEOGRAPHY::STGeomFromText('CIRCULARSTRING(0 50, 45 50, 90 50)',4326) DECLARE @b GEOGRAPHY = @g.BufferWithCurves(500000) SELECT @b --.STNumPoints() UNION ALL SELECT geography from World.dbo.Countries GO --Number of vertices: 11
  • 98. − − − − −
  • 99. GEOGRAPHY GEOMETRY Denali CTP Minimum DB Compatibility Level OGC Methods STArea() STArea() 100 STAsBinary() STAsBinary() 100 STAsText() STAsText() 100 STBoundary() 100 STBuffer() STBuffer() 100 see EnvelopeCenter() STCentroid() 100 STContains() STContains() CTP1 100 STConvexHull() STConvexHull() CTP1 100 STCrosses() 100 STCurveN() STCurveN() CTP1 110 STCurveToLine() STCurveToLine() CTP1 110 STDifference() STDifference() 100 STDimension() STDimension() 100 STDisjoint() STDisjoint() 100
  • 100. GEOGRAPHY GEOMETRY Denali CTP Minimum DB Compatibility Level OGC Methods, continued see EnvelopeAggregate() STEnvelope() 100 STEquals() STEquals() 100 na STExteriorRing() 100 STGeometryN() STGeometryN() 100 STGeometryType() STGeometryType() 100 na STInteriorRingN() 100 STIntersections() STIntersections() 100 STIntersects() STIntersects() 100 STIsClosed() STIsClosed() 100 STIsEmpty() STIsEmpty() 100 na STIsRing() 100 STIsSimple() 100 STIsValid() STIsValid() CTP1 100
  • 101. GEOGRAPHY GEOMETRY Denali CTP Minimum DB Compatibility Level OGC Methods, continued STNumGeometries() STNumGeometries() 100 na STNumInteriorRing() 100 STNumPoints() STNumPoints() 100 STOverlaps() STOverlaps() CTP1 100 STPointN() STPointN() 100 STPointOnSurface() 100 STRelate() 100 STSrid STSrid 100 STStartPoint() STStartPoint() 100 STSymDifference() STSymDifference() 100 STTouches() 100 STUnion() STUnion() 100 STWithin() STWithin() CTP1 100 na STX 100 na STY 100
  • 102. GEOGRAPHY GEOMETRY Denali CTP Minimum DB Compatibility Level Extended Methods ASTextZM() ASTextZM() 100 BufferWithCurves() BufferWithCurves() CTP1 110 BufferWithTolerance() BufferWithTolerance() 100 CurveToLineWithTolerance() CurveToLineWithTolerance() CTP1 110 EnvelopeAngle() na 100 EnvelopeCenter() na 100 Filter() Filter() 100 HasM HasM CTP3 100 HasZ HasZ CTP3 100 InstanceOf() InstanceOf() 100 IsNull() IsNull() 100 IsValidDetailed() IsValidDetailed() CTP3 100 Lat na 100 Long na 100
  • 103. GEOGRAPHY GEOMETRY Denali CTP Minimum DB Compatibility Level Extended Methods, continued MinDbCompatibilityLevel() MinDbCompatibilityLevel() CTP1 100 Reduce() Reduce() 100 ReorientObject() na CTP1 100 NumRings() na 100 RingN() na 100 ShortestLineTo() ShortestLineTo() CTP1 100 ToString() ToString() 100 Z Z 100
  • 104. GEOGRAPHY GEOMETRY Denali CTP Minimum DB Compatibility Level OGC Static Methods STGeomCollFromText() STGeomCollFromText() 100 STGeomFromText() STGeomFromText() 100 STLineFromText() STLineFromText() 100 STPointFromText() STPointFromText() 100 STPolyFromText() STPolyFromText() 100 STMLineFromText() STMLineFromText() 100 STMPointFromText() STMPointFromText() 100 STMPolyFromText() STMPolyFromText() 100 STGeomCollFromWKB() STGeomCollFromWKB() 100 STGeomFromWKB() STGeomFromWKB() 100 STLineFromWKB() STLineFromWKB() 100 STPointFromWKB() STPointFromWKB() 100 STPolyFromWKB() STPolyFromWKB() 100 STMLineFromWKB() STMLineFromWKB() 100 STMPointFromWKB() STMPointFromWKB() 100 STMPolyFromWKB() STMPolyFromWKB() 100
  • 105. GEOGRAPHY GEOMETRY Denali CTP Minimum DB Compatibility Level Extended Static Methods GeomFromGML() GeomFromGML() 100 Parse() Parse() 100 Point() Point() 100 Null() Null() 100 Aggregates (Extended Static Methods) CollectionAggregate() CollectionAggregate() CTP1 100 ConvexHullAggregate() ConvexHullAggregate() CTP1 100 EnvelopeAggregate() EnvelopeAggregate() CTP1 100 UnionAggregate() UnionAggregate() CTP1 100