I have table (shapetable) with my coastline shape file loaded. I have another table (pointtable) with lat long points. Wondering how would i go about writing a sql query to find the distance between the lat long points and the shapefile. The shapetable has a geography type attribute, from my reading it appears that geometry type linestrings and geography are one and the same.
Appreciate the help
EDIT: Being relatively a newbie at this, I'm not using PostGIS. I am using sql server 2008. I imported the shape file using a shape2sql utility. The table has a bunch of shapefile attributes and also the geography data type. If i understand this correctly, the geography binary data is nothing but linestring of geometry data type(I'd verify this by running a stgeoemtrytype() on the column)
I have another table with a bunch of lat long. I want to implement a solution where by i want to get distance from the shapefile, using stdistance. One confusing part i found in going through a bunch of documents was that, given a geography data type, how could i find out the linestring coordinates.