Re: GIS In MySQL Database
Larry <[email protected]>
| Newsgroups | gmane.comp.db.mysql.windows |
|---|---|
| Message-ID | <[email protected]> |
On Sat, 18 Feb 2006 04:09:29 +0100, you wrote (with possible editing): >----- Original Message ----- >From: "Michael Avila" <[email protected]> >To: "MySQL - Win32" <[email protected]> >Sent: Friday, February 17, 2006 11:21 PM >Subject: GIS In MySQL Database > > >>I have a Win32 MySQL database. I want to add GIS information, specifically >> latitude and longitude. Reading the MySQL docs online, it seems like the >> WKT >> format can be used to describe this information. If I understand the docs >> correctly, it is stored in a blob. (I assume a TinyBlob.) If I wanted to >> add >> the latitude and longitude of a location using SQL, how would I do that? >> >> INSERT INTO tablename (longlat) VALUE('POINT(40.12345 -83.12345)') >> >> where longlat would be a TINYBLOB. >> >> Would that be correct or have I missed the train as it pulled out of the >> station? >> >Yes, this is correct but if the 'POINT(40.12345 -83.12345)' is basic string >you can store in char or varchar type filed too. Blob field is meant for >binary data mainly. > >Petr Vileta, Czech republic >(My server reject all messages from Yahoo and Hotmail. Send me your mail >from another non-spammer site please.) Wouldn't it be a more efficient use of disk space to store it as a char or varchar than as a blob? Thanks, -- Larry Email to rapp at lmr dot com -- MySQL Windows Mailing List For list archives: http://lists.mysql.com/win32 To unsubscribe: http://lists.mysql.com/[email protected]