<div dir="ltr"><div style="font-size:small;color:rgb(19,79,92);display:inline" class="gmail_default"><span style="font-family:monospace,monospace">​Hi,<br><br><span id="gmail-result_box" class="gmail-" lang="en"><span>I imported a kml file 
with ogr2ogr and I have a well-filled database, including a "waypoints" 
table and hexadecimal coordinates in the "wkb_geometry" column.</span><br><br><span class="gmail-">I would like with a GPS coordinate, select the closest lines.</span><br><br><span class="gmail-">I found this function: <a href="https://postgis.net/docs/ST_ClosestPoint.html">https://postgis.net/docs/ST_ClosestPoint.html</a> but I can not put it into practice.<br><br></span></span><span id="gmail-result_box" class="gmail-" lang="en"><span class="gmail-">In my result, I 
would like to have the GPS positions of the nearest line, as well as the
 distance in kilometers between the line and my GPS coordinates.<br><br></span></span><span id="gmail-result_box" class="gmail-" lang="en"><span class="gmail-">Someone would have an idea how to do it?</span><br><br><span class="gmail-">I
 admit to not being comfortable with the spacial search and the different 
types of coordinates (mercator, google, degrees, gps ..) I get lost 
completely.<br><br></span></span></span></div><div style="font-size:small;color:rgb(19,79,92);display:inline" class="gmail_default"><span style="font-family:monospace,monospace"><span id="gmail-result_box" class="gmail-" lang="en"><span class="gmail-">Thanks,<br></span></span></span></div><div style="font-size:small;color:rgb(19,79,92);display:inline" class="gmail_default"><span style="font-family:monospace,monospace"><span id="gmail-result_box" class="gmail-" lang="en"><span class="gmail-">Mickael<br></span></span></span></div>
</div>