Criteria SpatialRestrictions.IsWithinDistance NHibernate.Spatial
Posted
by idjones82
on Stack Overflow
See other posts from Stack Overflow
or by idjones82
Published on 2010-03-11T18:20:55Z
Indexed on
2010/03/11
18:24 UTC
Read the original article
Hit count: 404
Has anyone implemented this, or know if it would be difficult to implement this/have any pointers?
public static SpatialRelationCriterion IsWithinDistance(string propertyName, object anotherGeometry, double distance)
{
// TODO: Implement
throw new NotImplementedException();
}
from NHibernate.Spatial.Criterion.SpatialRestrictions
I can use "where NHSP.Distance(PROPERTY, :point)" in hql. But want to combine this query with my existing Criteria query.
for the moment I'm creating a rough polygon, and using
criteria.Add(SpatialRestrictions.Intersects("PROPERTY", myPolygon));
© Stack Overflow or respective owner