If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > DB2 JDBC equivalent of oracel.sql.STRUCT and oracle.spatial.geometry.JGeometry?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-15-09, 07:23
colmmagoo colmmagoo is offline
Registered User
 
Join Date: Aug 2004
Posts: 15
DB2 JDBC equivalent of oracel.sql.STRUCT and oracle.spatial.geometry.JGeometry?

Hi,

I'm asking this just to check, because I believe the answer is "no", but in case not, is there a JDBC extension for DB2 that has equivalent classes for oracle.spatial.geometry.JGeometry and oracle.sql.STRUCT?

In Oracle, these classes enable you to retrieve data from a spatial column:
STRUCT struct = (oracle.sql.STRUCT) myResultSet.getObject(i);
JGeometry geom = JGeometry.load(struct);

In DB2, from my research so far, you have to create your own equivalent JGeometry class, and convert from java.sql.BLOB/CLOB. Is there another way to get spatial data from a DB2 database in Java program?

Thanks,
Colm.
Reply With Quote
  #2 (permalink)  
Old 06-15-09, 09:32
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
You are right in that you have to roll your own API for this. Here you can find some examples:

Visualize DB2 spatial data in Web applications
Visualize spatial data in DB2
org.geotools.data.db2 (Geotools modules 2.6-SNAPSHOT API)
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On