Friday, March 15, 2013

Re: Is MySQL geospatial extension supported in Google Cloud SQL?

Does that work with a local MySQL 5.5? Then it should also work with Google Cloud SQL. Note that the SPATIAL INDEX is only available for MyISAM tables which are not transactional and not recommended for Google Cloud SQL.

Example:

mysql> create table Points (  name VARCHAR(20) PRIMARY KEY,  location Point NOT NULL,  description VARCHAR(200),  SPATIAL INDEX(location)  ) engine=myisam;
Query OK, 0 rows affected (0.32 sec)

mysql> INSERT INTO Points (name, location) VALUES ( 'point1' , GeomFromText( ' POINT(31.5 42.2) ' ) );
Query OK, 1 row affected (0.14 sec)

mysql> SELECT name, AsText(location) FROM Points WHERE X(location) > 10\G
*************************** 1. row ***************************
            name: point1
AsText(location): POINT(31.5 42.2)
1 row in set (0.08 sec)

mysql>


-- Razvan ME


On Fri, Mar 15, 2013 at 5:34 PM, Sumit Arora <sumit.arora1808@gmail.com> wrote:
Currently I'm using MySql 5.5 and I use to save GEOMETRY objects in database.

This is how my sql column look like:
<property name="regionMapGeometry" type="org.hibernatespatial.GeometryUserType">
            <column name="regionMapGeometry" 
                        sql-type="GEOMETRY"/> 
        </property>
Is sql-type="GEOMETRY" supported in Google Cloud SQL?

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment