Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to CompoundCurve class #5

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/NetTopologySuite.Curved/Geometries/CompoundCurve.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public LineString Linearize(double arcSegmentLength)
/// <inheritdoc cref="Curve.IsClosed"/>
public override bool IsClosed => Linearize().IsClosed;


/// <inheritdoc cref="Curve.StartPoint"/>
public override Point StartPoint
{
Expand Down Expand Up @@ -236,7 +236,7 @@ public override void Apply(IEntireCoordinateSequenceFilter filter)
/// <inheritdoc cref="Geometry.IsEquivalentClass"/>
protected override bool IsEquivalentClass(Geometry other)
{
return other is ILinearizable<LineString> || other is LineString;
return other is CompoundCurve;
}

/// <inheritdoc cref="Geometry.ConvexHull"/>
Expand Down Expand Up @@ -322,6 +322,10 @@ public override bool EqualsExact(Geometry other, double tolerance)
return false;

var cc = (CompoundCurve)other;

if (cc.Curves.Count != Curves.Count)
return false;

for (int i = 0; i < Curves.Count; i++)
{
if (!Curves[i].EqualsExact(cc.Curves[i], tolerance))
Expand Down