[ 
http://jira.codehaus.org/browse/GEOT-2001?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrea Aime reopened GEOT-2001:
-------------------------------


Reopening, was closed by mistake

> 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 jdbc-ng
>    Affects Versions: 2.5.0, 2.6-M0
>            Reporter: Christian Mueller
>            Assignee: Andrea Aime
>
> 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

Reply via email to