About storing spatial data in embedded server

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
Guest

About storing spatial data in embedded server

Post by 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?

Serious

Post by 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.

Post Reply