<div dir="ltr"><div><div><div><div><div><div><div>Thanks Rémi,<br><br></div>Unfortunately I can't use SpatiaLite or PostGIS.<br></div><br></div>For now I do this:<br></div>1) Break all lines into separate linestrings<br>

</div>2) Search around my location for 1 or more linestrings<br></div>3) Create a perpendicular line from my location to the found linestring<br></div>4) Use the linestring with the shortest perpendicular line.<br><br><div>

<div><div><div><div>I was just wondering if GEOS can already do this.<br></div><div><br></div><div>Thanks,<br></div></div></div></div></div></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr"><br>
<br>
Paul<br>
<br>
<div style="font-size:13.3px;font-family:Verdana,Arial,Helvetica,sans-serif"><div style="border:1px solid #e5e5e5;background-color:#f8f8f8;padding:0.8em 0.8em 0.3em 0.8em"><div style="margin:0 0 8px 0"><p style="margin:0">

<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>
<br><br><div class="gmail_quote">2014-03-04 10:50 GMT+01:00 Rémi Cura <span dir="ltr"><<a href="mailto:remi.cura@gmail.com" target="_blank">remi.cura@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr"><div><div><div><div><div>Hey,<br></div>if you have access to sql, <br></div>you don't need geos.<br><br></div>You could simply convert line to point then order by distance and get the closest.<br></div>

Using postgis it would be quiet easy.<br>
</div><div>You lines appears to be big, so a simple euclidian distance may give you wrong result, you would need a geographical distance.<br></div><div><br></div>Cheers,<br><br>Rémi-C<br></div><div class="gmail_extra"><br>


<br><div class="gmail_quote">2014-03-03 10:35 GMT+01:00 Paul Meems <span dir="ltr"><<a href="mailto:bontepaarden@gmail.com" target="_blank">bontepaarden@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div><div class="h5">
<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>
<br></div></div>_______________________________________________<br>
geos-devel mailing list<br>
<a href="mailto:geos-devel@lists.osgeo.org" target="_blank">geos-devel@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/geos-devel" target="_blank">http://lists.osgeo.org/mailman/listinfo/geos-devel</a><br></blockquote></div><br></div>
<br>_______________________________________________<br>
geos-devel mailing list<br>
<a href="mailto:geos-devel@lists.osgeo.org">geos-devel@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/geos-devel" target="_blank">http://lists.osgeo.org/mailman/listinfo/geos-devel</a><br></blockquote></div><br></div>