<div dir="ltr"><div>Hi List,<br><br></div>We use with MapWinGIS (C++ ActiveX control) GDAL with GEOS.<br><br>I've got a linestring (stream) and need to know the closest point at that stream from a specific location.<br>

<div>What I need is the index of the point in the stream and the distance from the location to that point.<br clear="all"></div><div><div><div><div dir="ltr"><br></div><div>We currently have a custom GetClosestPoint method which is not using GEOS, but that is not working when a long linestring is close to the location but the points are far away.<br>

</div><div>For example my line has two points, starts in Amsterdam and ends in Paris. My location is near Antwerp.<br><br></div><div>Does GEOS have a better method for this? I did searched using Google and found several methods/pages but I'm not sure what to use.<br>

</div><div>I also want to make it a generic method that will work with all types of lines and polygons.<br><br></div><div>Any advice would be much appreciated.<br></div><div dir="ltr"><br></div><div>Thanks,<br></div><div dir="ltr">


<br>
Paul<br>
<br>
<div style="font-size:13.3px;font-family:Verdana,Arial,Helvetica,sans-serif"><div style="border:1px solid rgb(229,229,229);background-color:rgb(248,248,248);padding:0.8em 0.8em 0.3em"><div style="margin:0px 0px 8px"><p style="margin:0px">

<span><b><img style="float: left; margin-left: 5px; margin-right: 5px;" src="http://www.bontepaarden.nl/bontepaarden/images/newButton.png" alt="" height="120" width="160">Paul Meems </b><br><span>Release manager, configuration manager</span><br>

<span>and forum moderator of MapWindow GIS.</span><br><a href="http://www.mapwindow.org/" target="_blank"><span>www.mapwindow.org</span></a><br><br><span>Owner of MapWindow.nl - Support for</span><br><span>Dutch speaking users.</span><br>

<a href="http://www.mapwindow.nl/" target="_blank"><span>www.mapwindow.nl</span></a><br></span></p>
<p style="margin:0px"><b><br></b></p><p style="margin:0px"><b>Join us at the <a href="http://geogis.detek.unideb.hu/TKonferencia/2014/" target="_blank">MapWindow GIS Conference 2014</a>, in Debrecen Hungary<br></b></p></div>

</div><img src="http://p1.wisestamp.com/pixel.png?p=mozilla&v=3.9.12&t=1322134056890&u=482737fd0c4ca423" height="1" width="1"></div>
</div></div>
</div></div></div>