On 04/07/2011 11:29, Pekka Hurskainen wrote:

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?


Can you skip the shapefile step altogether and use ogr2ogr to go straight from gpx to PostGIS ?
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.
Then, with the new features already in PostGIS do your interactive editing as needed from QGIS.


Pekka Hurskainen
_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

This mail was received via Mail-SeCure System.




--

Hevra Logo

Micha Silver

Arava Development Co

052-3665918

http://www.surfaces.co.il

_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to