[GRASS-user] raster map of the azimuth to a point

ivan marchesini marchesini at unipg.it
Fri Feb 6 10:00:45 EST 2009


This is my solution at the moment:


given a point of coordinates x,y

_____________
r.mapcalc "px=(x()-x)"
r.mapcalc "py=(y()-y)"

r.mapcalc "azimuth=if(px>=0 & py>=0,90-atan(py/px),if(px>=0 &
py<0,90-atan(py/px),if(px<0 & py<0,270-atan(py/px),if(px<0 &
py>=0,270-atan(py/px)   ))))"
_____________


cheers

Ivan



Il giorno ven, 06/02/2009 alle 14.27 +0100, ivan marchesini ha scritto:
> Dear Grass Users,
> I have a single point vector map.
> 
> I would like to obtain a raster map where each cell represents the value
> of the azimuth to the point raster map.
> I mean I would like to know which direction someone have to look to see
> the point in the vector map.
> 
> any suggestion?
> 
> many thanks 
> 
> Ivan
> 
> 
> 
-- 
Ti prego di cercare di non inviarmi files .dwg, .doc, .xls, .ppt.
Preferisco formati liberi.
Please try to avoid to send me .dwg, .doc, .xls, .ppt files.
I prefer free formats.
http://it.wikipedia.org/wiki/Formato_aperto
http://en.wikipedia.org/wiki/Open_format

Ivan Marchesini
Department of Civil and Environmental Engineering
University of Perugia
Via G. Duranti 93/a 
06125
Perugia (Italy)
Socio fondatore GFOSS "Geospatial Free and Open Source Software" http://www.gfoss.it
e-mail: marchesini at unipg.it
        ivan.marchesini at gmail.com
tel: +39(0)755853760
fax (university): +39(0)755853756
fax (home): +39(0)5782830887
jabber: geoivan73 at jabber.org



More information about the grass-user mailing list