Friday, 29 January 2016

Understanding QGIS buffer tool units


I have had no luck getting the buffer tool to accept anything but degrees as units of measure.


I have found lots of stuff saying the layer needs to be reprojected and saved but it hasn't worked at all for me.


Is there a way I could create a buffer without using ftools or at least force the units to meters somehow?


As a workaround I converted meters to degrees (lat) and used that but the final product needs to be as close to reality as possible.


Things I've tried:



  • setting every unit option I could find to meters (where possible).

  • setting everything to NAD83/Maryland (data is for Washington, DC) and saving it as such (as layers in ESRI shape files).


  • reimporting the reprojected layers

  • setting relevant layers to Google Mercator


The was tried followed by creating a buffer. Many were tried in combination. QGIS 1.7.3 Slackware64 current (qgis from SBo-13.37 repo, tried on multilib and plain 64it with same results)



Answer



The buffer size is always applied in the layer CRS units. Therefore, the layer CRS has to use meters if you want to buffer in meters.


You don't need ftools to change the CRS.



  1. Open the original layer in WGS84 CRS.

  2. Right-click in layer list and select "Save as ...". (DON'T change the CRS in layer options!)


  3. Set the target CRS to NAD83/Maryland and save.

  4. Load the new Shapefile.

  5. Buffer.




The point coordinates in the linked files have not been reprojected correctly:


enter image description here


These are the settings in "Save as ..." that work for me:


enter image description here


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...