[GRASSLIST:662] Re: [GMT-HELP] Possible GMT driver for OGR
Dylan Beaudette
dylan.beaudette at gmail.com
Tue Apr 11 12:13:57 EDT 2006
Brent, Bruce, others:
I would like to second Bruce's comments. I have spent a great amount of time
writing small scripts to convert between shapfiles/GRASS vectors into GMT
vector format. While this has been an interesting challenge of my programming
abilities, I have long wished for GMT vector support in GDAL/OGR. I have been
considering writing commands specific to GRASS for dealing with vector/raster
output, and indeed, with the help of others, a nearly functioning raster
export tool is available for GRASS -- however a solution built-in to GDAL/OGR
would be optimal for obvious reasons.
In regard to Bruce's comment about how to best retain attributes: This has
prevented me from seeking a more general conversion of geodata into GMT,
requiring some sort of classification and symbolizing in GRASS and then
exporting to GMT vector format. Unless one could pre-classiffy a shapefile /
PGsql table, and then convert to GMT using that one classified attribute for
symbolizing features- things could get complicated. Bruce's idea to extend
the GMT format by including attributes on the flag line might be a good
approach... Another possible approach would involve GMT's other applications
reading other vector formats...
Cheers,
Dylan
On Tuesday 11 April 2006 08:40 am, Bruce Raup wrote:
> Hi Brent,
>
> I think it would be great to add the GMT multi-segment ascii file format
> to OGR. Others have pointed out that there are other tools for doing
> this, but having the format included in OGR would 1) save people from
> having to modify shpdump (a shapelib utility) or write a perl program
> using Geo::Shapelib (both of which I've done), and 2) elevate the GMT
> format, and therefore GMT, to higher visibility in the open source GIS
> world.
>
> The question arises about what to do about attributes. I have written my
> own utilities to translate between GMT and shapefile formats (both
> directions), putting the attributes on the "flag line" (usually starting
> with '>'). I know that the flag line is used for other purposes by
> various GMT programs (e.g. you can specify -G and -W options for psxy on a
> per-segment basis by putting them in the flag line), but perhaps a
> convention could be established for putting attributes on the flag line
> for the purposes of translating between GMT and other formats.
>
> Bruce
>
> On 2006-04-08 14:30 -0700, Brent Wood wrote:
> > Hi...
> >
> > I'm discussing the possibility of developing a GMT vector data driver for
> > OGR with a programmer interested in undertaking the work.
> >
> > I don't know how familiar GMT users are with OGR, it is the vector
> > equivalent of GDAL, and provides a vector translation/reformatter between
> > a range of vector formats. See
> > http://gdal.maptools.org/ogr/ogr_formats.html for some info.
> >
> > GDAL aleady supports GMT netCDF to a limited extent, and provides a
> > raster reformatting option.
> >
> > I'm interested in getting at least OGR shapefile and PostGIS support for
> > GMT, so that I can easily plot lines and contours from these in GMT, and
> > also convert contours generated by GMT into shapefiles & PostGIS tables.
> > I believe this would add some useful vector data management tools to
> > support GMT users.
> >
> > If anyone else is interested in such a capability, I'm interested in
> > hearing any wish lists or ideas whch could be included, as well as anyone
> > with a few $$ to help fund the development of the software.
> >
> >
> >
> > Thanks,
> >
> > Brent Wood
> >
> > To unsubscribe, send the message "signoff gmt-help" to
> > listserv at hawaii.edu
--
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341
More information about the grass-user
mailing list