Thursday, 26 October 2017

coordinate system - How do I get UTM projected areas from a shapefile created in QGIS?


I create a polygon (or point or line) shapefile in QGIS and it is automatically saved as WGS84 (as I understand, correct me if I'm wrong). That is fine by me despite being a bit inconvenient. Then I need the area. I know that QGIS can generate areas and update the attribute table but it is unclear what the units are and WGS84 units don't readily translate to working area units such as acres. I messed with this for a while and decided to work in Grass since I didn't know what sort of units I was getting and saving the layer in different CRS designations didn't result in different values in the attribute table.


I try to import the QGIS generated shapefile to Grass so I can reproject it to UTM and I get an error about illegal values. The Grass environment was created using the QGIS generate file so it seems to me that QGIS is creating incompatible files when I create polygon shapefile.


Does anyone have any insight about this and how I can get legal values from which I can project to my desired projection?




Answer



From QGIS you can select 'Save As' and specify the output coordinate system. Right click on the layer, select save as and change the coordinate system: enter image description here


It is important to set CRS to 'Selected CRS' and not to 'Project CRS'; in a previous post on the subject it was determined that there is a bug in using the project CRS.


However, when you make the shape file you can specify the CRS: enter image description here


The default is WGS84 but you can change it before it's created to avoid having to modify it later... your area calculations should be in real units.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...