<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt">Im having a problem with a distance query after I transformed a set of points to another SRID. I transformed from easting northing (SRID 27700) to longitude lattitude (SRID 4326).  The problem that I am having is that when I do the same distance queries using both geom columns I get a completely different result? I know that the distance query using the first easting northing column is correct. Here is an example of the different returns I am getting:<br><br>SRID (27700):<br><br>SELECT a.stop_reference, b.stop_reference, distance(a.east_north, b.east_north) FROM bus_stops1 a, bus_stops1 b WHERE a.stop_reference = 6200206290 AND b.stop_reference = 6200244450;<br><br>stop_reference | stop_reference |    
 distance<br>----------------+----------------+------------------<br> 6200206290     | 6200244450     | 4320.88972319359<br><br>SRID (4326):<br><br>SELECT a.stop_reference, b.stop_reference, distance(a.googlemap, b.googlemap) FROM bus_stops1 a, bus_stops1 b WHERE a.stop_reference = 6200206290 AND b.stop_reference = 6200244450;<br><br>stop_reference | stop_reference |     distance<br>----------------+----------------+-------------------<br> 6200206290     | 6200244450     | 0.041147965100606<br><br>Here is the table I am selecting from:<br><br><br>            Table "s0679212.bus_stops1"<br>     Column     |         Type          |
 Modifiers<br>----------------+-----------------------+-----------<br> stop_reference | character varying(12) | not null<br> easting        | integer               | not null<br> northing       | integer               | not null<br> full_location  | character varying(50) |<br> gazetteer_code | character varying(1)  |<br> point_type     | character varying(1)  |<br> nat_gazetteer  | character varying(7)  |<br> district_name  | character varying(24) |<br> town_name      | character varying(24) |<br> east_north     | geometry              | not
 null<br> lat            | double precision      |<br> lon            | double precision      |<br> googlemap      | geometry              |<br>Indexes:<br>    "bus_stops1_pkey" PRIMARY KEY, btree (stop_reference)<br>    "stops_distance1" gist (east_north)<br>Check constraints:<br>    "enforce_dims_east_north" CHECK (ndims(east_north) = 2)<br>    "enforce_dims_googlemap" CHECK (ndims(googlemap) = 2)<br>    "enforce_geotype_east_north" CHECK (geometrytype(east_north) = 'POINT'::text OR east_north IS NULL)<br>    "enforce_geotype_googlemap" CHECK (geometrytype(googlemap) = 'POINT'::text OR googlemap IS
 NULL)<br>    "enforce_srid_east_north" CHECK (srid(east_north) = 27700)<br>    "enforce_srid_googlemap" CHECK (srid(googlemap) = 4326)<br><br>I created the googlemap column using these commands:<br><br>SELECT AddGeometryColumn( 'bus_stops1', 'googlemap', 4326, 'POINT', 2 );<br>UPDATE bus_stops1 SET googlemap = transform(setsrid(makepoint(easting, northing),27700), 4326);<br><br><br>Can anyone suggest what on earth could be wrong?<br><br><br><br><br><br></div><br>


      <hr size=1> 
Yahoo! Mail is the world's favourite email. Don't settle for less, <a
href="http://uk.rd.yahoo.com/evt=44106/*http://uk.docs.yahoo.com/mail/winter07.html">sign up for your free
account today</a>.</body></html>