[postgis-users] Fwd: Hello everyone, That is my first message.I am using PostGIS not so long and so I ask you to help me.
pcreso at pcreso.com
pcreso at pcreso.com
Sun May 22 00:39:44 PDT 2011
This query from
http://postgis.refractions.net/pipermail/postgis-users/2009-April/023265.html
should give you an idea of how to do this.
The radius is an arbitrary value to avoid a full table scan.
If you already know which feature is closest & just want the
closest vertex from that feature, add a where clause to include
just that feature.
HTH
Brent Wood
> select * from vertices_tmp where
> st_expand(setsrid(makepoint(x,y),4326),radius) && the_geom
> order by distance(setsrid(makepoint(x,y),4326),the_geom) asc
> limit 1;
--- On Sun, 5/22/11, Александр Дымчишин <dymchishin at gmail.com> wrote:
From: Александр Дымчишин <dymchishin at gmail.com>
Subject: [postgis-users] Fwd: Hello everyone, That is my first message.I am using PostGIS not so long and so I ask you to help me.
To: postgis-users at postgis.refractions.net
Date: Sunday, May 22, 2011, 8:35 AM
I'm trying to solve the transport problem and make the visualization using Geotools. In attached pic that is what I mean. My car is between V3 and V4. Its position can I get with a query like "SELECT ST_Line_Interpolate_Point(linestring1, 0.6);" Ok, I got it's position, but how can I receive nearest real vertices v3 and v4? I hope, there is a method with only one query. Thanks.
-----Inline Attachment Follows-----
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20110522/c1360c6f/attachment.html>
More information about the postgis-users
mailing list