Index: src/Common/NetTopologySuite/LinearReferencing/LocationIndexOfLine.cs
===================================================================
diff -u -r8f6ae890fed8e8eae3a32f9c0498a10f82e0ddf9 -r5fc71a385897af92ccb092f2f969b5709afab85a
--- src/Common/NetTopologySuite/LinearReferencing/LocationIndexOfLine.cs (.../LocationIndexOfLine.cs) (revision 8f6ae890fed8e8eae3a32f9c0498a10f82e0ddf9)
+++ src/Common/NetTopologySuite/LinearReferencing/LocationIndexOfLine.cs (.../LocationIndexOfLine.cs) (revision 5fc71a385897af92ccb092f2f969b5709afab85a)
@@ -12,8 +12,19 @@
/// (However, the common case of a ring is always handled correctly).
///
public class LocationIndexOfLine
- {
+ {
+ private readonly IGeometry linearGeom;
+
///
+ /// Initializes a new instance of the class.
+ ///
+ /// The linear geom.
+ public LocationIndexOfLine(IGeometry linearGeom)
+ {
+ this.linearGeom = linearGeom;
+ }
+
+ ///
///
///
///
@@ -30,18 +41,7 @@
return locater.IndicesOf(subLine);
}
- private IGeometry linearGeom;
-
///
- /// Initializes a new instance of the class.
- ///
- /// The linear geom.
- public LocationIndexOfLine(IGeometry linearGeom)
- {
- this.linearGeom = linearGeom;
- }
-
- ///
///
///
///
@@ -58,9 +58,14 @@
// check for case where subline is zero length
if (subLine.Length == 0)
- subLineLoc[1] = (LinearLocation) subLineLoc[0].Clone();
- else subLineLoc[1] = locPt.IndexOfAfter(endPt, subLineLoc[0]);
+ {
+ subLineLoc[1] = (LinearLocation) subLineLoc[0].Clone();
+ }
+ else
+ {
+ subLineLoc[1] = locPt.IndexOfAfter(endPt, subLineLoc[0]);
+ }
return subLineLoc;
}
}
-}
+}
\ No newline at end of file