Re: GIS In MySQL Database
"Petr Vileta" <[email protected]>
| Newsgroups | gmane.comp.db.mysql.windows |
|---|---|
| Message-ID | <005901c63438$e5dfa510$6401a8c0@petr1> |
----- 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.) -- MySQL Windows Mailing List For list archives: http://lists.mysql.com/win32 To unsubscribe: http://lists.mysql.com/[email protected]