1

NetTopologySuite を使用すると、次の式は偽になります。

Point.Empty.Equals(Point.Empty); // false    
Polygon.Empty.Equals(Polygon.Empty); // false

デバッグは、この動作が実装されていることを示しています

    // Geometry
    public IntersectionMatrix Relate(IGeometry g)
    {        
        return RelateOp.Relate(this, g); // Point.Empty, Point.Empty
    }

    // IntersectionMatrix
    public bool IsEquals(Dimension dimensionOfGeometryA, Dimension dimensionOfGeometryB)
    {
        if (dimensionOfGeometryA != dimensionOfGeometryB)
            return false;

        return IsTrue(_matrix[(int)Location.Interior, (int)Location.Interior]) &&
               _matrix[(int)Location.Interior, (int)Location.Exterior] == Dimension.False &&
               _matrix[(int)Location.Boundary, (int)Location.Exterior] == Dimension.False &&
               _matrix[(int)Location.Exterior, (int)Location.Interior] == Dimension.False &&
               _matrix[(int)Location.Exterior, (int)Location.Boundary] == Dimension.False;
    }

この背後にある理由は何なのだろうか。おそらく、この動作は関連するライブラリ (jts、GEOS) でも発生し、地理代数関係者によって知られている正当な理由があると思います。誰か説明できますか?

4

0 に答える 0