[GRASS-user] Re: [GMT-HELP] Some ideas on GRASS-GMT integration

On Thursday 17 May 2007 05:15, Tim Michelsen wrote:

Dylan,

> On Tuesday 15 May 2007 12:13, Tim Michelsen wrote:
>> Hello Dylan,
>>
>>> http://www.osgeo.org/files/journal/final_pdfs/OSGeo_vol1_GRASS-GMT.pdf
>>
>> Can tell you how much I was waiting for this one!
>> Hopefully I will learn how to publish publication-quality maps. GIS
>> tools I have used so far didn't allow it very easily... and leaning to
>> be a GMT wizzard isn't easy although it is well documented throughout
>> the tutorials. So, my conformation on your introduction.
>
> Thanks for the comments!

allow me one more additional comment.
You did mention the python interface and recomended it as a good way to
program a interface for GRASS-GMT interaction.

I am not a coder but once stumbled accross the basemap class of python
matplotlib:
http://matplotlib.sourceforge.net/matplotlib.toolkits.basemap.basemap.html

I don't know whether this is a full implementation of GMT in Python but
seems to use part of its logic.

Thanks for the ideas Tim. Paul has responded to this downstream, but I just
wanted to mention that I was referring to the GRASS-Python bindings in my
previous correspondence and article.

However, it looks like it may soon be possible with GMT 5 to glue both GRASS
and GMT together with python!! that would be something!

cheers,

--
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341

Dylan,

This would be awesome: "… looks like it may soon be possible with GMT 5 to glue both GRASS and GMT together with
python…" — one of the *unfounded" criticisms of GRASS is it's inability to produce nice publication quality maps. Well,
this would lay that myth completely to rest.

Tom

----- Original Message -----
From: Dylan Beaudette <dylan.beaudette@gmail.com>
Date: Thursday, May 17, 2007 2:15 pm
Subject: [GRASS-user] Re: [GMT-HELP] Some ideas on GRASS-GMT integration

On Thursday 17 May 2007 05:15, Tim Michelsen wrote:
> Dylan,
>
> > On Tuesday 15 May 2007 12:13, Tim Michelsen wrote:
> >> Hello Dylan,
> >>
> >>>
http://www.osgeo.org/files/journal/final_pdfs/OSGeo_vol1_GRASS-GMT.pdf
> >>
> >> Can tell you how much I was waiting for this one!
> >> Hopefully I will learn how to publish publication-quality
maps. GIS
> >> tools I have used so far didn't allow it very easily... and
leaning to
> >> be a GMT wizzard isn't easy although it is well documented
throughout> >> the tutorials. So, my conformation on your
introduction.> >
> > Thanks for the comments!
>
> allow me one more additional comment.
> You did mention the python interface and recomended it as a good
way to
> program a interface for GRASS-GMT interaction.
>
> I am not a coder but once stumbled accross the basemap class of
python> matplotlib:
>
http://matplotlib.sourceforge.net/matplotlib.toolkits.basemap.basemap.html&gt;
> I don't know whether this is a full implementation of GMT in
Python but
> seems to use part of its logic.
>
>

Thanks for the ideas Tim. Paul has responded to this downstream,
but I just
wanted to mention that I was referring to the GRASS-Python bindings
in my
previous correspondence and article.

However, it looks like it may soon be possible with GMT 5 to glue
both GRASS
and GMT together with python!! that would be something!

cheers,

--
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341

_______________________________________________
grassuser mailing list
grassuser@grass.itc.it
http://grass.itc.it/mailman/listinfo/grassuser

Hi Tom,

On Thursday 17 May 2007 14:45, Thomas.Adams@noaa.gov wrote:

Dylan,

This would be awesome: "… looks like it may soon be possible with GMT 5 to
glue both GRASS and GMT together with python…" — one of the *unfounded"
criticisms of GRASS is it's inability to produce nice publication quality
maps. Well, this would lay that myth completely to rest.

Tom

Indeed. If I can get a little bit of help on working with the python-GRASS
bindings I might be able to post a follow-up article detailing how this will
work.

cheers,

Dylan

----- Original Message -----
From: Dylan Beaudette <dylan.beaudette@gmail.com>
Date: Thursday, May 17, 2007 2:15 pm
Subject: [GRASS-user] Re: [GMT-HELP] Some ideas on GRASS-GMT integration

> On Thursday 17 May 2007 05:15, Tim Michelsen wrote:
> > Dylan,
> >
> > > On Tuesday 15 May 2007 12:13, Tim Michelsen wrote:
> > >> Hello Dylan,
>
> http://www.osgeo.org/files/journal/final_pdfs/OSGeo_vol1_GRASS-GMT.pdf
>
> > >> Can tell you how much I was waiting for this one!
> > >> Hopefully I will learn how to publish publication-quality
>
> maps. GIS
>
> > >> tools I have used so far didn't allow it very easily... and
>
> leaning to
>
> > >> be a GMT wizzard isn't easy although it is well documented
>
> throughout> >> the tutorials. So, my conformation on your
> introduction.> >
>
> > > Thanks for the comments!
> >
> > allow me one more additional comment.
> > You did mention the python interface and recomended it as a good
>
> way to
>
> > program a interface for GRASS-GMT interaction.
> >
> > I am not a coder but once stumbled accross the basemap class of
>
> python> matplotlib:
>
> http://matplotlib.sourceforge.net/matplotlib.toolkits.basemap.basemap.htm
>l>
>
> > I don't know whether this is a full implementation of GMT in
>
> Python but
>
> > seems to use part of its logic.
>
> Thanks for the ideas Tim. Paul has responded to this downstream,
> but I just
> wanted to mention that I was referring to the GRASS-Python bindings
> in my
> previous correspondence and article.
>
> However, it looks like it may soon be possible with GMT 5 to glue
> both GRASS
> and GMT together with python!! that would be something!
>
> cheers,
>
> --
> Dylan Beaudette
> Soils and Biogeochemistry Graduate Group
> University of California at Davis
> 530.754.7341
>
> _______________________________________________
> grassuser mailing list
> grassuser@grass.itc.it
> http://grass.itc.it/mailman/listinfo/grassuser

--
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341

Dylan,

I wish I knew some Python, as I would like to be able to help. I hope to contribute some GRASS modules this year related to some of the work I do.

Regards,
Tom

Dylan Beaudette wrote:

Hi Tom,

On Thursday 17 May 2007 14:45, Thomas.Adams@noaa.gov wrote:
  

Dylan,

This would be awesome: "… looks like it may soon be possible with GMT 5 to
glue both GRASS and GMT together with python…" — one of the *unfounded"
criticisms of GRASS is it's inability to produce nice publication quality
maps. Well, this would lay that myth completely to rest.

Tom
    
Indeed. If I can get a little bit of help on working with the python-GRASS bindings I might be able to post a follow-up article detailing how this will work.

cheers,

Dylan

----- Original Message -----
From: Dylan Beaudette <dylan.beaudette@gmail.com>
Date: Thursday, May 17, 2007 2:15 pm
Subject: [GRASS-user] Re: [GMT-HELP] Some ideas on GRASS-GMT integration

On Thursday 17 May 2007 05:15, Tim Michelsen wrote:
      

Dylan,

On Tuesday 15 May 2007 12:13, Tim Michelsen wrote:
          

Hello Dylan,
            

http://www.osgeo.org/files/journal/final_pdfs/OSGeo_vol1_GRASS-GMT.pdf

Can tell you how much I was waiting for this one!
Hopefully I will learn how to publish publication-quality
            

maps. GIS

tools I have used so far didn't allow it very easily... and
            

leaning to

be a GMT wizzard isn't easy although it is well documented
            

throughout> >> the tutorials. So, my conformation on your
introduction.> >

Thanks for the comments!
          

allow me one more additional comment.
You did mention the python interface and recomended it as a good
        

way to

program a interface for GRASS-GMT interaction.

I am not a coder but once stumbled accross the basemap class of
        

python> matplotlib:

http://matplotlib.sourceforge.net/matplotlib.toolkits.basemap.basemap.htm
l>

I don't know whether this is a full implementation of GMT in
        

Python but

seems to use part of its logic.
        

Thanks for the ideas Tim. Paul has responded to this downstream,
but I just
wanted to mention that I was referring to the GRASS-Python bindings
in my
previous correspondence and article.

However, it looks like it may soon be possible with GMT 5 to glue
both GRASS
and GMT together with python!! that would be something!

cheers,

--
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341

_______________________________________________
grassuser mailing list
grassuser@grass.itc.it
http://grass.itc.it/mailman/listinfo/grassuser
      
--
Thomas E Adams
National Weather Service
Ohio River Forecast Center
1901 South State Route 134
Wilmington, OH 45177

EMAIL: thomas.adams@noaa.gov

VOICE: 937-383-0528
FAX: 937-383-0033

Thomas Adams wrote:

I wish I knew some Python, as I would like to be able to help. I hope
to contribute some GRASS modules this year related to some of the
work I do.

There is a nice 10 minute tutorial for programmers of other languages here:
  http://www.poromenos.org/tutorials/python

To use the GRASS SWIG/Python interface to libgis:
(work in progress; you can do most things with modules without this)

$ cd /usr/src/grass63/swig/python
$ make

GRASS> cd /usr/src/grass63/swig/python
GRASS> python
..

import os, sys
import python_grass6 as pyg6

pyg6.G_gisinit('')

mapset=pyg6.G_mapset()
print mapset

user1

print pyg6.G_database_unit_name(1)

meters

print pyg6.G_database_projection_name()

UTM

print pyg6.G_database_datum_name()

nad27

pyg6.G_yes("Does it work?", 1)

Does it work?(y/n) [y] y
1

print pyg6.G_getenv("GRASS_GUI")

text

Hamish

Python is pretty easy to learn and much easier to work with than shell
scripting. There are some very good books that can get you started.

Michael

On 5/21/07 4:43 AM, "Thomas Adams" <Thomas.Adams@noaa.gov> wrote:

Dylan,

I wish I knew some Python, as I would like to be able to help. I hope to
contribute some GRASS modules this year related to some of the work I do.

Regards,
Tom

__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

I wish I knew some Python, as I would like to be able to help. I hope to contribute some GRASS modules this year related to some of the work I do.

Well, I am just in the same situation as you here...

But seems that so many applications are using Python now or are shifting towards it...

Some guy of your organization did some work on it, too:
http://www.cdc.noaa.gov/people/jeffrey.s.whitaker/python/gmt/gmt-src/doc/html/public/gmt.gmt-module.html

thanks for the pointers Hamish. I will have to look into this some more.

Anyone else have some experience with the SWIG/python stuff?

cheers,

dylan

On Monday 21 May 2007 06:18, Hamish wrote:

Thomas Adams wrote:
> I wish I knew some Python, as I would like to be able to help. I hope
> to contribute some GRASS modules this year related to some of the
> work I do.

There is a nice 10 minute tutorial for programmers of other languages here:
  http://www.poromenos.org/tutorials/python

To use the GRASS SWIG/Python interface to libgis:
(work in progress; you can do most things with modules without this)

$ cd /usr/src/grass63/swig/python
$ make

GRASS> cd /usr/src/grass63/swig/python
GRASS> python
..

>>> import os, sys
>>> import python_grass6 as pyg6
>>>
>>> pyg6.G_gisinit('')
>>>
>>> mapset=pyg6.G_mapset()
>>> print mapset

user1

>>> print pyg6.G_database_unit_name(1)

meters

>>> print pyg6.G_database_projection_name()

UTM

>>> print pyg6.G_database_datum_name()

nad27

>>> pyg6.G_yes("Does it work?", 1)

Does it work?(y/n) [y] y
1

>>> print pyg6.G_getenv("GRASS_GUI")

text

Hamish

_______________________________________________
grassuser mailing list
grassuser@grass.itc.it
http://grass.itc.it/mailman/listinfo/grassuser

--
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341