About storing spatial data in embedded server

About storing spatial data in embedded server

Postby Guest » Fri 25 Feb 2005 13:26

I just tested the embedded server. Who can tell me how to store spatial data in embedded server?
Guest
 

Postby Serious » Mon 28 Feb 2005 11:16

There are two standard spatial data formats that are used to represent geometry objects in queries. They are:
1. Well-Known Text (WKT) format
2. Well-Known Binary (WKB) format
Internally, MySQL stores geometry values in a format that is not identical to either WKT or WKB format.

MySqlDirect does not support internal spatial data format. In order to use spatial data tou can use following functions:
Code: Select all
GeomFromText
GeomFromWKB
AsText
AsBinary
...
Example:
Code: Select all
create table geom(pt point);
insert into geom values(GeomFromText('point(1 1)'));
select astext(pt) from geom;
select asbinary(pt) from geom;
For more information refer to MySQL manual.
Serious
 


Return to dotConnect for MySQL