# Get Point at distance on a LineString using NetTopologySuite

I am quite sure there is a function in NTS that actually gets us a point at a distance along a line starting at first vertex. I am using NetTopologySuite version 1.12.1.

In Shapely, the python version of JTS, it is quite simple to use

``````>>> LineString([(0, 0), (0, 1), (1, 1)]).interpolate(0.75, normalized=True).wkt
'POINT (0.5000000000000000 1.0000000000000000)'
``````

I am trying to do the same thing using NTS but i hightly doubt they could be using a jargon word for this. I tried LinearReferencing namespace, but could not find a suitable method.

Does anyone have idea on this?

-
PointAlongSegmentByFraction ? it is in LinearLocation – simplexio Jan 9 '13 at 13:53
@simplexio - would you mind posting this as an answer? – vinayan Jan 10 '13 at 7:00

`PointAlongSegmentByFraction(Coordinate p0, Coordinate p1, double fraction)` in LinearLocation.cs

-

complete code based on help of @simplexio's answer..

``````string wkt = "LINESTRING (0 0, 10 0, 20 0)";

ILineString lstring = (ILineString)g1;
Coordinate pt1 = lstring.GetCoordinateN(0);
Coordinate pt2 = lstring.GetCoordinateN(lstring.NumPoints - 1);

Coordinate c = LinearLocation.PointAlongSegmentByFraction(pt1,pt2, 0.25);
``````
-