<html style="direction: ltr;">
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
    <style type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
  </head>
  <body style="direction: ltr;" bidimailui-charset-is-forced="true"
    text="#000000" bgcolor="#FFFFFF">
    (cc-ing to the GRASS user's list for future archiving and additional
    help)<br>
    <br>
    <div class="moz-cite-prefix">On 12/18/2015 03:08 AM, Szilard Albert
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAF=LnqxxbDUDnY4p4H16oE-GXK1cgzBBcKwkXfYGViLk79a9Ng@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>
              <div>
                <div>
                  <div>
                    <div>
                      <div>
                        <div>
                          <div>
                            <div>Hello,<br>
                              <br>
                            </div>
                            I decided to go down the GRASS path, I got
                            some problems though right at the beginning
                            when trying to import my points, after <br>
                          </div>
                          <div>loading my DEM.<br>
                          </div>
                          Initially I thought the issue might be
                          something to do with the fact that I have my
                          DEM coordinates as Lat/Lon degrees, and point
                          coordinates as East/North in meters. I
                          probably need to work on the projection setup.<br>
                        </div>
                        <div><br>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    Always when importing data into GRASS you must have the LOCATION
    coordinate system the same as the input data. If your DEM is
    Long/Lat, then <br>
    <ul>
      <li>create a LOCATION with Long/lat CRS, and import that raster.</li>
      <li>Next create a new LOCATION with the same CRS as your points
        and import the points into that LOCATION.</li>
      <li>Now switch back to the Long/Lat LOCATION (with the module <tt>g.mapset...</tt>)
        <br>
      </li>
      <li>and reproject the points to this Long/Lat CRS with <tt>v.proj...
          <br>
        </tt></li>
    </ul>
    <br>
    <tt></tt><br>
    <blockquote
cite="mid:CAF=LnqxxbDUDnY4p4H16oE-GXK1cgzBBcKwkXfYGViLk79a9Ng@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>
              <div>
                <div>
                  <div>
                    <div>
                      <div>However, also tried loading the points in a
                        brand new project with no DEM, similar errors.<br>
                        <br>
                      </div>
                      My X and Y values are in column 4 and 5, with the
                      column separators being spaces (and double/triple
                      spaces). I would like to<br>
                    </div>
                    keep my input files as they are. I have tried a few
                    things, like editing my input to keep only columns
                    1, 4 and 5, removing <br>
                  </div>
                  decimals, keeping one space only, removing the space
                  from before column 1 etc....still parsing errors.<br>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    The problem is your are trying to import coordinates from some
    projected CRS to a Long/Lat locations. The import expects coordinate
    values between -180 and +180. See the error message in your screen
    shot.<br>
     <br>
    <blockquote
cite="mid:CAF=LnqxxbDUDnY4p4H16oE-GXK1cgzBBcKwkXfYGViLk79a9Ng@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>
              <div>
                <div><br>
                </div>
                Tried exact command syntax you suggested (adjusting for
                columns 4 and 5), similar errors...</div>
              <div>Tried both command line and gui, same errors.<br>
                <br>
              </div>
              It is something with my input text file I think, but cant
              find the issue.<br>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    For a complete report, please post:<br>
    <ul>
      <li>the first few lines of your points text file</li>
      <li>the outputs of <tt>g.region -p </tt>and <tt>g.proj -p </tt>for
        both of the above locations</li>
      <li>the output of <tt>r.info </tt>for the DEM layer<tt><br>
        </tt></li>
    </ul>
    <blockquote
cite="mid:CAF=LnqxxbDUDnY4p4H16oE-GXK1cgzBBcKwkXfYGViLk79a9Ng@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div><br>
            </div>
            Would you have any suggestions?<br>
            <br>
          </div>
          thanks<br>
        </div>
        Szilard<br>
        <br>
        <div>
          <div>
            <div>
              <div>
                <div>
                  <div>
                    <div>
                      <div>
                        <div><br>
                          <div>
                            <div><br>
                              <img
                                src="cid:part1.03070604.09080504@arava.co.il"
                                alt="Inline images 1"
                                style="margin-right: 25px;"><br>
                              <br>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On 16 December 2015 at 17:37, Micha
          Silver <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:micha@arava.co.il" target="_blank">micha@arava.co.il</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div style="direction:ltr" bgcolor="#FFFFFF" text="#000000">
              <div>On 16/12/2015 07:57, Szilard Albert wrote:<br>
              </div>
              <blockquote type="cite">
                <div dir="ltr">
                  <div>
                    <div>
                      <div>
                        <div>Hello,<br>
                          <br>
                        </div>
                        I need to extract elevation values from a DEM at
                        certain points for which I have X and Y values.<br>
                      </div>
                      My points are contained in several profiles, each
                      profile with hundreds of points. <br>
                      <br>
                    </div>
                    My input is a text file, one file per profile,  with
                    the following format:<br>
                    <br>
                  </div>
                  <div>PointA X Y<br>
                  </div>
                  <div>PointB X Y<br>
                    ......<br>
                  </div>
                  <div>PointZ X Y.<br>
                    <br>
                  </div>
                  <div>I would like a solution where I can feed the
                    above text input, and get my output as another text
                    file<br>
                  </div>
                  <div>with similar format, Point X Y Z (or Point Z X
                    Y). Alternatively just a text file with one column
                    containing Z,<br>
                  </div>
                  <div>but exactly same number of rows, so I can copy
                    and paste to the input.<br>
                    <br>
                  </div>
                  <div>One single command that solves one point only
                    would do as well, I would just create a script file
                    from my every<br>
                  </div>
                  <div>text file for every line....<br>
                    <br>
                  </div>
                  <div>Any suggestions would be greatly appreciated.<br>
                    <br>
                  </div>
                  <div>I am using QGIS 2.8 Wien in Ubuntu.<br>
                    <br>
                  </div>
                </div>
              </blockquote>
              <br>
              If you want to work with GRASS, there's an easy workflow
              for this:<br>
              <br>
              # First, as always, create a GRASS location with CRS
              matching your DEM and points, then<br>
              # Import your text file into GRASS as a points layer:<br>
              v.in.ascii input=<your text file> output=points
              columns="label text, x double, y double" x=2 y=3 sep=space<br>
              # Add a column to hold elevation<br>
              v.db.addcolumn map=points column="elev double"<br>
              # Import DEM raster<br>
              r.in.gdal input=<your DEM raster> output=dem<br>
              # As always,set the region<br>
              g.region -p rast=dem<br>
              # Now get elevations for all points<br>
              v.what.rast map=points column=elev raster=dem<br>
              # And create the output results file<br>
              v.out.ascii input=points output=points.csv column="elev"
              sep=space<br>
              <br>
              <br>
              <br>
              <blockquote type="cite">
                <div dir="ltr">
                  <div>Thank you.<br>
                  </div>
                  <div>Szilard<br>
                    <br>
                  </div>
                  <div><br>
                    <br>
                  </div>
                  <div><br>
                  </div>
                  <br>
                </div>
                <br>
                This mail was received via Mail-SeCure System.<br>
                <br>
                <fieldset></fieldset>
                <br>
                <pre>_______________________________________________
Qgis-user mailing list
<a moz-do-not-send="true" href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a>
List info: <a moz-do-not-send="true" href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a>
Unsubscribe: <a moz-do-not-send="true" href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a>
This mail was received via Mail-SeCure System.
</pre>
                <span class="HOEnZb"><font color="#888888"> </font></span></blockquote>
              <span class="HOEnZb"><font color="#888888">
                  <p><br>
                  </p>
                  <br>
                  <div>-- <br>
                    <div dir="LTR"> Micha Silver<br>
                      Arava Drainage Authority<br>
                      cell: +972-523-665918 </div>
                  </div>
                </font></span></div>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      This mail was received via Mail-SeCure System.<br>
    </blockquote>
    <br>
    <div class="moz-signature">-- <br>
      <div dir="LTR">
        Micha Silver<br>
        Arava Drainage Authority<br>
        +972-523-665918
      </div>
    </div>
  </body>
</html>