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?

  • I was able to pseudo-duplicate by doing this: right click on 'Random points', go to 'Open Attribute Table', go to the second view (not the table view) and click on each feature while holding down Command (I'm on Mac) to select it. Then click 'Copy selected features to clipboard' and then create a new layer using paste. Even though I changed the CRS, I still don't have GPS coordinates. – StatsSorceress Sep 21 '17 at 20:54
  • Have you tried without doing step 2? (without duplicating process) – Keenan Gebze Sep 22 '17 at 6:55

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.


Duplicate is greyed out, because it's created as a "Temporary Scratch Layer".

You can just skip the Duplicate step. If you check "Add saved file to map" and set the CRS to EPSG:4326 during the "Save As..." it will be added in your Layers Panel anyway.

In this newly created layer you can add 2 new columns to the attribute table with the Field Calculator and $x or $y as Expression. Make sure you set the Output field type to Real and you set the Precision to the value you want them to be.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.