MySQL Forums
Forum List  »  GIS

Using OpenGIS extensions wih Java?
Posted by: Andre Mas
Date: March 14, 2010 04:53PM

I have a table which represents a postal address and would like to include longitude/latitude information in the data. Although I could simply add two distinct field for each axis, I would be interested in using the new OpenGIS extensions in MySQL within a Java application, partly because this would allow me to leverage any optimisations made within the OpenGIS functions implemented by MySQL.

So far I have followed the tutorial here:

http://dev.mysql.com/tech-resources/articles/4.1/gis-with-mysql.html

Now on the Java side I have tried looking for an appropriate library to help me, but I haven't found one that seems suitable (please point me in the direction of one, if thre is one available). The JDBC ResultSet returned by MySQL doesn't seem to implement any additional methods for accessing the new data types, leaving be with ResultSet.getObject() as the only suitable accessor for the data.

For this reason, I have decided on trying to create some methods for converting the data to a Java data type. The problem I am running into is that although the OpenGIS objects in MySQL are documented here:

http://dev.mysql.com/doc/refman/5.1/en/opengis-geometry-model.html

I don't see anything documenting the data format. For example Point is a 25 byte data type, but from that point I am not sure whether I should be treating this a two 100 bit floating point values.

The way I am trying to access the data is as follows:

SELECT address, address_loc from address;

Any help or insight would be appreciated.

At the time of writing I was using mysql 5.0.85.



Edited 2 time(s). Last edit at 03/14/2010 04:58PM by Andre Mas.

Options: ReplyQuote


Subject
Views
Written By
Posted
Using OpenGIS extensions wih Java?
4990
March 14, 2010 04:53PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.