SQLDialect>>setGeometryValue will not work for DB2 Spatial Extender
-------------------------------------------------------------------
Key: GEOT-2001
URL: http://jira.codehaus.org/browse/GEOT-2001
Project: GeoTools
Issue Type: Improvement
Components: data h2
Affects Versions: 2.5.0, 2.6-M0
Reporter: Christian Mueller
The concept using
SQLDialect>>setGeometryValue(Geometry g, int srid, Class binding,
PreparedStatement ps, int column)
to set Geometry params does not work for DB2 Spatial Extender.
A quick example:
JDBCDataStore>>insertSQLPS creates a statement like
insert into (id,geom) values (?,?)
and uses the setGeometryValue method to set a geometry parameter.
But in DB2 it has to be:
insert into (id,geom) values (?,db2gse.ST_LineFromWKB(cast (? as
BLOB(2G)),4711))
assuming we are talking about a line geometry with native SRID 4711
There is no possibility to create a STRUCT (Oracle) or a Geometry Object
(Postgis).
------------------------------
Possible Solution:
Introduce a method
SQLDialect>>getGeometryParamMarker(int srid, Class binding)
which simply returns "?"
Refactor all occurrences of "?" for a geometry to call the new method.
Then I am in the game again.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel