Can anyone tell me whether I could use Hibernate with esri ST_GEOMETRY type? I have found that Hibernate Spatial does support SDO_Geometry, but nothing for ST_Geometry.

I am using oracle 11g and arcgis 10.2

  • Did you got any feedback on this? Would also be interested on this functionality. – Schuller Tom Dec 23 '14 at 7:24
  • Nothing so far. I decided to use native queries @Schuller Tom – Smalis Dec 29 '14 at 13:05

I just got something working.

It's still beta, but first test are very promising.

I'm working with the WKT/WKB representation to store it in the database.

It looks like this:

@Table(name = "dau_track")
public class DauTrack {

    @Column(columnDefinition = "st_geometry")
    @Type(type = "lu.schuller.arcgisStGeometry.WkbStGeometryType")
    @ColumnTransformer(read = "st_asbinary(shape)", write = "st_geomfromwkb(?,2169)")
    private Polyline shape;

I created my own Wkb-HibernateType to convert the wkb-data betweent database and geometry-api. I have already implemented JTS and esri-geomeotry as geo-libraries.

The 'columnTransformers' are modifiing the generated hibernate-sql to read and write under wkb-form in the database.

It's currently running under postgresql, but will it also use under Oracle.

If I had some time, I will publish it on github.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.