Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

GT::SQL field types?

Quote Reply
GT::SQL field types?
Hi all,

I just found exiciting new feature in MySQL 4.1 - spatial data support. As noted in manual ... i can set vairious geometry types in one field and dnes i can buld index on that field. And more than this I can do a search point which besides in serached coordinates.

I've wrote some ugly scripts to test these features and tey work fine but now I want to incorporate this to our forum software as custom field in user profile where users can set their home location and find other gps maniacs around them in specific area.

So my question is: Has anybodi knows how to structure my querys with GT::SQL Modules/Select,Insert data and create geometry type of fields/?

Example query:
Code:
mysql> SET @g1 = GeomFromText('Polygon((0 0,0 3,3 3,3 0,0 0))');
mysql> SET @g2 = GeomFromText('Point(1 1)');
mysql> SELECT MBRContains(@g1,@g2), MBRContains(@g2,@g1);

+--------------------+--------------------+
| MBRWithin(@g1,@g2) | MBRWithin(@g2,@g1) |
+--------------------+--------------------+
| 1 | 0 |
+--------------------+--------------------+



Cheers,
Boris

Facebook, Twitter and Google+ Auth for GLinks and GCommunity | reCAPTCHA for GLinks | Free GLinks Plugins
Quote Reply
Re: [eupos] GT::SQL field types? In reply to
BUMP

GT?

Cheers,
Boris

Facebook, Twitter and Google+ Auth for GLinks and GCommunity | reCAPTCHA for GLinks | Free GLinks Plugins