コード例 #1
0
        static bool BinaryPredicate(GeoAPIGeometryRef thisRef, IGeometryRef otherRef, Func <IGeometry, IGeometry, bool> operation)
        {
            var impl = otherRef as GeoAPIGeometryRef;

            if (impl != null)
            {
                return(operation(thisRef._geom, impl._geom));
            }
            throw new ArgumentException("Incorrect IGeometryRef implementation");
        }
コード例 #2
0
        static IGeometryRef BinaryOperator(GeoAPIGeometryRef thisRef, IGeometryRef otherRef, Func <IGeometry, IGeometry, IGeometry> operation)
        {
            var impl = otherRef as GeoAPIGeometryRef;

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