Adding SRID makes it an invalid geometry so the text will not be automatically cast to a geometry. Your point doesn't look like 3395 point anyway
SELECT name, distance_spheroid(location, 'POINT(-3.6620213 40.4475235)', 'SPHEROID["WGS 84",6378137,298.257223563]') as distance FROM ways Also note if your point was actually in 3395 projection you'll get very laughable results with distance_spheriod because distance_spheriod/shpe* always assumes degrees regardless of what the srid of your data says it is. Hope that helps, Regina -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ricardo Peironcely Sent: Thursday, June 05, 2008 7:13 AM To: [email protected] Subject: [postgis-users] attempt to deserialize a point which is really aInvalid type Hello all! I've a problem, when I try to calculate a distance: SELECT name, distance_spheroid(location, 'SRID=3395;POINT(-3.6620213 40.4475235)', 'SPHEROID["WGS 84",6378137,298.257223563]') as distance FROM ways receive an error : ERROR: lwpoint_deserialize: attempt to deserialize a point which is really a Invalid type Estado SQL:XX000 What is the problem? Google doesn't says anything about this error. -- Best regards. Ricardo Peironcely _______________________________________________ postgis-users mailing list [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users ----------------------------------------- The substance of this message, including any attachments, may be confidential, legally privileged and/or exempt from disclosure pursuant to Massachusetts law. It is intended solely for the addressee. If you received this in error, please contact the sender and delete the material from any computer. _______________________________________________ postgis-users mailing list [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users
