I have a database with various defined polygons which represent the outer boundarys of buildings on a map of a business park.
If I perform a Select within Management Studio, I get a result similar to the following:
LocationCode LocationPolygon
1 POLYGON((1 1, 2 1, 2 2, 1 2, 1 1))
2 POLYGON((10 10, 20 10, 20 20, 10 20, 10 10))
What I would like to get is the following:
LocationCode PointX PointY
1 1 1
1 2 1
1 2 2
1 1 2
2 10 10
etc etc etc
I cannot see anywhere where I can extract the points from the Polygon using SQL Server from within a SQL Query? I can evidentally take the whole polygon and then do the rest on the client, but I would rather deal in SQL if possible.
Any help appreciated in pointing me in the right direction.