**** NOTE: The following is a code that has been cut from a program. Use this code at your own risk. **** **** to map spatial data types to object in Java: Map CustomTypeMap = null; String MainDB = "jdbc:informix-sqli://"+ "SERVERHOST" + ":" + "SERVERPORT"; Properties MainP = new Properties(); MainP.put("INFORMIXSERVER", "DBSERVERNAME" ); MainP.put("database", "DBNAME" ); MainP.put("user", "USERNAME" ); MainP.put("password", "PASSWORD" ); try { Connection MC = null; Statement ST = null; MC = DriverManager.getConnection( MainDB, MainP); ST = MC.createStatement( ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); System.out.println("Connected"); CustomTypeMap = MC.getTypeMap(); CustomTypeMap.put("st_geometry",Class.forName("ST_WKBGeometry")); MC.setTypeMap( CustomTypeMap ); } catch( Exception e ) { System.out.println("Warning: Could not make connection to DB : " + (i+1) ); } **** to get a spatial data, you need to use st_asbinary() function like the following: QueryStr = "select station_name, st_asbinary( station_location ) from stations; " **** and then to read the data: use the getColumnTypeName() function and if it is similar to "ST_geometry", then map the object. Example: while( QueryResult.next() ) { for( int i=1; i<=QueryResultMetaData.getColumnCount(); i++) { String ColumnType = QueryResultMetaData.getColumnTypeName( i ); String Val = ""; if( ColumnType.equalsIgnoreCase( "ST_geometry" ) ) { Geometry = (ST_WKBGeometry)QueryResult.getObject( i ); Val = Geometry.toString(); } else Val = ""+QueryResult.getString( i ); } }