There is the earthdistance package in the contrib directory. You may want to look into that. On Wednesday 08 March 2006 09:10, sunithab@xxxxxxxxxxxxxx wrote: > I have the lat and long data. I have created the geom column based on the > lat and long data as below. > > > UPDATE property SET geom =GeometryFromText('POINT(' || long || > ' ' || lat || ')',4326); > > Now I have the geom columns in two tables > > I am calculating the distance as below > > select distance(geom1, geom2)* 69.055 > > > It seems to be right. But I want to make sure. > > Thanks for help in advance. > > > > ---------------------------(end of broadcast)--------------------------- > TIP 9: In versions below 8.0, the planner will ignore your desire to > choose an index scan if your joining column's datatypes do not > match -- UC -- Open Source Solutions 4U, LLC 1618 Kelly St Phone: +1 707 568 3056 Santa Rosa, CA 95401 Cell: +1 650 302 2405 United States Fax: +1 707 568 6416