[Qgis-user] Getting lon/lat
phi73 at gmx.de
phi73 at gmx.de
Mon Mar 27 01:04:10 PDT 2017
Hello both
many thanks. It works :)
Pat
On 27. März 2017, 10:03 +0200, g.corral <g.corral at 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.andersen9 at gmail.com>
> > To: phi73 at gmx.de
> > Cc: QGIS User List <qgis-user at 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, <phi73 at 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 at lists.osgeo.org
> > > > List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> > > > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20170327/c5f53600/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.jpg
Type: image/jpeg
Size: 3356 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20170327/c5f53600/attachment.jpg>
More information about the Qgis-user
mailing list