RE: Spatial Extension in MySQL 4.1.1-alpha
Hi Steve and Paul, Thanks - the comma did get me! Paul, no the mistake isn't in the manual - I managed it all on my own. For anyone following, the correct sequence was: mysql> CREATE TABLE geom ( g GEOMETRY ); Query OK, 0 rows affected (0.05 sec) mysql> INSERT INTO geom VALUES ( GeomFromText('POINT(1 1)') ); Query OK, 1 row affected (0.00 sec) mysql> SELECT AsText(g) FROM geom; ++ | AsText(g) | ++ | POINT(1 1) | ++ 1 row in set (0.00 sec) mysql> Thanks again, Matt -Original Message- From: Paul DuBois [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 5:48 PM To: Steven Roussey; [EMAIL PROTECTED] Cc: 'Matt Lynch' Subject: Re: Spatial Extension in MySQL 4.1.1-alpha At 16:03 -0800 12/16/03, Steven Roussey wrote: >You did an insert this way: > > mysql> insert into geom values(GeomFromText('POINT(1,1)')); > >and expected results this way: > > mysql> select AsText(g) from geom; > +---+ > | AsText(g) | > +---+ > | Point(1 1)| > +---+ > 1 row in set (0.00 sec) > >The formatting of the POINT coordinates are different. I think you >should be inserting "POINT (1 1)" not "POINT(1,1)". It is the comma. > >-steve- That's exactly right. Was there an example like this in the manual that incorrectly included the comma? -- Paul DuBois, Senior Technical Writer Madison, Wisconsin, USA MySQL AB, www.mysql.com Are you MySQL certified? http://www.mysql.com/certification/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.543 / Virus Database: 337 - Release Date: 11/21/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.543 / Virus Database: 337 - Release Date: 11/21/2003 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Spatial Extension in MySQL 4.1.1-alpha
At 16:03 -0800 12/16/03, Steven Roussey wrote: You did an insert this way: mysql> insert into geom values(GeomFromText('POINT(1,1)')); and expected results this way: mysql> select AsText(g) from geom; +---+ | AsText(g) | +---+ | Point(1 1)| +---+ 1 row in set (0.00 sec) The formatting of the POINT coordinates are different. I think you should be inserting "POINT (1 1)" not "POINT(1,1)". It is the comma. -steve- That's exactly right. Was there an example like this in the manual that incorrectly included the comma? -- Paul DuBois, Senior Technical Writer Madison, Wisconsin, USA MySQL AB, www.mysql.com Are you MySQL certified? http://www.mysql.com/certification/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Spatial Extension in MySQL 4.1.1-alpha
You did an insert this way: mysql> insert into geom values(GeomFromText('POINT(1,1)')); and expected results this way: mysql> select AsText(g) from geom; +---+ | AsText(g) | +---+ | Point(1 1)| +---+ 1 row in set (0.00 sec) The formatting of the POINT coordinates are different. I think you should be inserting "POINT (1 1)" not "POINT(1,1)". It is the comma. -steve- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Spatial Extension in MySQL 4.1.1-alpha
Hi, I am trying out the new GIS capabilities in MySQL 4.1.1-alpha (windows) and I am trying to follow some of the examples from chapter 10 in the manual. Here is a snap shot of my run mysql> create table geom(g geometry); Query OK, 0 rows affected (0.06 sec) mysql> insert into geom values(GeomFromText('POINT(1,1)')); Query OK, 1 row affected (0.00 sec) mysql> select * from geom; +--+ | g| +--+ | NULL | +--+ 1 row in set (0.00 sec) mysql> select AsText(g) from geom; +---+ | AsText(g) | +---+ | NULL | +---+ 1 row in set (0.00 sec) mysql> - Notice that the select statement at the end gives me NULL for the value of g. I was expecting the following: mysql> select AsText(g) from geom; +---+ | AsText(g) | +---+ | Point(1 1)| +---+ 1 row in set (0.00 sec) Does anyone know what I am missing? Thanks, Matt --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.543 / Virus Database: 337 - Release Date: 11/21/2003 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]