<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi Victor,<br>
    <br>
    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
    .<br>
    And it doesn't solve the gpx uploading in qgis issue.<br>
    So somewhere information are lost during this saving phase.<br>
    <br>
    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).<br>
    <br>
    So to resume: <br>
    1) if I start from a valid gpx file, I upload it withing dnrGarmin,
    <br>
    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.<br>
        2-1) if I choose the shapefile, then I can upload it easily
    within qgis<br>
        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<span class="moz-smiley-s1"><span> :-) </span></span>)<br>
    <br>
    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:<br>
    * format: comma separated value<br>
    * I give it a name (the csv extension will be added)<br>
    * encoding: system<br>
    * CRS: layer (which is New Zealand Traverse Mercator)<br>
    * OGR creation option: none<br>
    * skip attribute creation skipper: unchecked<br>
    <br>
    And then I get a perfect cvs file, I just need to change its
    extention (.txt) and load it with dnrgarmin.<br>
    <br>
    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 <i>non-working-gpx
      thinggie</i>.<br>
    <br>
    Laurence<br>
    <br>
    On 7/03/2012 23:31, Bo Victor Thomsen wrote:
    <blockquote cite="mid:4F5738FF.4080101@gmail.com" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      Laurence -<br>
      <br>
      Try the following for saving a shape layer as a valid GPX file
      (tested on QGIS 1.7.4/Windows 7-64 bit):<br>
      <ul>
        <li>In the dialog "Layers" right click the name of the shape
          layer you want the save as a gpx file. <br>
        </li>
        <li>Then left click on item "Save as...". This action will show
          a new dialog: "Save vector layer as..."</li>
        <li>Under "Format" : Choose "GPS eXchange format [GPX]"</li>
        <li>Under "Save as": Write or browse the name for the new GPX
          file</li>
        <li>Leave "Encoding" as "System"</li>
        <li>Under CRS (upper dropdown): Choose "Selected CRS"</li>
        <li>Under CRS (lower textbox): Browse the CRS to: "WGS 84" (It's
          <b>important</b> you choose "WGS 84"; the GPX format support<b>
            only</b> this CRS, but QGIS will happily write your data in
          any CRS) <br>
        </li>
        <li>If you have any unconventional GPX attributes in you data:
          Add "GPX_USE_EXTENSIONS=yes" in the "Data source" textbox.</li>
        <li>Click on OK.</li>
      </ul>
      Regards <br>
      Bo Victor Thomsen<br>
      Aestas-GIS<br>
      Denmark<br>
      <br>
      Den 07-03-2012 10:14, Laurence Béchet skrev:
      <blockquote cite="mid:4F5726E2.7000203@gmail.com" type="cite">
        <meta content="text/html; charset=ISO-8859-1"
          http-equiv="Content-Type">
        Hi,<br>
        Thank you for the suggestion.<br>
        <br>
        I did the test and of course the gpx created is not good, with a
        list of error messages (not right values, like:<br>
        Error at file
        C:\[...]\xerces-c-3.1.1-x86-windows-vc-10.0\bin/newtiti.gpx,
        line 76, char 54<br>
          Message: value '1730878.68283692' must be less than
        maxExclusive facet value '180.0'<br>
        <br>
        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<br>
        <font color="#cc0000"><b>+proj=longlat </b></font>+datum=WGS84
        +no_defs<br>
        <br>
        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<br>
        <b><font color="#33cc00">+proj=tmerc</font></b> +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<br>
        <br>
        <b>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)?</b><br>
        <br>
        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 ...<br>
        <br>
        Thank you<br>
      </blockquote>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
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>
</pre>
    </blockquote>
  </body>
</html>