[GRASS-user] grass add-ons compile&install (Matteo Toro)

Hamish hamish_b at yahoo.com
Mon Oct 4 22:09:53 EDT 2010


Matteo wrote:
> I'm trying to install the  azimuth2.c add on  (http://grass.osgeo.
> org/wiki/GRASS_AddOns#Miscellaneous_Add-ons) on my grass6.4
> running under ubuntu 9.10
> 
> I'm really new to this kind of stuffs, so can you give me a
> little explanation how about to compile and install this add on?
> 
> I had a look to this webpage http://grass.osgeo.
> org/wiki/Compile_and_Install#Addons  at the "compiled
> C modules" sections, but 
> this doesnt help me: mostly my C module doesn't come with a
> makefile, so i dont know where to start.

It's not actually a GRASS module, it's just a little standalone C program.

compile it with:
$ gcc -lm azimuth2.c -o azumuth2

(-lm to link it to the math libary, for the trig functions)

then run it with:
$ ./azimuth2


note that v.to.db in grass 6.5svn and newer has support for uploading line
azimuth the the line attribute, but this is projection-dependent and I'm
not totally convinced that the numbers it gives are relevant outside of
a Mercator projection.


Hamish



      


More information about the grass-user mailing list