Hello I want to use functions - SetSRID(),Makebox2D(),Distance_Sphere() of Post GIS in MySQL. Can please let me know the similar functions in MySQL.
Environment =========== Operating System : Red Hat Linux 3.4 Database : MySQL Version 5.0.51 PostgreSQL 8.2.6 with PostGIS 1.2.1 Functions which we are trying to use ==================================== a) To retreive the distance between two geometries (co-ordinates). Basically trying to find and use a function in MySQL similar to distance_sphere in PostGIS Query Used =========== SELECT X(s.geom),Y(s.geom),todofuken||shigun||kuchoson AS address, (distance_sphere(s.geom,GeomFromText('POINT(135 35)',4326))) AS distance FROM todofuken_tbl t,shikuchoson_tbl s. Error Occurred ============== ERROR 1305 (42000): FUNCTION .DISTANCE _SPHERE does not exist b) To find and use a function in MySQL similar to MakeBox2D function of PostGIS Query Used =========== select MakeBox2D(GeomFromText('POINT(135.0 34.0)',4326),GeomFromText('POINT(135.5 34.5)',4326)); Error Occurred ============== ERROR 1305 (42000): FUNCTION blog_gisdb.MakeBox2D does not exist c) To find and use a function in MySQL similar to MakeBox2D function of PostGIS Query Used =========== SELECT uri,X(geom),Y(geom),ROUND(dist,2) AS distance FROM ( SELECT uri,geom,distance(geom,GeomFromText('POINT(135.25 34.25)',4326)) AS dist FROM geom_tbl g,uri_tbl u WHERE g.id=u.id AND geom && SetSRID(MakeBox2D(GeomFromText('POINT(135.0 34.0)',4326),GeomFromText('POINT(135.5 34.5)',4326)),4326) ) AS d ORDER BY dist; Error Occurred ============== ERROR 1305 (42000): FUNCTION blog_gisdb.SetSRID does not exist Can somebody please let me know if similar functions exist and if they exist, please provide me the names of those functions. Regards Ahmad Please do not print this email unless it is absolutely necessary. Spread environmental awareness. The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]