I have this two geometries:
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");
which looks like this
and
StreamGeometry geo2 = Geometry.Parse("M590241.24,5958738.726L590280.195,5958748.551L590337.172,5958763.234L590337.412,5958763.914L590280.065,5958748.931L590241.24,5958738.726z");
which looks like this:
When I look at these objects in a GIS system geo2
is fully contained in geo1
in the upper right corner:
When I get the intersection of both by
PathGeometry intersection = PathGeometry.Combine(geo1, geo2, GeometryCombineMode.Intersect, null);
I get
{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}
which looks quite strange:
In detail there are irritating discrepancies. For example at the right end the red marked intersection
geometrie isn't at all, what I was expecting.
I tried Combine
with different tolerance values, but with no effect to the result.
What's going wrong here?
* Update * I closed the geometries as @Sinatr supposed and simplified the first one by leaving out the left part of it. Both doesn't affect the outcome.