-
-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
The following failing test demonstrate the problem.
A mutli polygon that crosses the date line doesn't work properly.
using NetTopologySuite.Geometries;
using NetTopologySuite.IO;
using Spatial4n.Core.Context;
using Spatial4n.Core.Context.Nts;
using Spatial4n.Core.Shapes.Nts;
using Xunit;
namespace Spatial4n.Tests.bugs
{
public class DateLine
{
[Fact]
public void ShouldWork()
{
var wktReader = new WKTReader(NtsSpatialContext.GEO.GetGeometryFactory());
var poly = wktReader.Read("MULTIPOLYGON (((100 50, -100 50, -100 -50, 100 -50, 100 50)))");
var polyShape = new NtsGeometry(poly, NtsSpatialContext.GEO, true);
var ptShape = new NtsPoint(new Point(0, 0), SpatialContext.GEO);
var spatialRelation = polyShape.Relate(ptShape);
Assert.Equal(spatialRelation, Spatial4n.Core.Shapes.SpatialRelation.INTERSECTS);
}
}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels