Azavea.Open.DAO.Criteria.Spatial.AbstractDistanceExpression.AbstractDistanceExpression C# (CSharp) Method

AbstractDistanceExpression() protected method

Base class for comparing linear distance between the given shape and the feature against a cutoff.
protected AbstractDistanceExpression ( string property, IGeometry shape, double distance, bool trueOrNot ) : System
property string The data class' property/field being compared. /// May not be null.
shape IGeometry The shape we're measuring distance from.
distance double The distance we're comparing against.
trueOrNot bool True means look for matches, /// False means look for non-matches
return System
        protected AbstractDistanceExpression(string property, IGeometry shape, double distance, bool trueOrNot)
            : base(property, shape, trueOrNot)
        {
            if (distance < 0)
            {
                throw new ArgumentException(
                    "Distance between two items is never negative, you passed: " +
                    distance, "distance");
            }
            Distance = distance;
        }
AbstractDistanceExpression