title: MSSQL Geometry, distance from point inside shape to closest edge
body: <p>I have a shape file that I have imported in to MSSQL as a table with a geometry column.  The geometry column is essentially the outline of the UK coastline.  What I have been asked to do is to be able to supply latitude/longitude and calculate the closest distance to the coast</p>
  
  <p>I have established that the problem I am having is that the point I want to find the distance from to the closest edge of the shape is within the shape and therefore always returns a distance of zero.  If I try a point outside the shape (at sea) I get a distance</p>
  
  <p>My question is, is there a way to get SQL to return the distance from with inside?  If not then is there a way to invert the shape?</p>