<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html style="direction: ltr;">
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body style="direction: ltr;" bidimailui-charset-is-forced="true"
    bidimailui-detected-decoding-type="UTF-8" text="#000000"
    bgcolor="#ffffff">
    <p style="margin-bottom: 0cm; margin-top: 0pt;">On 04/07/2011 11:29,
      Pekka Hurskainen wrote:<br>
    </p>
    <blockquote
cite="mid:CAKuj5C0KabbM7S9-5GnmWZkjQtzPxvNMaf94CRSjq7RF9iawFw@mail.gmail.com"
      type="cite">
      <pre wrap="">Hello list,

Let's say I have a bunch of waypoints collected with a GPS device, and
uploaded to QGIS with GPSBabel in GPX-format. I have only four fields
in the GPX file which I want to keep (lat, lon, time, name).

Then I have an empty template shapefile, which has more fields
defined. Some of them has to be filled interactively in QGIS, some of
them will be filled by trigger functions in PostGIS. The point is that
the template shapefile has to match exactly the table definitions in
my PostGIS database, so that it is possible to append GPS datasets to
the database using PostGIS Manager plugin. I can't just spit the GPX
files straight to PostGIS.

The problem is how to "combine" the GPX points with the template. I've
tried to merge these two with fTools and mmqgis plugins, but these
both add all fields from both layers, which I don't want (there isn't
an option to choose fields). Also I haven't found any "append" tool
similar to ArcGIS in QGIS.

I know it's possible to overcome this with manually deleting the
unwanted fields, but I want to automate the process since this part
will be repeated hundreds of times.

Any ideas?

</pre>
    </blockquote>
    <br>
    Can you skip the shapefile step altogether and use ogr2ogr to go
    straight from gpx to PostGIS ?<br>
    ogr2ogr has an -append option to add new features to an existing
    layer, and a -select option to list which fields you want to insert
    into the target layer. <br>
    Then, with the new features already in PostGIS do your interactive
    editing as needed from QGIS.<br>
    <br>
    <br>
    <blockquote
cite="mid:CAKuj5C0KabbM7S9-5GnmWZkjQtzPxvNMaf94CRSjq7RF9iawFw@mail.gmail.com"
      type="cite">
      <pre wrap="">
Pekka Hurskainen
_______________________________________________
Qgis-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/qgis-user">http://lists.osgeo.org/mailman/listinfo/qgis-user</a>

This mail was received via Mail-SeCure System.


</pre>
    </blockquote>
    <br>
    <br>
    <div class="moz-signature">-- <br>
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div class="moz-signature">
        <meta http-equiv="content-type" content="text/html;
          charset=UTF-8">
        <title></title>
        <p style="margin-bottom: 0cm; margin-top: 0pt; float: right;"><img
            alt="Hevra Logo"
            src="cid:part1.08010000.04070605@arava.co.il" width="135"
            border="0" height="59"></p>
        <p style="margin-bottom: 0cm; margin-top: 0pt; direction: ltr;">Micha


          Silver</p>
        <p style="margin-bottom: 0cm; margin-top: 0pt; direction: ltr;">Arava


          Development Co</p>
        <p style="margin-bottom: 0cm; margin-top: 0pt; direction: ltr;">052-3665918</p>
        <p style="margin-bottom: 0cm; margin-top: 0pt; direction: ltr;"><a class="moz-txt-link-freetext" href="http://www.surfaces.co.il">http://www.surfaces.co.il</a></p>
      </div>
    </div>
  </body>
</html>