Spatial « Query « JPA Q&A

1. NHibernate hql - OracleSpatial

I have a NHibernate criteria for IGeomety object:

    Expression.Not(SpatialRestrictions.Disjoint("ExtentProp", IgemoteryObjectToFindBy)));
I have a query engine that supposed to convert this query to HQL.
I didn't find the hql syntax for ...

2. Geo Spatial Queries with JPA

3. Not all postgis spatial operators work in HQL where clause

I've managed to get HQL working with postgis... thanks to some help from the hibernate forums. Some of the spatial operators are working and some don't work. This query for a specific geometry with operator "~=" works: WHERE GEOM ~= GeometryFromText('POINT(1 1 1)',-1); This query finding all the geometries inside a box also works: WHERE GeometryFromText('BOX3D(1 1 1, 100 100 100)',-1) ...

4. Oracle Spatial and createSQLQuery

Hi, I have a problem with oracle spatial and hibernate createSQLQuery method. Here is an example : I have a table ALARM with a column of type SDO_GEOMETRY called geometry. When I'm trying to get the column value with the following code : session = getSession(); tx = session.beginTransaction(); String sql = "select a.geometry from alarm a where a.oid = 1"; ...