Hi Victor,
Thanks for the tip, yes it works at last!... except that the waypoint
identification field (IDENT) in the created gpx is empty as well as the
other fields, actually, except the X_proj and Y_proj .
And it doesn't solve the gpx uploading in qgis issue.
So somewhere information are lost during this saving phase.
But it gave me the idea of using comma separated text files to switch
between gpx files and qgis. It's the only way to keep all the fields
from one field's type to another one (a real mystery though).
So to resume:
1) if I start from a valid gpx file, I upload it withing dnrGarmin,
2) then I have the option to export it as a text file (which will be a
comma delimited one .txt) or as a projected shapefile.
2-1) if I choose the shapefile, then I can upload it easily within qgis
2-2) if I choose the .txt file, then I need to upload it with the
"add delimited text layer" and then save the new layer as a shape file
(why doing things easily when you can do them with more difficulties:-) )
If now, I start from a shapefile within qgis that i want to save
eventually as a gpx file to upload on my gps, I will save the shapefile
layer with the following options:
* format: comma separated value
* I give it a name (the csv extension will be added)
* encoding: system
* CRS: layer (which is New Zealand Traverse Mercator)
* OGR creation option: none
* skip attribute creation skipper: unchecked
And then I get a perfect cvs file, I just need to change its extention
(.txt) and load it with dnrgarmin.
It seems ok with my own compter (basic XP), I need to check it works
with XP pro (office laptop) and vista (student laptop). Apart that, it
seems to me a doable thing and faster that trying to fix this
/non-working-gpx thinggie/.
Laurence
On 7/03/2012 23:31, Bo Victor Thomsen wrote:
Laurence -
Try the following for saving a shape layer as a valid GPX file (tested
on QGIS 1.7.4/Windows 7-64 bit):
* In the dialog "Layers" right click the name of the shape layer you
want the save as a gpx file.
* Then left click on item "Save as...". This action will show a new
dialog: "Save vector layer as..."
* Under "Format" : Choose "GPS eXchange format [GPX]"
* Under "Save as": Write or browse the name for the new GPX file
* Leave "Encoding" as "System"
* Under CRS (upper dropdown): Choose "Selected CRS"
* Under CRS (lower textbox): Browse the CRS to: "WGS 84" (It's
*important* you choose "WGS 84"; the GPX format support*only* this
CRS, but QGIS will happily write your data in any CRS)
* If you have any unconventional GPX attributes in you data: Add
"GPX_USE_EXTENSIONS=yes" in the "Data source" textbox.
* Click on OK.
Regards
Bo Victor Thomsen
Aestas-GIS
Denmark
Den 07-03-2012 10:14, Laurence Béchet skrev:
Hi,
Thank you for the suggestion.
I did the test and of course the gpx created is not good, with a list
of error messages (not right values, like:
Error at file
C:\[...]\xerces-c-3.1.1-x86-windows-vc-10.0\bin/newtiti.gpx, line 76,
char 54
Message: value '1730878.68283692' must be less than maxExclusive
facet value '180.0'
If I start from an existing gpx file that passes the test (like
created with dnrgarmin or mapsource) and try to upload it within
Qgis, when I check the metadata of the layer property, the Layer
Spatial Reference System is not correct
*+proj=longlat *+datum=WGS84 +no_defs
If I upload in Qgis the same data created by dnrgarmin but under the
projected shapefile type, then the Layer Spatial Reference System is
correct
*+proj=tmerc* +lat_0=0 +lon_0=173 +k=0.9996 +x_0=1600000
+y_0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
*It's the general same issue: how do I force Qgis when uploading or
saving data in gpx file to use the correct Spatial reference system
(+proj)?*
How do other users do? Because I don't see the point of this software
if i cannot send my data from Qgis to my gps ...
Thank you
_______________________________________________
Qgis-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-user
_______________________________________________
Qgis-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-user