<!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>
<html>
<head>
 <meta http-equiv='Content-Type' content='text/html;charset=us-ascii'>
 <style>BODY{font:10pt Tahoma, Verdana, sans-serif;}</style>
</head>
<body>
I am running a standalone console application which uses Hibernate3 and connects to a postgis database. I have been successful in reading the geomoetry from the database when I define my geometry column in Hibernate as<br><br>&nbsp;&nbsp;&nbsp; &lt;property<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name="theGeom"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type="java.lang.String"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; formula="AsText(force_2d(the_geom))"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; length="-1"<br>&nbsp;&nbsp;&nbsp; /&gt;<br><br>This returns the geometry as a WKT string that can easily be read by my application. However, using this definition I am not able to set the value of the geometry. I have read the mailing list about postgis and hibernate and am just more confused. Is there a simple way to define the geometry column to Hibernate to make getting and setting the geometry simple? I would even be pleased with referencing the geometry data as a byte[] or a String from within Java.<br><br>Any help and/or clarification would be appreciated.<br><br>David Robison<br></body></html>