[GIS] Extracting coordinates of random points using QGIS

coordinate systemcoordinatesqgis

I have successfully created a layer that contains a variable number of random points per polygon by using Vector > Research Tools > Random points inside polygons (variable). As I needed 500m distance between the points in each polygon, I used a UTM coordinate reference system for the original layer, which was of course continued on to the random points layer.

Now I would like to extract the GPS coordinates of the random points.

I thought I could do this via:

1) Right click on 'Random points' (the name of the points layer)

2) Click 'duplicate'

3) Right click on the duplicated layer and click 'Save As'

4) Choose the CRS to be EPSG 4269 and save.

However, the 'duplicate' option is greyed out, even when I enable editing. I tried this solution and this one.

How can I get the coordinate information from the random points, preferably extracted to a csv or similar?

EDIT: Better way to phrase the question: how do I convert from EPSG:32614, WGS 84 / UTM zone 14N to EPSG: 4326; WGS 84?

Best Answer

You have a couple of options that I know of. If you want to have the geographic co-ordinates as fields in the attribute table of your points layer, right click on the 'Random points' layer (no need to duplicate) and use the 'save as' option. Select EPSG:4326, WGS 84 and check 'add saved file to map'. You can then use the field calculator to create two new fields which you can name 'longitude' & 'latitude', ( or x & y or whatever you like). Select Decimal number (real) as output field type and an appropriate output field length and precision. For my location I used output lengths of 9 for longitude, 8 for latitude and a precision of 6 for both. Then just use $x and $y respectively in the expression window to populate the new field with the co-ordinates in decimal degrees. You can then save this as a csv file if you wish. If your goal is to upload the points to a gps unit, you could then save the points layer as a gpx file. My experience with this method (with a Garmin gpsmap 64) is that you need to have a column called 'Name' for the unit to recognise as the waypoint names. So either create a new field and enter a unique name for each feature or you could just rename the id column to Name in Layer properties > Fields. The latter will result in waypoints on the gps unit of 0,1,2 etc up to however many points you have, so if you want more meaningful waypoint names you need to create them in a new column. If you just want the points in a gps unit, the other option is to use the free DNRGPS software. All you have to do is save your Random points layer as shapefile (still select EPSG:4326, WGS 84 as the CRS), open DNRGPS select File > Load From > File, then navigate to the point shapefile you saved and click open. Select 'id' as the field containing the IDENT values (again this will just give you waypoint names of 0,1,2 etc.) You can then plug in your gps unit, select 'Find GPS' from the 'GPS' menu then select 'Upload All' to load the points into your unit.

Related Question