This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
Gouache painting: in a railway yard, a long straight track runs left to right

geometry STCrosses: Crossing Depends on the Intersection Dimension

April 14, 2010
Pinal Dave
SQL Tips and Tricks
Spatial Database, SQL Function, SQL Scripts, SQL Server

geometry STCrosses uses the dimension and interior position of the intersection to define crossing. I compare it with endpoint contact and collinear overlap. A shared point or segment does not automatically satisfy that definition.

Read More
Unmarked wooden spokes radiate from a brass hub toward blue, terracotta and pale stones.

ATN2: Keep the Quadrant When Calculating an Angle

March 8, 2010
Pinal Dave
SQL Tips and Tricks
Spatial Database, SQL Function, SQL Scripts, SQL Server

ATN2 uses two components to calculate an angle while retaining its quadrant. I keep the argument order and angle unit visible. Dividing one component by the other would lose useful information and introduce a zero-denominator case.

Read More
Gouache painting: on a dyer's table, a slate-blue silk square partly overlaps a cream one, the shared corner showing a blended deeper tone while each square extends beyond it

geometry STOverlaps: Intersection Alone Is Not Enough

February 22, 2010
Pinal Dave
SQL Tips and Tricks
Spatial Database, SQL Function, SQL Scripts, SQL Server

geometry STOverlaps asks a narrower question than whether two shapes share any points. I test equal and contained regions alongside a partial overlap. Those intersecting cases do not all satisfy the method’s overlap definition.

Read More
Gouache painting: on a bright gym floor, one central blue mat has four neighbors

geometry STTouches: A Shared Boundary Is Not Interior Overlap

December 10, 2009
Pinal Dave
SQL Tips and Tricks
Spatial Database, SQL Function, SQL Scripts, SQL Server

geometry STTouches tests whether shapes meet without their interiors intersecting. I keep that predicate separate from a general intersection check. Sharing an edge and sharing an area are different spatial relationships.

Read More
Gouache painting: on a sewing table, a slate blue felt rectangle and a cream felt rectangle were overlapped by half and pinned

geometry STSymDifference: Keep the Parts Outside the Overlap

November 11, 2009
Pinal Dave
SQL Tips and Tricks
Spatial Database, SQL Function, SQL Scripts, SQL Server

geometry STSymDifference keeps points belonging to either input while excluding their shared portion. I use it when both sides’ exclusive regions matter. Directed subtraction would answer a different question about only one side.

Read More
Gouache painting: a thick ring of clay hangs level from a single cord, attached to a thin wire cross that spans the ring's open center

geometry STCentroid: The Geometric Center Is Not an Interior Promise

October 30, 2009
Pinal Dave
SQL Tips and Tricks
Spatial Database, SQL Function, SQL Scripts, SQL Server

geometry STCentroid returns a polygon’s geometric center, but that point is not a promise of interior placement. I keep the center calculation separate from an interior test. A holed region makes that distinction visible.

Read More
Gouache painting: on a greenhouse bench a rectangular pane of glass lies beside an empty wooden frame of the same outer size, its four rails joined with open air inside

geometry STBoundary: A Polygon Edge Is a Different Shape

July 21, 2009
Pinal Dave
SQL Tips and Tricks
Spatial Database, SQL Function, SQL Scripts, SQL Server

geometry STBoundary returns the edge of a shape as another geometry instance. I inspect that result independently from the source. A polygon’s boundary is not another filled polygon with the same area.

Read More
Previous 1 2 3 4 5 6 Next
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com