Rakesh!

The distance_sphere and makebox2d functions are specific to postgis. MySQL GIS Implementation is based on the Open GIS Simple SQL Specification (read more on www.opengeospatial.com). The SetSRID is also not in the specification as far as I know (it should be, but I can't find it), but many GIS implementations does seem to implement it. Not so MySQL though, as MySQL currently only supports on SRID, the flat or euclidean geometry. Still, there are a few things missing in the current MySQL GIS implementation compared to the "Simple SQL" spec. Many of these (not including SRID support though) is available in special version that you can read about here: http://forge.mysql.com/wiki/GIS_Functions where you can also find download links.

Best regards
Anders Karlsson
[EMAIL PROTECTED] wrote:
Hi All

I looking for the stated functions. Earlier I was using postGIS in that
they are present i am wondering if I can get similar kind of method in
MySql.I am Using Mysql 5.0.51a version.
1. I am trying to retrieve the distance between two geometries in the
table using the following syntax:

    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 1305 (42000): FUNCTION .DISTANCE _SPHERE does not exist

2. I am trying to excute this query in mysql :
     select MakeBox2D(GeomFromText('POINT(135.0 34.0)',4326),
GeomFromText('POINT(135.5 34.5)',4326));

ERROR 1305 (42000): FUNCTION blog_gisdb.MakeBox2D does not exist
3. I am trying to excute this query in mysql :
 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 1305 (42000): FUNCTION blog_gisdb.SetSRID does not exist

How I find above functions in MYSQL and how i use mysql GIS Extension.
Thanking You in inticipation
Rakesh


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



--
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /  Anders Karlsson ([EMAIL PROTECTED])
 / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Sales Engineer
/_/  /_/\_, /___/\___\_\___/ Stockholm
       <___/   www.mysql.com Cellphone: +46 708 608121
                              Skype: drdatabase



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to