我有这两个几何形状:
StreamGeometry geo1 = Geometry.Parse("M590202.895,5958727.621L590280.305,5958747.961L590337.012,5958762.785L590337.172,5958763.234L590337.412,5958763.914L590280.065,5958748.931L590241.24,5958738.726L590202.576,5958728.98z");
看起来像这样
和
StreamGeometry geo2 = Geometry.Parse("M590241.24,5958738.726L590280.195,5958748.551L590337.172,5958763.234L590337.412,5958763.914L590280.065,5958748.931L590241.24,5958738.726z");
看起来像这样:
当我在一个 GIS 系统中查看这些对象时geo2
完全包含在geo1
右上角:
当我得到两者的交集时
PathGeometry intersection = PathGeometry.Combine(geo1, geo2, GeometryCombineMode.Intersect, null);
我明白了
{F1M590241,25;5958738,5L590280,1875;5958748,5 590332,3125;5958762 590337;5958763 590337,1875;5958763 590337,4375;5958764 590280,0625;5958749 590241,25;5958738,5z}
这看起来很奇怪:
细节上有令人恼火的差异。例如,在右端,红色标记的intersection
几何图形根本不是我所期望的。
我尝试Combine
了不同的公差值,但对结果没有影响。
这里出了什么问题?
* 更新 * 我按照@Sinatr 的假设关闭了几何图形,并通过省略左侧部分简化了第一个几何图形。两者都不影响结果。