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

Dylan Beaudette dylan.beaudette at gmail.com
Thu May 17 18:47:36 EDT 2007


Hi Brent,

On Thursday 17 May 2007 11:45, Brent Wood wrote:
> Great article Dylan.
>
> The whole journal is a useful document.

I think that the new OSGeo Journal will be an excellent, central location for 
a lot of the really neat things people are doing with FOSS geographic 
software.

> Anyway, an update on where my OGR initiative is at...
>
> Frank W has implemented it in the CVS version, it will be a part of future
> GDAL/OGR releases. When I get a spare few hours (2008 maybe!) I'll tidy up
> the docs for the new GMT format, and get more examples (from the working
> code rather than trying to type in error free examples by hand :-)

This is fantastic news! I have been watching the GDAL list for a while and was 
getting curious. Since I too am rather busy these days, I might have to wait 
until it is officially released as opposed to trying CVS... Once I get a 
handle on the format, I might be able to contribute some documentation.

> Your  "v.ogr.out -f GMT" prediction may well have come true :-)

Well it was based on your project, so I wouldn't really call it a 
prediction.. :)

> All the extra attribute data is in the GMT file, as comments, so does not
> cause problems for existing GMT binaries, & is ready for use with any
> future GMT code which may make use of them, or with scripts to do so.

Excellent. If you have a copy of the text that the new driver creates, could 
you send me a sample off-list so I can take a look at it without having to 
upgrade to the CVS version.

> I'm using it pretty heavily already, like for a fish ID guide, to generate
> distribution maps for each species from locality data in Postgis, I can do
> something like this to generate some 1200 publication ready maps in 30
> minutes:
>
>
> #! /bin/bash
>
> # set a few parameters
> gmtset .....
>
> # set region, etc
> R=165/190/-58/-25
> PROJ=M8
>
> # generate list of species in the database
> psql -d fish_comm -F" " -Atc "select distinct species from station;" >
> spp.txt
>
> # draw map for each species
> while read SPP ; do
>   MAP=${SPP}.ps
>
>   ogr2ogr -f GMT $SPP -nln $SPP PG:dbname=fish_comm -sql "select from
> station where
> species='$SPP';"
>
>
>   # plot basemap
>   psbasemap -R$R -J$M ...  > $MAP
>
>   #plot location points
>   psxy ${SPP}.gmt ... >> $MAP
>
>   # plot coast
>   pscoast ...
>
>   # plot 1000m depth contour
>   psxy ...
>
>   # plot EEZ boundary
>   psxy ....
>
>   # convert to png for publication
>   psraster ...
>
>   #remove temp files
>   rm -f ${SPP}.gmt
>   rm -f $MAP
>
> done < spp.txt
>


wow. that is nice!

cheers,

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




More information about the grass-user mailing list