Hello both many thanks. It works :)
Pat On 27. März 2017, 10:03 +0200, g.corral <g.cor...@topodoc.com>, wrote: > Sorry... > > start point: $x_at(0) and $y_at(0) > > end point: $x_at(-1) and $x_at(-1) > > But Jack Andersen's idea is more effective. > > > Cordialement, > > Guayente CORRAL BROTO > Hydrogéologue / EurGeol n°1336 > > > http://www.survey-groupe.fr > > Chemin d'Enrobert > 32200 Gimont > - Tél: +33 (0)5 62 65 67 65 > - Mob: +33 (0)6 48 74 43 67 > > > > -----Original Message----- > > From: Jack Andersen <jack.anders...@gmail.com> > > To: ph...@gmx.de > > Cc: QGIS User List <qgis-user@lists.osgeo.org> > > Date: Mon, 27 Mar 2017 09:30:20 +0200 > > Subject: Re: [Qgis-user] Getting lon/lat > > > > Hi phi73, > > You can get the Lat long for start and endpoints by using the field > > calculator in the attribute table. > > create a new field and calculate it with the following: > > i.g. field "longXstart" calculate: x(start_point($geometry)) > > "latYstart" calculate: y(start_point($geometry)) > > > > You can do the same for the endpoint by changing start_point with end_point > > > > 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: > > 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 > > 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. > > > > _Jack Andersen > > > > > On Mon, Mar 27, 2017 at 8:17 AM, <ph...@gmx.de> wrote: > > > > Hello > > > > > > > > i have map based on vector data and in it some street elements. > > > > I would like to pick up a line segment and get the lon/lat for > > > > the start vertex and end vertex. > > > > How could it be done the easiest way in QGIS. > > > > > > > > thanks > > > > > > > > > > > > _______________________________________________ > > > > Qgis-user mailing list > > > > Qgis-user@lists.osgeo.org > > > > List info: https://lists.osgeo.org/mailman/listinfo/qgis-user > > > > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
_______________________________________________ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user