[postgis-users] My crusade to get the real angle

Guido Lemoine guido.lemoine at jrc.it
Mon Jul 10 05:08:02 PDT 2006


Just use a 'where' clause. This is basic SQL. Nothing to do with PostGIS.

UPDATE TABLE MUB SET ANGLE = 90 – ANGLE
WHERE ANGLE BETWEEN 0 AND 90

(try lower case if this doesn't work).

GL

Ezequias Rodrigues da Rocha wrote:

> Hi list,
>
> I am still on my crusade to my real angle (not azimuth). Even with the 
> mapserver doesen't helping me with labels I am sill trying to retrieve 
> the real angle of a linestring.
>
> As you should know I have the azimuth of a set of linestrings and 
> after a radians to degree conversion I noticed that the XY system is 
> quite different from the Azimuth system and I need to do some 
> conversions for each quadrant.
>
> *So my question is:* How do I apply a if statement on 
> Postgis/Postgresql ? I know is is not a Postgis question but I think 
> you could help me.
>
> I am trying to run this command line on psql:
>
> select angulo from mub;
> IF ANGLE >= 0 AND ANGLE <=90 THEN
> UPDATE TABLE MUB SET ANGLE = 90 – ANGLE
> END IF;
>
> But it does not work. Any help will be welcomed.
>
> Regards ...
>
>-- 
>Ezequias Rodrigues da Rocha
>http://ezequiasrocha.blogspot.com
>msn:ezequias at hotmail.com
>"the worst of democracies is still better than the best of dictatorship"
>  
>
>------------------------------------------------------------------------
>
>_______________________________________________
>postgis-users mailing list
>postgis-users at postgis.refractions.net
>http://postgis.refractions.net/mailman/listinfo/postgis-users
>  
>



More information about the postgis-users mailing list