[postgis-users] Select closest line

Mickael MONSIEUR mickael.monsieur at gmail.com
Thu Apr 27 09:43:55 PDT 2017


Already, I have just understood an error .. is that in "waypoint" (table)
there are only points of interest and not the polylines that interest me!
They are scattered in 1000 tables... (!!!!) Thanks phpPGAdmin...
I am looking for how ogr2ogr can make ONE table with ALL polylines and not
a table for each...

2017-04-27 15:28 GMT+02:00 Felix Kunde <felix-kunde at gmx.de>:

> Would ST_ShortestLine help?
>
> https://postgis.net/docs/ST_ShortestLine.html
>
>
>
> Gesendet: Donnerstag, 27. April 2017 um 11:24 Uhr
> Von: "Mickael MONSIEUR" <mickael.monsieur at gmail.com>
> An: postgis-users at lists.osgeo.org
> Betreff: [postgis-users] Select closest line
>
> ​Hi,
>
> 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.
>
> I would like with a GPS coordinate, select the closest lines.
>
> I found this function: https://postgis.net/docs/ST_ClosestPoint.html but
> I can not put it into practice.
>
> 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.
>
> Someone would have an idea how to do it?
>
> I admit to not being comfortable with the spacial search and the different
> types of coordinates (mercator, google, degrees, gps ..) I get lost
> completely.
>
> Thanks,
> Mickael_______________________________________________ postgis-users
> mailing list postgis-users at lists.osgeo.org https://lists.osgeo.org/
> mailman/listinfo/postgis-users[https://lists.osgeo.org/
> mailman/listinfo/postgis-users]
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20170427/ba1ef5f0/attachment.html>


More information about the postgis-users mailing list