[postgis-users] predicate of direction is possible?

Francisco Salas fsalas at pinar.geocuba.cu
Fri Jan 25 07:20:21 PST 2013


thank you Mike, I will test this function and later I comment you

Regards, Francisco Salas 

-----Mensaje original-----
De: postgis-users-bounces at lists.osgeo.org
[mailto:postgis-users-bounces at lists.osgeo.org] En nombre de Mike Toews
Enviado el: domingo, 20 de enero de 2013 12:08 a.m.
Para: PostGIS Users Discussion
CC: postgis-users
Asunto: [?? Probable Spam] Re: [postgis-users] predicate of direction is
possible?

On 18 January 2013 04:52, Francisco Salas <fsalas at pinar.geocuba.cu> wrote:
> Hi, I have interest in to obtain if one object in the table A was in 
> the east,west,south,etc.  of the other object in the table B.
>
> There are some function in postgis for this.
>
> Any idea?

I have an add-on function[1] to return N, NW, W, SW, S, SE, E, or NE from an
azimuth direction. E.g.:

SELECT ST_Cardinal_Direction(ST_Azimuth(A.geom, B.geom)) FROM A, B WHERE ...

The function can be changed to instead return 'east', 'west', 'south', or
however you want to define.

-Mike

[1] http://trac.osgeo.org/postgis/wiki/UsersWikiCardinalDirection
_______________________________________________
postgis-users mailing list
postgis-users at lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users



More information about the postgis-users mailing list