After a couple of grulling hours, Jody and I have managed to find a solution to the MultiLineString insert of geometries into Oracle.
We are now using PreparedStatements to insert geometries using STRUCT objects instead of constructing the raw sql statement and executing it.
Oliver
On 3/14/06, David Zwiers <[EMAIL PROTECTED]> wrote:
That method will take care of it for you, notice MultiLineString is a subclass of Geometry :)Cheers,David
On 3/14/06, Oliver Loe <[EMAIL PROTECTED] > wrote:Hi
I'm trying to encode MultiLineString geometries to be inserted into oracle. I found this method in SQLEncodeOracle:
public static String toSDOGeom(Geometry geometry, int srid) {
if (Point.class.isAssignableFrom(geometry.getClass())) {
return toSDOGeom((Point) geometry, srid);
} else if (LineString.class.isAssignableFrom(geometry.getClass())) {
return toSDOGeom((LineString) geometry, srid);
} else if (Polygon.class.isAssignableFrom(geometry.getClass())) {
return toSDOGeom((Polygon) geometry, srid);
} else {
LOGGER.warning("Got a literal geometry that I can't handle: "
+ geometry.getClass().getName());
return "";
}
}
It does not cater for MultiLineString objects. How can I get around this? Is there a fix for it?
Oliver
