Example #1
0
        static bool BinaryPredicate(MgGeometryRef thisRef, IGeometryRef otherRef, Func <MgGeometry, MgGeometry, bool> operation)
        {
            var impl = otherRef as MgGeometryRef;

            if (impl != null)
            {
                return(operation(thisRef._geom, impl._geom));
            }
            throw new ArgumentException("Incorrect IGeometryRef implementation");
        }
Example #2
0
        static IGeometryRef BinaryOperator(MgGeometryRef thisRef, IGeometryRef otherRef, Func <MgGeometry, MgGeometry, MgGeometry> operation)
        {
            var impl = otherRef as MgGeometryRef;

            if (impl != null)
            {
                var result = operation(thisRef._geom, impl._geom);
                return(new MgGeometryRef(result));
            }
            throw new ArgumentException("Incorrect IGeometryRef implementation");
        }