<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;">Hello both
<div><br /></div>
<div>many thanks. It works :)</div>
<div><br /></div>
<div>Pat</div>
</div>
<div name="messageReplySection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;"><br />
On 27. März 2017, 10:03 +0200, g.corral <g.corral@topodoc.com>, wrote:<br />
<blockquote type="cite" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #1abc9c;">
<div style="color: rgb(0, 0, 0); font-family: Tahoma; font-size: 13.33px; font-style: normal; font-weight: 400;">Sorry...</div>
<div style="color: rgb(0, 0, 0); font-family: Tahoma; font-size: 13.33px; font-style: normal; font-weight: 400;"> </div>
<div style="color: rgb(0, 0, 0); font-family: Tahoma; font-size: 13.33px; font-style: normal; font-weight: 400;">start point: $x_at(0) and $y_at(0) </div>
<div style="color: rgb(0, 0, 0); font-family: Tahoma; font-size: 13.33px; font-style: normal; font-weight: 400;"> </div>
<div style="color: rgb(0, 0, 0); font-family: Tahoma; font-size: 13.33px; font-style: normal; font-weight: 400;">end point: $x_at(-1) and $x_at(-1)</div>
<div style="color: rgb(0, 0, 0); font-family: Tahoma; font-size: 13.33px; font-style: normal; font-weight: 400;"> </div>
<div style="color: rgb(0, 0, 0); font-family: Tahoma; font-size: 13.33px; font-style: normal; font-weight: 400;">But Jack Andersen's idea is more effective.</div>
<div style="color: rgb(0, 0, 0); font-family: Tahoma; font-size: 13.33px; font-style: normal; font-weight: 400;"> </div>
<div style="color: rgb(0, 0, 0); font-family: Tahoma; font-size: 13.33px; font-style: normal; font-weight: 400;"> </div>
<div style="color: rgb(0, 0, 0); font-family: Tahoma; font-size: 13px; font-style: normal; font-weight: 400;"> <em style="background-color: rgba(255, 255, 255, 0);">Cordialement,</em>
<div><em style="background-color: rgba(255, 255, 255, 0);">  </em></div>
<div><span style="font-size: 9pt;"><span style="color: rgb(0, 102, 255);"><strong><em style="background-color: rgba(255, 255, 255, 0);"> Guayente CORRAL BROTO</em></strong></span></span></div>
<div><span style="color: rgb(0, 102, 255); font-family: "Tahoma",sans-serif; font-size: 9pt;"><em>  </em></span> <span style="font-size: 8pt;"><span style="color: rgb(0, 102, 255); font-family: "Tahoma",sans-serif;"><em>Hydrogéologue / EurGeol n°1336</em></span></span></div>
<div> </div>
<div><img height="73" src="cid:WC20170327075922.4904BA@topodoc.com" width="157" /></div>
<div><span style="background-color: rgba(255, 255, 255, 0);"><em> </em></span></div>
<div>
<div><span style="font-size: 8pt;"><em style="background-color: rgba(255, 255, 255, 0);"><span style="color: rgb(0, 102, 255);"> </span><a href="http://www.survey-groupe.fr/" target="_blank"><span style="color: rgb(0, 102, 255);">http://www.survey-groupe.fr</span></a></em></span></div>
</div>
<div><span style="font-size: 8pt;"><span style="color: rgb(0, 102, 255);"><span style="background-color: rgba(255, 255, 255, 0);"> </span></span></span></div>
<div><span style="font-size: 8pt;"><strong><a href="x-apple-data-detectors://1/0" style="background-color: rgba(255, 255, 255, 0);" target="_blank"><span style="color: rgb(0, 102, 255);">Chemin d'Enrobert</span></a></strong></span></div>
<div><span style="font-size: 8pt;"><strong><a href="x-apple-data-detectors://1/0" style="background-color: rgba(255, 255, 255, 0);" target="_blank"><span style="color: rgb(0, 102, 255);">32200 Gimont</span></a></strong></span></div>
<div><span style="font-size: 8pt;"><span style="background-color: rgba(255, 255, 255, 0);"> - <u>Tél</u>: <a href="tel:+33%20%280%295%2062%2065%2067%2065" target="_blank"><span style="color: rgb(0, 102, 255);">+33 (0)</span></a><a href="tel:+33%20%280%295%2062%2065%2067%2065" target="_blank"><span style="color: rgb(0, 102, 255);">5 62 65 67 65</span></a></span></span></div>
<div><span style="font-size: 8pt;"><span style="background-color: rgba(255, 255, 255, 0);"> - <u>Mob:</u> <a href="tel:+33%20%280%296%2048%2074%2043%2067" target="_blank"><span style="color: rgb(0, 102, 255);">+33 (0)6 48 74 43 67</span></a></span></span></div>
<div> </div>
</div>
<div style="color: rgb(0, 0, 0); font-family: Tahoma; font-size: 16px; font-style: normal; font-weight: 400;"> 
<blockquote style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #e67e22;">-----Original Message-----<br />
From: Jack Andersen <jack.andersen9@gmail.com><br />
To: phi73@gmx.de<br />
Cc: QGIS User List <qgis-user@lists.osgeo.org><br />
Date: Mon, 27 Mar 2017 09:30:20 +0200<br />
Subject: Re: [Qgis-user] Getting lon/lat<br />
 
<div dir="ltr"><span style="font-size: 12.8px;">Hi phi73,</span>
<div style="font-size: 12.8px;">You can get the Lat long for start and endpoints by using the field calculator in the attribute table.</div>
<div style="font-size: 12.8px;">create a new field and calculate it with the following:</div>
<div style="font-size: 12.8px;">i.g. field "longXstart"  calculate: x(start_point($geometry))</div>
<div style="font-size: 12.8px;">"latYstart" calculate: y(start_point($geometry))</div>
<div style="font-size: 12.8px;"> </div>
<div style="font-size: 12.8px;">You can do the same for the endpoint by changing start_point with end_point<br />
<br />
Furthermore the output will be in the same projection/coordinates as your layer, but you can do a transform command on the above command with:</div>
<div style="font-size: 12.8px;">x(transform(start_point( $geometry), 'EPSG:25832', 'EPSG:4326')) where the first epsg code is the current projection and the second one is the target projection</div>
<div style="font-size: 12.8px;">I have moved the x to the front of the command because the transform function only works on coodinate sets and i therefore transform x and y and then extract x.</div>
<div style="font-size: 12.8px;"> </div>
<div style="font-size: 12.8px;">_Jack Andersen</div>
</div>
<div class="gmail_extra"> 
<div class="gmail_quote">On Mon, Mar 27, 2017 at 8:17 AM, <span dir="ltr"><<a href="mailto:phi73@gmx.de" target="_blank">phi73@gmx.de</a>></span> wrote:
<blockquote class="gmail_quote" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #3498db;">
<div>
<div name="messageBodySection" style="font-family: -apple-system,BlinkMacSystemFont,sans-serif; font-size: 14px;">Hello
<div> </div>
<div>i have map based on vector data and in it some street elements.</div>
<div>I would like to pick up a line segment and get the lon/lat for </div>
<div>the start vertex and end vertex. </div>
<div>How could it be done the easiest way in QGIS.</div>
<div> </div>
<div>thanks</div>
</div>
<div name="messageReplySection" style="font-family: -apple-system,BlinkMacSystemFont,sans-serif; font-size: 14px;"> </div>
</div>
<br />
______________________________<wbr />_________________<br />
Qgis-user mailing list<br />
<a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br />
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr />mailman/listinfo/qgis-user</a><br />
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr />mailman/listinfo/qgis-user</a></blockquote>
</div>
</div>
</blockquote>
</div>
</blockquote>
</div>
</body>
</html>