[GRASS-user] Tutorial & help needed::join tables (which arestored in postgres) and export result

Dylan Beaudette dylan.beaudette at gmail.com
Thu Aug 3 14:38:21 EDT 2006


How about using OGR as the go-between:

v.out.ogr in=xxx dsn="PG ...."

ogr2ogr "PG ...." grass/location/mapset/vector/... 

here is a prototype for exporting from postgis to shapefile, but obviously it 
could go between any OGR supported format (i think)

ogr2ogr file.shp PG:"dbname=ssurgo_combined user=xxxx password=xxxx host=xxxx" 
tablename

cheers,

Dylan

On Thursday 03 August 2006 11:08, Sampson, David wrote:
> Is it possible for GRASS to Write to postgres/postgis... I seem to
> remember something about read only and then you write to local grass.
>
> Can you clarify?
>
> Cheers
>
>
> -----Original Message-----
> From: grassuser-bounces at grass.itc.it
> [mailto:grassuser-bounces at grass.itc.it] On Behalf Of Dylan Beaudette
> Sent: August 3, 2006 14:03
> To: grassuser at grass.itc.it
> Cc: wqual
> Subject: Re: [GRASS-user] Tutorial & help needed::join tables (which
> arestored in postgres) and export result
>
> Quick reply, as I have not completely finished these documents --- but
> feel free to browse them here:
>
> http://casoilresource.lawr.ucdavis.edu/drupal/node/264
>
> there are some sample postgis queries which illustrate the use of
> spatial operations, attribute joins, and such.
>
> I am hoping to have a working set of my notes on interacting with
> USDA-NCSS soil survey (SSURGO and STATSGO) within PostGIS, GRASS, etc.
>
> I'll post an update when I make some changes.
>
> Cheers,
>
> Dylan
>
> On Thursday 03 August 2006 05:30, wqual wrote:
> > Dear list,
> > I am still testing, what kind of database I should use for my work
> > with GRASS/QGIS. As my experiences with sqlite3 where not that
> > positive (large datasets took very much time to be read into sqlite),
> > I started working with postgres (and my first impression is that it's
> > far more faster). dbf is quick, but does not offer me the possibility
> > to perform "table-join", which I need every day.
> > I am not that experienced with pg, therefore, I would like to ask you
> > folks some questions about "daily GIS work with postgres in GRASS":
> >
> > * How can I join pg-tables in GRASS, can I export a joined theme to
> > make it permanent (for example, I would like to create a shapefile out
> >
> > of it which contains all information of the join)
> >
> > * Does anybody has experience with pg-frontends like knoda and
>
> pg_admin?
>
> > Working with tables on the command-line is hard for people who used
> > *other
> > programmes* before ;)
> >
> > * what about large datasets: shapefiles with *qix-files seem to be
> > loaded faster compared the same theme in GRASS with its attributes in
> > postgres
> >
> > * tutorials available for this pg-stuff inside of GRASS?
> >
> > Any comments / hints are greatly appreciated!
> >
> > Best regards,
> > Wolfgang
> >
> > _______________________________________________
> > grassuser mailing list
> > grassuser at 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
>
> _______________________________________________
> grassuser mailing list
> grassuser at 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




More information about the grass-user mailing list