That's great, thank you both and have a good day everyone! Francesca Il giorno mar 24 mag 2022 alle ore 17:04 C Hamilton <[email protected]> ha scritto:
> Once you have your centroids you can use the Lat Lon Tools plugin and run > the "Point Layer to Fields" algorithm to extract the geometry and add it to > one or two attribute fields. You can also specify the CRS that you want it > in and what format (ie. decimal degrees, DMS and a lot of other formats) > you want it in. > > Best wishes, > > Calvin > > On Tue, May 24, 2022 at 2:53 PM Thayer Young via Qgis-user < > [email protected]> wrote: > >> Hi Francesca, >> >> Assuming that your layer has a geographic coordinate system like 4326. >> And you have found your centroids already: >> Use the field calculator to add a new or virtual field with a numeric >> data type, e.g. double, and name it something like "lat". Then in the >> expression area enter the expression: $y >> and press OK. Do the same for "lon" and the expression will be: $x >> >> If you want to find the centroid of a polygon and its latitude in one >> step your expression would be: y(centroid($geometry)) >> For longitude it would be: x(centroid($geometry)) >> >> Note that different methods will give you different coordinates for your >> centroid. So you may need to use a spatial join to do your match. >> >> -Thayer >> >> >> On Tuesday, May 24, 2022, 06:22:46 AM EDT, >> [email protected] <[email protected]> >> wrote: >> >> ---------------------------------------------------------------------- >> Date: Tue, 24 May 2022 09:52:26 +0200 >> From: Francesca Parente <[email protected]> >> To: QGIS User List <[email protected]> >> Subject: [Qgis-user] visualize and export coordinates of centroids >> Message-ID: >> <caa8dzsc04zgiuy5jzhearj0+ddp1l8z_abcsdxprs5cyi6o...@mail.gmail.com> >> Content-Type: text/plain; charset="utf-8" >> >> Hello group, >> >> I would like to ask you what is in your opinion the best way to identify >> the lat-lon attributes of derived centroids in order to export them to an >> extra-QGis database where corresponding coordinates should match with >> identified locations. >> >> So far I've tried with Geocoding and MMQGIS plugins, but the resulting >> attributes table doesn't inlcude the coordinates of geocoded points. >> >> Thanks a lot for any advice! >> Francesca >> >> -- >> ---------------------------- >> Francesca Parente >> >> _______________________________________________ >> Qgis-user mailing list >> [email protected] >> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user >> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user >> > -- ---------------------------- Francesca Parente _ SESS Euro PhD <https://phd.uniroma1.it/web/FRANCESCA-PARENTE_nT1602922_IT.aspx> in SocioEconomic and Statistical Studies _ Luiss SEP <https://sep.luiss.it/> School of European Political Economy email: [email protected] [email protected]
_______________________________________________ Qgis-user mailing list [email protected] List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
