Hi,<br><br>I am using Postgis via JDBC (namely spatial EJB).  I just have a quick question about setting geometry parameters in a JDBC query, <br>the question is it possible just to set a java object in the query or does it always parse (binaryParser, binarayWriter) the string representation of the object.
<br><br>A small example is the following query:<br><br>// Create a new Polygon<br>Polygon p = new Polygon("((0 0, 0 10, 10 10, 10 0, 0 0))");<br><br>String query = "SELECT * FROM thetable WHERE <br>                          the_geom && ?
<br>                          AND Intersects(the_geom, ?)";<br><br><br>PreparedStatement prep = mDBConnection.prepareStatement(query);<br><br>// not sure what type to set, set blob ????<br>prep.setBlob(1, p);<br>prep.setBlob
(2, p);<br><br>prep.execute();<br><br>// DO STUFF WITH RESULT<br><br>I only ask this question because when using Postgis with EJB3 i cannot just set the object as a parameter as it needs to be contained in single quotation marks, if not the geometry is invalid (parse error - invalid geometry)
<br><br>Any suggestions ?<br><br>Thanks,<br><br>Andy<br><br>