[GRASS-user] GRASS EXAMPLE

Dear all,

I have installed GRASS GIS via elgis.repo (see below) on RHEL5 (Linux wn1.yerphi-cluster.grid.am 2.6.18-274.3.1.el5 #1 SMP Wed Sep 7 10:51:39 CEST 2011 x86_64 x86_64 x86_64 GNU/Linux) version.

I would like to know if you can send me an example with makefile to test.

Regards,
Hrach

···


Hrachya Astsatryan
Head of HPC Laboratory,
Institute for Informatics and Automation Problems,
National Academy of Sciences of the Republic of Armenia
1, P. Sevak str., Yerevan 0014, Armenia
t: 374 10 284780
f: 374 10 285812
e: hrach@sci.am

Dear all,

I have installed GRASS GIS via elgis.repo (see below) on RHEL5 (Linux wn1.yerphi-cluster.grid.am 2.6.18-274.3.1.el5 #1 SMP Wed Sep 7 10:51:39 CEST 2011 x86_64 x86_64 x86_64 GNU/Linux) version.

I would like to know if you can send me an example with makefile to test.

You can download the standard sample datasets here:
http://grass.fbk.eu/download/data.php
Just untar one of them into your GISDBASE directory and you can start working with that data.

···


Hrachya Astsatryan
Head of HPC Laboratory,
Institute for Informatics and Automation Problems,
National Academy of Sciences of the Republic of Armenia
1, P. Sevak str., Yerevan 0014, Armenia
t: 374 10 284780
f: 374 10 285812
e: hrach@sci.am

_______________________________________________
grass-user mailing list
[grass-user@lists.osgeo.org](mailto:grass-user@lists.osgeo.org)
[http://lists.osgeo.org/mailman/listinfo/grass-user](http://lists.osgeo.org/mailman/listinfo/grass-user)

This mail was received via Mail-SeCure System.

Dear all,

Thanks for your response.
I just wanted to get a simple C example with makefile.
Such as
#include <stdio.h>
#include <stdarg.h>
#include <grass/config.h>
#include <grass/datetime.h>
#include <grass/gisdefs.h>

Regards,
Hrach

···


Hrachya Astsatryan
Head of HPC Laboratory,
Institute for Informatics and Automation Problems,
National Academy of Sciences of the Republic of Armenia
1, P. Sevak str., Yerevan 0014, Armenia
t: 374 10 284780
f: 374 10 285812
e: hrach@sci.am

_______________________________________________
grass-user mailing list
[grass-user@lists.osgeo.org](mailto:grass-user@lists.osgeo.org)
[http://lists.osgeo.org/mailman/listinfo/grass-user](http://lists.osgeo.org/mailman/listinfo/grass-user)

This mail was received via Mail-SeCure System.


Hrachya Astsatryan
Head of HPC Laboratory,
Institute for Informatics and Automation Problems,
National Academy of Sciences of the Republic of Armenia
1, P. Sevak str., Yerevan 0014, Armenia
t: 374 10 284780
f: 374 10 285812
e: hrach@sci.am

Thanks for your response.
I just wanted to get a simple C example with makefile.
Such as
#include <stdio.h>
#include <stdarg.h>

have a look at

http://trac.osgeo.org/grass/browser/grass/branches/develbranch_6/doc/raster/r.example
http://trac.osgeo.org/grass/browser/grass/branches/develbranch_6/doc/vector/v.example
http://trac.osgeo.org/grass/browser/grass/branches/develbranch_6/doc/python

and any other raster or vector module

http://trac.osgeo.org/grass/browser/grass/branches/develbranch_6/raster
http://trac.osgeo.org/grass/browser/grass/branches/develbranch_6/vector

Helmut

Helmut

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/GRASS-EXAMPLE-tp7203778p7205022.html
Sent from the Grass - Users mailing list archive at Nabble.com.

Dear Helmut,

Thanks a lot, but I can’t find Module.make (find / -name Module.make) in order to indicate it in the makefile.
I have installed grass, grass-devel, grass-lib via elgis.repo.

Regards,
Hrach

···


Hrachya Astsatryan
Head of HPC Laboratory,
Institute for Informatics and Automation Problems,
National Academy of Sciences of the Republic of Armenia
1, P. Sevak str., Yerevan 0014, Armenia
t: 374 10 284780
f: 374 10 285812
e: hrach@sci.am

Thanks a lot, but I can't find Module.make (find / -name Module.make) in

order to indicate it in the makefile.

I have installed grass, grass-devel, grass-lib via elgis.repo.

here on my side it's within tjhe installation GRASS
6.4\include\Make\Module.make
[here awingrass-installation, but should be +/- the same in linux]

Helmut

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/GRASS-EXAMPLE-tp7203778p7205126.html
Sent from the Grass - Users mailing list archive at Nabble.com.

Thanks a lot, but I can't find Module.make (find / -name Module.make) in

order to indicate it in the >makefile.

I have installed grass, grass-devel, grass-lib via elgis.repo.

here on my side it's within tjhe installation GRASS

6.4\include\Make\Module.make

[here awingrass-installation, but should be +/- the same in linux]

or in the source:
http://trac.osgeo.org/grass/browser/grass/branches/develbranch_6/include/Make/Module.make

Helmut

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/GRASS-EXAMPLE-tp7203778p7205135.html
Sent from the Grass - Users mailing list archive at Nabble.com.

Dear Helmut,

I don’t see (see below) any Module.make after successgulyy install the grass from elgis repo.

With regards,
Hrach

[root@wn1 grass-6.4.1]# pwd
/usr/lib64/grass-6.4.1
[root@wn1 grass-6.4.1]# ls
AUTHORS CHANGES COPYING fonts scripts
bin contributors.csv driver GPL.TXT tools
bwidget contributors_extra.csv etc REQUIREMENTS.html translators.csv

[root@wn1 grass-6.4.1]# ls /usr/include/grass/
arraystats.h display.h icon.h nviz.h shhopt.h
bdlg_bm.h dlg_bm.h imagedefs.h ogsf_proto.h site.h
bitmap.h dlg.h imagery.h ortholib.h sitelib.h
blas.h edit.h interpf.h Paintlib.h spawn.h
btree.h form.h iostream patterns.h sqlp.h
CC.h freetypecap.h keyframe.h P_datetime.h stats.h
cdhc.h G3d.h kftypes.h PolimiFunct.h std_incs.h
cluster.h geom.h label_bm.h proto_dbmi.h symbol.h
codes.h gisdefs.h la.h P_site.h transform.h
colors.h gis.h lapack.h qtree.h vask.h
config-64.h glocale.h libtrans.h raster.h vbuildlib.h
config.h gmath.h linkm.h readsites.h vect
dataquad.h gprojects.h lock.h region_bm.h Vect.h
datetime.h graphics.h lrs.h rowio.h vedit.h
dbmi.h gstypes.h monitors.h rtree version.h
devlib.h gsurf.h N_gwflow.h rtree.h V_.h
dgl help.h N_heatflow.h search.h waterglobs.h
dgl.h ibtree.h N_pde.h segment.h winname.h
dig_atts.h icon_bm.h N_solute_transport.h shapefil.h

···


Hrachya Astsatryan
Head of HPC Laboratory,
Institute for Informatics and Automation Problems,
National Academy of Sciences of the Republic of Armenia
1, P. Sevak str., Yerevan 0014, Armenia
t: 374 10 284780
f: 374 10 285812
e: hrach@sci.am

Dear Helmut,

I don’t see (see below) any Module.make after successful install the grass from elgis repo.

With regards,
Hrach

[root@wn1 grass-6.4.1]# pwd
/usr/lib64/grass-6.4.1
[root@wn1 grass-6.4.1]# ls
AUTHORS CHANGES COPYING fonts scripts
bin contributors.csv driver GPL.TXT tools
bwidget contributors_extra.csv etc REQUIREMENTS.html translators.csv

[root@wn1 grass-6.4.1]# ls /usr/include/grass/
arraystats.h display.h icon.h nviz.h shhopt.h
bdlg_bm.h dlg_bm.h imagedefs.h ogsf_proto.h site.h
bitmap.h dlg.h imagery.h ortholib.h sitelib.h
blas.h edit.h interpf.h Paintlib.h spawn.h
btree.h form.h iostream patterns.h sqlp.h
CC.h freetypecap.h keyframe.h P_datetime.h stats.h
cdhc.h G3d.h kftypes.h PolimiFunct.h std_incs.h
cluster.h geom.h label_bm.h proto_dbmi.h symbol.h
codes.h gisdefs.h la.h P_site.h transform.h
colors.h gis.h lapack.h qtree.h vask.h
config-64.h glocale.h libtrans.h raster.h vbuildlib.h
config.h gmath.h linkm.h readsites.h vect
dataquad.h gprojects.h lock.h region_bm.h Vect.h
datetime.h graphics.h lrs.h rowio.h vedit.h
dbmi.h gstypes.h monitors.h rtree version.h
devlib.h gsurf.h N_gwflow.h rtree.h V_.h
dgl help.h N_heatflow.h search.h waterglobs.h
dgl.h ibtree.h N_pde.h segment.h winname.h
dig_atts.h icon_bm.h N_solute_transport.h shapefil.h

···


Hrachya Astsatryan
Head of HPC Laboratory,
Institute for Informatics and Automation Problems,
National Academy of Sciences of the Republic of Armenia
1, P. Sevak str., Yerevan 0014, Armenia
t: 374 10 284780
f: 374 10 285812
e: hrach@sci.am

Hi,

2012/1/21 Hrachya Astsatryan <hrach@sci.am>:

I don't see (see below) any Module.make after successful install the grass
from elgis repo.

I don't know about 6.4.1, 6.4.2 seems to install makefiles correctly

include/Make/Module.make

Martin

--
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa

2012/1/21 Martin Landa <landa.martin@gmail.com>:

I don't see (see below) any Module.make after successful install the grass
from elgis repo.

I don't know about 6.4.1, 6.4.2 seems to install makefiles correctly

include/Make/Module.make

it should be part of `grass-dev` package.

Martin

--
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa

Hi,

2012/1/21 Hrachya Astsatryan [<hrach@sci.am>](mailto:hrach@sci.am):

I don't see (see below) any Module.make after successful install the grass
from elgis repo.

I don't know about 6.4.1, 6.4.2 seems to install makefiles correctly

include/Make/Module.make

Martin

I have installed successfully the Grass via elgis.repo (see below)
[root@wn1 grass-6.4.1]# yum list|grep grass|more
grass.x86_64 6.4.1-2.el5.elgis installed
grass-devel.x86_64 6.4.1-2.el5.elgis installed
grass-libs.x86_64 6.4.1-2.el5.elgis installed

So What should I do else?

···


Hrachya Astsatryan
Head of HPC Laboratory,
Institute for Informatics and Automation Problems,
National Academy of Sciences of the Republic of Armenia
1, P. Sevak str., Yerevan 0014, Armenia
t: 374 10 284780
f: 374 10 285812
e: hrach@sci.am

Hi,

2012/1/21 Hrachya Astsatryan <hrach@sci.am>:

I have installed successfully the Grass via elgis.repo (see below)
[root@wn1 grass-6.4.1]# yum list|grep grass|more
grass.x86_64 6.4.1-2.el5.elgis
installed
grass-devel.x86_64 6.4.1-2.el5.elgis
installed
grass-libs.x86_64 6.4.1-2.el5.elgis
installed

So What should I do else?

well, GRASS 6.4.2 has been released yet, you could try to compile
GRASS [1] on your own or to wait for 6.4.2 release. Quick solution
could be to copy `Make` directory from SVN [2] to your `include`
directory. Anyway `grass-devel` seems to be incomplete in this repo.

Martin

[1] http://trac.osgeo.org/grass/wiki/BuildingOnUnix
[2] http://svn.osgeo.org/grass/grass/tags/release_20110412_grass_6_4_1/include/Make/

--
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa

Hi,

Juts now I installed CVN binary in the /usr/local/grass6.5.svn-x86_64-unknown-linux-gnu-21_01_2012, but when I compile i get the follwoing error

gcc -L/usr/local/grass6.5.svn-x86_64-unknown-linux-gnu-21_01_2012/lib -I/usr/local/grass6.5.svn-x86_64-unknown-linux-gnu-21_01_2012/include/grass/ 0o main main.c
main.c: In function ‘main’:
main.c:85: error: ‘PACKAGE’ undeclared (first use in this function)
main.c:85: error: (Each undeclared identifier is reported only once
main.c:85: error: for each function it appears in.)

Thank you in advanced,
Hrach

···


Hrachya Astsatryan
Head of HPC Laboratory,
Institute for Informatics and Automation Problems,
National Academy of Sciences of the Republic of Armenia
1, P. Sevak str., Yerevan 0014, Armenia
t: 374 10 284780
f: 374 10 285812
e: hrach@sci.am

After the compilation, r.example gives “Segmentation fault”

[root@wn1 r.example]# /usr/local/grass-6.4.2svn/bin/r.example
Segmentation fault

···


Hrachya Astsatryan
Head of HPC Laboratory,
Institute for Informatics and Automation Problems,
National Academy of Sciences of the Republic of Armenia
1, P. Sevak str., Yerevan 0014, Armenia
t: 374 10 284780
f: 374 10 285812
e: hrach@sci.am

Hi Hrachya,
make sure you started a valid grass session before you execute any
grass command.
Does only r.example segfault or any other command too?

Best
Soeren

Hint:
I would avoid to use the root account when working with grass ....

2012/1/21 Hrachya Astsatryan <hrach@sci.am>:

After the compilation, r.example gives "Segmentation fault"

[root@wn1 r.example]# /usr/local/grass-6.4.2svn/bin/r.example
Segmentation fault

On 1/21/12 11:03 PM, Martin Landa wrote:

Hi,

2012/1/21 Hrachya Astsatryan <hrach@sci.am>:

I have installed successfully the Grass via elgis.repo (see below)
[root@wn1 grass-6.4.1]# yum list|grep grass|more
grass.x86_64 6.4.1-2.el5.elgis
installed
grass-devel.x86_64 6.4.1-2.el5.elgis
installed
grass-libs.x86_64 6.4.1-2.el5.elgis
installed

So What should I do else?

well, GRASS 6.4.2 has been released yet, you could try to compile
GRASS [1] on your own or to wait for 6.4.2 release. Quick solution
could be to copy `Make` directory from SVN [2] to your `include`
directory. Anyway `grass-devel` seems to be incomplete in this repo.

Martin

[1] http://trac.osgeo.org/grass/wiki/BuildingOnUnix
[2]
http://svn.osgeo.org/grass/grass/tags/release_20110412_grass_6_4_1/include/Make/

--
Hrachya Astsatryan
Head of HPC Laboratory,
Institute for Informatics and Automation Problems,
National Academy of Sciences of the Republic of Armenia
1, P. Sevak str., Yerevan 0014, Armenia
t: 374 10 284780
f: 374 10 285812
e: hrach@sci.am

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Hi Hrachya,
make sure you started a valid grass session before you execute any
grass command.

Sorry I am beginner in GRASS, what do you mean “start a valid grass session”?

Thank yu in advanced,
Hrach

···


Hrachya Astsatryan
Head of HPC Laboratory,
Institute for Informatics and Automation Problems,
National Academy of Sciences of the Republic of Armenia
1, P. Sevak str., Yerevan 0014, Armenia
t: 374 10 284780
f: 374 10 285812
e: hrach@sci.am

I think that means to start grass, such as type “grass” into your command line and then go through the steps to select your location so as to start a grass session.

2012/1/22 Hrachya Astsatryan <hrach@sci.am>

On 1/22/12 12:57 AM, Sören Gebbert wrote:

Hi Hrachya,
make sure you started a valid grass session before you execute any
grass command.

Sorry I am beginner in GRASS, what do you mean “start a valid grass session”?

Thank yu in advanced,
Hrach

Does only r.example segfault or any other command too?

Best
Soeren

Hint:
I would avoid to use the root account when working with grass ....

2012/1/21 Hrachya Astsatryan [<hrach@sci.am>](mailto:hrach@sci.am):

After the compilation, r.example gives "Segmentation fault"

[root@wn1 r.example]# /usr/local/grass-6.4.2svn/bin/r.example
Segmentation fault

On 1/21/12 11:03 PM, Martin Landa wrote:

Hi,

2012/1/21 Hrachya Astsatryan [<hrach@sci.am>](mailto:hrach@sci.am):

I have installed successfully the Grass via elgis.repo (see below)
[root@wn1 grass-6.4.1]# yum list|grep grass|more
grass.x86_64                             6.4.1-2.el5.elgis
installed
grass-devel.x86_64                       6.4.1-2.el5.elgis
installed
grass-libs.x86_64                        6.4.1-2.el5.elgis
installed

So What should I do else?

well, GRASS 6.4.2 has been released yet, you could try to compile
GRASS [1] on your own or to wait for 6.4.2 release. Quick solution
could be to copy `Make` directory from SVN [2] to your `include`
directory. Anyway `grass-devel` seems to be incomplete in this repo.

Martin

[1] [http://trac.osgeo.org/grass/wiki/BuildingOnUnix](http://trac.osgeo.org/grass/wiki/BuildingOnUnix)
[2]
[http://svn.osgeo.org/grass/grass/tags/release_20110412_grass_6_4_1/include/Make/](http://svn.osgeo.org/grass/grass/tags/release_20110412_grass_6_4_1/include/Make/)

--
Hrachya Astsatryan
Head of HPC Laboratory,
Institute for Informatics and Automation Problems,
National Academy of Sciences of the Republic of Armenia
1, P. Sevak str., Yerevan 0014, Armenia
t: 374 10 284780
f: 374 10 285812
e: [hrach@sci.am](mailto:hrach@sci.am)

_______________________________________________
grass-user mailing list
[grass-user@lists.osgeo.org](mailto:grass-user@lists.osgeo.org)
[http://lists.osgeo.org/mailman/listinfo/grass-user](http://lists.osgeo.org/mailman/listinfo/grass-user)


Hrachya Astsatryan
Head of HPC Laboratory,
Institute for Informatics and Automation Problems,
National Academy of Sciences of the Republic of Armenia
1, P. Sevak str., Yerevan 0014, Armenia
t: 374 10 284780
f: 374 10 285812
e: hrach@sci.am


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

I think that means to start grass, such as type "grass" into your command

line and then go through the >steps to select your location so as to start a
grass session.

2012/1/22 Hrachya Astsatryan <[hidden email]>

   On 1/22/12 12:57 AM, Sören Gebbert wrote:

    Hi Hrachya,
    make sure you started a valid grass session before you execute any
    grass command.

   Sorry I am beginner in GRASS, what do you mean "start a valid grass
session"?

have a look for starting a grass session in

http://grass.osgeo.org/grass64/manuals/html64_user/helptext.html
http://grass.osgeo.org/grass64/manuals/html64_user/grass6.html
http://grass.osgeo.org/grass64/manuals/html64_user/index.html

Helmut

-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/GRASS-EXAMPLE-tp3884545p4217538.html
Sent from the Grass - Users mailing list archive at Nabble.com.

Dear all,

Thank you very much for your quick responses.
We are planing to write parallel codes by using GRASS functions.
So we don’t need to use any graphical interface.
So how can I run the r.example in the text mode?

With regards,
Hrach

···


Hrachya Astsatryan
Head of HPC Laboratory,
Institute for Informatics and Automation Problems,
National Academy of Sciences of the Republic of Armenia
1, P. Sevak str., Yerevan 0014, Armenia
t: 374 10 284780
f: 374 10 285812
e: hrach@sci.am