Mark Johnson wrote:
> To all:
>
> Just wading into the GIS arena within MySql. We
> use java with mysql and the mysql-connector and
> openMap.
>
> OpenMap provides a layer.mysql that has a number
> of MySql GIS datatypes.
>
> It would seem that mysql-connector would have
> correspnding datatypes, such as LineString.
>
> How does one obtain a linestring from the database
> ? Is it necessary to convert it to a WKT string
> and then back into a binary datatype?
Mark,
JDBC doesn't specify any mapping for GIS types, so the JDBC driver doesn't support them "natively". Until such time as JDBC and or the JDK actually ship with support for GIS, you'll have to rely on third-party support (such as OpenMAP), as it would create too many dependencies in the JDBC driver to ship with GIS support out-of-the-box.
-Mark
Mark Matthews
Consulting Member Technical Staff - MySQL Enterprise Tools
Oracle
http://www.mysql.com/products/enterprise/monitor.html