About storing spatial data in embedded server
About storing spatial data in embedded server
I just tested the embedded server. Who can tell me how to store spatial data in embedded server?
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:Example:For more information refer to MySQL manual.
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
...
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;