<html><head><style type="text/css">body {word-wrap: break-word; background-color:#ffffff;}</style></head><body><div style="font-family: sans-serif; font-size: 16px">Richard,<br>Yeah... Merge might not be the right word. I'm importing a lot of files downloaded from the USGS site, for example, state boundaries. There are 6 separate files, but I want them all to go into the same database table/map layer. The import vector function always wants to put each import into its own table/layer.<br><br>Thom<br><br><font face="sans-serif"><span style="font-size: 14px"><i><font color="#333333">Sent via DROID on Verizon Wireless</font></i></span></font></div><br><br>-----Original message-----<br><blockquote style="; border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><div style="font-family: sans-serif; font-size: 14px"><b>From: </b>Richard Chirgwin &lt;rchirgwin@ozemail.com.au&gt;<b><br>To: </b>Thom DeCarlo &lt;pixelpusher@cox.net&gt;<b><br>Cc: </b>grass-user@lists.osgeo.org<b><br>Sent: </b>2010 Sep, Fri, 24 21:46:26 GMT+00:00<b><br>Subject: </b>Re: [GRASS-user] Connecting GRASS to a MySQL database?<br><br></div><div>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  
  <div bgcolor="#ffffff" text="#000000">
    It depends on what you mean by "merge".<br>
    <br>
    v.patch is the "official" tool to merge two vectors, but you could
    use v.overlay (option=or). <br>
    <br>
    Richard<br>
    <br>
    On 24/09/10 10:56 PM, Thom DeCarlo wrote:
    <blockquote cite="mid:98649a01-79bc-4e50-b963-393351ffb0fc@blur"
      type="cite">
      <style type="text/css">body {word-wrap: break-word; background-color:#ffffff;}</style>
      <div style="font-family: sans-serif; font-size: 16px;">Richard,<br>
        Thanks! That was exactly the information I needed. <br>
        <br>
        Now to figure out how to merge layers...<br>
        <br>
        Thom<br>
        <br>
        <font face="sans-serif"><span style="font-size: 14px;"><i><font
                color="#333333">Sent via DROID on Verizon Wireless</font></i></span></font></div>
      <br>
      <br>
      -----Original message-----<br>
      <blockquote style="border-left: 2px solid rgb(16, 16, 255);
        margin-left: 5px; padding-left: 5px;">
        <div style="font-family: sans-serif; font-size: 14px;"><b>From:
          </b>Richard Chirgwin <a class="moz-txt-link-rfc2396E" href="mailto:rchirgwin@ozemail.com.au">&lt;rchirgwin@ozemail.com.au&gt;</a><b><br>
            To: </b><a class="moz-txt-link-abbreviated" href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><b><br>
            Sent: </b>2010 Sep, Thu, 23 07:20:51 GMT+00:00<b><br>
            Subject: </b>Re: [GRASS-user] Connecting GRASS to a MySQL
          database?<br>
          <br>
        </div>
        On 23/09/10 5:13 PM, <a class="moz-txt-link-abbreviated" href="mailto:grass-user-request@lists.osgeo.org">grass-user-request@lists.osgeo.org</a> wrote:<br>
        &gt; Message: 3<br>
        &gt; Date: Wed, 22 Sep 2010 16:51:08 -0400 (EDT)<br>
        &gt; From: PixelPusher<pixelpusher@cox.net><br>
          &gt; Subject: [GRASS-user] Connecting GRASS to a MySQL
          database?<br>
          &gt; <a class="moz-txt-link-abbreviated" href="mailto:To:grass-user@lists.osgeo.org">To:grass-user@lists.osgeo.org</a><br>
          &gt; Message-ID:<cbcc5e.5f72.12b3b36ce33.webtop.0@cox.net><br>
            &gt; Content-Type: text/plain; charset=UTF-8; format=flowed;
            delsp=no<br>
            &gt;<br>
            &gt; Sorry for the n00bish question, but I'm confused by the
            GRASS on-line<br>
            &gt; docs.<br>
            &gt;<br>
            &gt; I have a MySQL database running on my local computer.
            Let's say that the<br>
            &gt; MySQL user name is TRD and he has access to a database
            called TRD where<br>
            &gt; I want to store my StateBoundaries table.<br>
            &gt;<br>
            &gt; I can start the GRASS (6.4.0) Python interface and
            select<br>
            &gt; "Database-&gt;Manage Databases-&gt;Connect" from the
            pulldown menu. I am then<br>
            &gt; faced with the choice of driver, where I select
            "mysql". But, then it<br>
            &gt; needs the Database name. This is where I get lost. The
            string in the<br>
            &gt; text field says,
            "$GISDBASE/$LOCATION_NAME/$MAPSET/TRD". I'm not sure<br>
            &gt; where GRASS is getting the values that substitute for
            those things that<br>
            &gt; look like script variables. I guess the
            "$LOCATION_NAME" and "$MAPSET"<br>
            &gt; come from the location and mapset that I selected when
            GRASS started.<br>
            &gt; But, where is "$GISDBASE" set?<br>
            &gt;<br>
            &gt; I also step through the log in process by setting the
            appropriate user<br>
            &gt; name and password. I know that I can use this
            combination to access the<br>
            &gt; MySQL database through its command line interface.<br>
            &gt;<br>
            &gt; The next thing I do is try to test the connection.
            However, this results<br>
            &gt; in lots of errors like, "Cannot connect to MySQL,
            Access denied for<br>
            &gt; user" and "ERROR: Unable to open database<br>
            &gt; &lt;$GISDBASE/$LOCATION_NAME/$MAPSET/TRD&gt;". It looks
            like GRASS is not<br>
            &gt; using the right username and password and not doing the
            variable<br>
            &gt; substitution that I was expecting.<br>
            &gt;<br>
            &gt; Can anoyone give me some hints on how to get this thing
            started?<br>
            &gt;<br>
            &gt; Thanks!<br>
            &gt; Thom<br>
            Thom,<br>
            <br>
            Having taught a few people how to use Grass-GIS, I can say
            that database parameters confuse a great many of them!<br>
            <br>
            The parameters you see are for the default dbf driver
            (Grass-GIS uses this driver as the default for any new
            mapset). For MySQL, you provide the database location, and
            also login.<br>
            <br>
            So where you see the $GISDBASE/$LOCATION_NAME/$MAPSET/dbf/
            string, you want:<br>
            database=host=<ip address="">,dbname=TRD<br>
              <br>
              But you'll also have to login. Eg (command line):<br>
              <br>
              db.login user=TRD password="somepassword"<br>
              <br>
              (the inverted commas are needed at the command line but
              not using the GUI)<br>
              <br>
              Notes:<br>
              <br>
              1. From now on, every map you make in this particular
              mapset will use the MySQL database as its default
              connection. Don't try to mix different database drivers
              within a mapset - you'll get a headache!<br>
              <br>
              2. Database parameters are stored only within the mapset
              you're using. If you want to connect a different mapset to
              MySQL, you have to set its connection.<br>
              <br>
              Richard Chirgwin<br>
              _______________________________________________<br>
              grass-user mailing list<br>
              <a class="moz-txt-link-abbreviated" href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
              <a moz-do-not-send="true"
                href="http://lists.osgeo.org/mailman/listinfo/grass-user">http://lists.osgeo.org/mailman/listinfo/grass-user</a><br>
            </ip></cbcc5e.5f72.12b3b36ce33.webtop.0@cox.net></pixelpusher@cox.net></blockquote>
    </blockquote>
    <br>
  </div>


</div></blockquote></body></html>