SQL 2008 Spatial Samples, Part 3 of 9 – SQL Builder API

This post covers the SqlGeographyBuilder & SqlGeometryBuilder Classes & their methods. Overview of Methods to make your own Spatial Objects using the Builder API. SQL provides a Builder API that permit you to easily write your own Spatial Data Importing utilities. It is also handy manipulating your shapes in a way that is not supported…

5

SQL 2008 Spatial Sample, Part 4 of 9 – Methods for Drawing Spatial Shapes

This post covers the following methods: STDimension, STGeometryType, STNumGeometries, STGeometryN, STNumPoints, STPointN, STNumInteriorRing / NumRings, STInteriorRingN / RingN, STExteriorRing, STX / Long, STY / Lat, Z & M (measure). Note: Unless otherwise stated. All code samples are designed to be Cut n Pasted directly into SQL Server Management Studio (SSMS) & run.  Overview of Rendering…

4

SQL 2008 Spatial Samples, Part 5 of 9 – Performance Improvement Methods

This post covers the following methods: Reduce, STEnvelope, EnvelopeCenter, EnvelopeAngle, STConvexHull. Note: Unless otherwise stated. All code samples are designed to be Cut n Pasted directly into SQL Server Management Studio (SSMS) & run. Sometimes I’ve added extra detail than what is in the sample picture. Overview of Performance Improvement methods. If you collected all…

2

SQL 2008 Spatial Samples, Part 6 of 9 – Geometric “Set Theory” Methods

This post covers the following methods: STUnion, STIntersection, STDifference, STSymDifference, STCentroid / STEnvelopeCentre, STPointOnSurface, STBoundary. Overview of Geometric "Set Theory" Methods These Methods help to understand the relationship between spatial objects & also to create new objects that show that relationship. Note: The sample code in the post shows more complex shapes than the diagrams…

3

SQL 2008 Spatial Samples, Part 7 of 9 – STBuffer … Spatial starts here.

This post covers only 2 methods: STBuffer & BufferWithTolerance. They are so handy, they deserve a post all to themselves. Note: Unless otherwise stated. All code samples are designed to be Cut n Pasted directly into SQL Server Management Studio (SSMS) & run. Sometimes I’ve added extra detail than what is in the sample picture….

1

SQL 2008 Spatial Samples, Part 8 of 9 – Conditional Methods

This post covers the following methods: STDisjoint, STIntersects, Filter,  STTouches, STWithin, STContains,  STOverlaps, STCrosses,  STRelate, & STEquals One day these examples may find their way to Books Online. For now they can live here. Overview of Conditional Methods You will find that these Methods exceptionally handy to find or filter out similar spatial shapes. They…

12

Handy sample Connection Strings

Remembering the exact syntax of a connection string is a pain. The following are links to my favourite articles on making a connection string.  Connection Strings.Com  Another great site for developers is The Code Project: ADO Connection Strings & of course RTFM is also a great idea, don’t forget  SQL 2008 Books Online page OLE…

0

SQL 2008 Spatial Samples, Part 9 of 9 – Handy but Obvious Methods

This post covers the following methods: STArea, STLength, STDistance, STIsEmpty, STIsClosed, STIsSimple, STIsRing. Overview of Handy but obvious Methods The following methods are self evident. I’ve included here for the sake of completeness. You do need to be aware of them, They are great for calculating & displaying attributes associated with your maps. Method .STArea()…

5