4

I am trying to make a shapefile line contain all the data that the GPX file has.

So i load the gpx file into Qgis, (prompts me for tracks, waypoints, trackpoints, routes, etc)

When i choose "Tracks" the attribute table is empty, just one feature, yet when i choose "Track Points" all the data is in the attribute table ( elevation, time, etc )

I would like to be able to make a shapefile line that contains the trackpoint data. I tried selecting both the track and trackpoint gpx layer together, and then 'save as" a shapefile. when i do, it only seems to save one, either just the track, or just the trackpoints as a shapefile.

The conversion to shapefile goes well when saving each gpx layer separately, ... so lets say i have Shapefile.line ( no attributes ) and Shapefile.point ( full attribute table ) . How can i import the data from .point into . line ?

I have tried to merge them, but had no success.

Using Qgis Dufour, on Ubuntu 14.04lts, Gps Garmin Monterra


I have tried the plugin mentioned and have gotten some results, but the resulting line shapefile did not contain any of the information in the attribute table.

Is there not a way to just copy the attribute table from one shapefile, and paste it into another? I have found a way to copy the table to my clipboard, but have not found a way to paste it to another.

( im working on a road, i want my shapefile to appear as a line but contain attribute table information from trackpoint shapefile, both shapefiles were generated by the same GPX file )

Here is a screenshot of both attribute tables, i would like C Mainline to contain all the data from Mainline points

enter image description here

2

The typical GIS way of doing this is using a prebuilt tool or script to convert point layer data to a line layer. Some key web search phrases you may use to find these tools or scripts are "covert points to lines" or "connect the dots". Here is one plug-in you may try:

https://plugins.qgis.org/plugins/pointstopaths_v02/

If you want to get the attribute info in the new line layer you will have to associate the line segments ID field with the other table related ID field that has the attributes. This process is know as joining. Once the segment info table is joined to the line layer you will need to export out a new layer for the attributes to be kept.

  • i cannot find a way to get that plugin to produce a table or track that is adequate. Table is always empty by comparison. is there a way to merge the dbf files using libreoffice? – downwithgov Feb 6 '16 at 19:07
  • As I noted you will have to join any related track info to the line layer by common id field. Alternativly, you could manually edit and add in the attributes within the GIS software. I would not recommend editing the dbf in libre once you save the file in there it may change the formatting and cause the shp to be corrupt. – artwork21 Feb 6 '16 at 22:31
2

I'm afraid you are expecting too much. The point data has attributes for every point (coordinates, time, elevation, speed etc), one row for every point.

The line file can only have one row of data for every line element. Since you only have one line, you can only have one row in the attribute table. You can not expect to have all point coordinates or elevations collected in that single row. You may have a common feature of all points in the line table, like the recording date.

It only works the other way round: You can add line attributes to point data. But not vice versa.

1

It sounds like you have a multipoint feature. You'll need to convert the multipoint feature (one feature, multiple points) into a point feature (multiple features, multiple points).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.