Thanks for the answers. I have looked at the source of PostgisDialect and
seen all the registered functions. Sorry for my little knowledge of postgis,
but what's the difference of those function starting with st_ and those with
matching names but without the prefix?
Another question: why does this HQL
"from SocialEvent where contains(area, ?)"
results in:
org.springframework.orm.hibernate3.HibernateQueryException: unexpected AST
node: ( near line 1, column 60 [from bran.tries.hibernatespatial.SocialEvent
where contains(area, ?) ];
while
"from SocialEvent where contains(area, ?) = true"
works?
Help is appreciated.
Bing
--------------------------------------------------
From: "Karel Maesen" <
[hidden email]>
Sent: Thursday, January 08, 2009 6:10 AM
To: "Hibernate Spatial Users Discussion"
<
[hidden email]>
Subject: Re: [hibernatespatial-users] spatial query
>
> Yes you can use postgis (or Oracle spatial) functions in HQL. Check
> the unit tests in the Hibernate Spatial project for examples. They
> generally follow the OGC names (which is the same as the pre-1.3
> Postgis names - those not starting with ST_).
>
> Regards,
> Karel
>
>
> On 07 Jan 2009, at 05:46, Bing Ran wrote:
>
>> Hi,
>>
>> I'm new to HibernateSpatial but with great interests.
>>
>> Can I do spatial query directly in the hql, something like find all
>> restaurants within 5 km distance? The more general questions is if
>> there is an abstraction in HQL that can do the usual geometry
>> computation?
>>
>> Thanks!
>>
>> Bing
>>
>> _______________________________________________
>> hibernatespatial-users mailing list
>>
[hidden email]
>>
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/>> hibernatespatial-users
>
> _______________________________________________
> hibernatespatial-users mailing list
>
[hidden email]
>
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users>
_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users