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