Micha, Richard. Thank you very much for the help.
Pablo Torres Carreira > Date: Fri, 22 Oct 2010 08:34:50 +1100 > From: [email protected] > To: [email protected] > Subject: [GRASS-user] Re: Change database type (Micha Silver) > > On 22/10/10 8:12 AM, [email protected] wrote: > > Send grass-user mailing list submissions to > > [email protected] > > > > To subscribe or unsubscribe via the World Wide Web, visit > > http://lists.osgeo.org/mailman/listinfo/grass-user > > or, via email, send a message with subject or body 'help' to > > [email protected] > > > > You can reach the person managing the list at > > [email protected] > > > > When replying, please edit your Subject line so it is more specific > > than "Re: Contents of grass-user digest..." > > > > > > Today's Topics: > > > > 1. Change database type (Pablo Carreira) > > 2. v.in.ogr and g.region trouble coordenate (Ricardo Rodr?guez) > > 3. Re: Change database type (Micha Silver) > > 4. Re: v.in.ogr and g.region trouble coordenate (Micha Silver) > > 5. nviz_cmd problem winGrass6.5 - 7.0 (M.Onur Kurum) > > > > > > ---------------------------------------------------------------------- > > > > Message: 1 > > Date: Thu, 21 Oct 2010 15:23:15 -0200 > > From: Pablo Carreira<[email protected]> > > Subject: [GRASS-user] Change database type > > To:<[email protected]> > > Message-ID:<[email protected]> > > Content-Type: text/plain; charset="iso-8859-1" > > > > > > Hi, > > > > I have many vectors with tables and now I want to change my database from > > sqlite to pgsql.I ran db.connect. And now I need to copy all the tables > > from sqlite to pgsql.Is there an easy way to do that? > > Thanks. > > Pablo Torres Carreira > > > > > > > > -------------- next part -------------- > > An HTML attachment was scrubbed... > > URL: > > http://lists.osgeo.org/pipermail/grass-user/attachments/20101021/4ad2cda2/attachment-0001.html > > > > ------------------------------ > > > > Message: 2 > > Date: Thu, 21 Oct 2010 15:19:17 -0500 > > From: Ricardo Rodr?guez<[email protected]> > > Subject: [GRASS-user] v.in.ogr and g.region trouble coordenate > > To: [email protected] > > Message-ID: > > <[email protected]> > > Content-Type: text/plain; charset="iso-8859-1" > > > > hello. > > how to make g.region and v.in.ogr use the same projection that an incoming > > file. since at run-d g.region v.in.ogr and maintaining the coordinates but > > not the coordinate system, given the same coordinate system of the lease, > > what should I do to keep your incoming file coordinate system . > > > > > > thanks for your help and attention > > > > Ricardo RodrÃguez > > Univalle > > -------------- next part -------------- > > An HTML attachment was scrubbed... > > URL: > > http://lists.osgeo.org/pipermail/grass-user/attachments/20101021/3ae60005/attachment-0001.html > > > > ------------------------------ > > > > Message: 3 > > Date: Thu, 21 Oct 2010 22:38:01 +0200 > > From: Micha Silver<[email protected]> > > Subject: Re: [GRASS-user] Change database type > > To: Pablo Carreira<[email protected]> > > Cc: [email protected] > > Message-ID:<[email protected]> > > Content-Type: text/plain; charset="iso-8859-1" > > > > On 10/21/2010 07:23 PM, Pablo Carreira wrote: > >> Hi, > >> > >> > >> I have many vectors with tables and now I want to change my database > >> from sqlite to pgsql. > >> I ran db.connect. And now I need to copy all the tables from sqlite to > >> pgsql. > >> Is there an easy way to do that? > >> > > Once you've set the database connection params, then g.copy will create > > a new vector with the attributes pushed into the new database. So you > > could loop thru all vectors something like: > > for v in `g.mlist vect`; do > > g.rename vect=$v,$v_sqlite # rename to temporary name > > g.copy vect=$v_sqlite,$v # copy back to original name, but > > pgsql tables will be created > > done > > > > If everything looks good, then you can remove all the vectors *_sqlite: > > g.remove vect=`g.mlist vect sep=, pat="*_sqlite"` > > > >> Thanks. > >> > >> Pablo Torres Carreira > >> > >> > >> > >> This mail was received via Mail-SeCure System. > >> > >> > >> _______________________________________________ > >> grass-user mailing list > >> [email protected] > >> http://lists.osgeo.org/mailman/listinfo/grass-user > >> > >> This mail was received via Mail-SeCure System. > >> > >> > >> > Alternatively, if you want to keep the two separate, create a new > mapset, set the database connection in the new mapset, and copy the maps > from old mapset to new. > > Hence, in the new mapset: > > for i in `g.list vect mapset=<oldmapset>`; do > g.copy vect=$i"@<oldmapset",$i > done > > Often if I am going to be working away from the MySQL server, I do this > to create a copy with a dbf connection. > > Cheers, > Richard > > > > > _______________________________________________ > grass-user mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/grass-user
_______________________________________________ grass-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-user
