Thursday, 23 August 2018

coordinate system - Buffer in QGIS/R is 650-670 m wide instead of 500 m


I am trying to make a 500 m buffer for my polyline layer. Unexpectedly, I receive buffer varying from 650 to 670 m, depending on location. As many resources recommend to use UTM before making a buffer, I use UTM projection for zone 31N - EPSG:23031 - ED50 / UTM zone 31N (actually, the layer is already provided in this CRS).


Whole polyline layer is located in Catalunya (SE Spain). Even the buffers placed near in the very SE of Spain, which is right in the middle of the zone 31N (where no distortion should happen), are 650 m!


enter image description here


PS: I did this in QGIS and also in my script in R, receiving exactly the same result in both cases.


EDIT: using QGIS measure line tool (View > Measure > Measure line)


enter image description here




Answer



The actual distances are correct! See the picture below.


The Measure Line tool is showing wrong distance! It claims to return distance in meters, while it is in the project CRS units. The project CRS is the classic cylindrical projection (web mercator EPSG:3857).


The Measure Line tool is buggy. It has all the information to compute correct geodetic distance in meters, and it confuses the user to do so by claiming meters; while it does in the CRS units instead.


enter image description here



Now it is finally possible to measure the correct geodetic distances! Just:



  1. Go to Project properties -> CRS -> check "Enable on the fly CRS transformation"

  2. Project properties -> General -> Measure tool -> Ellipsoid (for distance calculations) - check if there is reasonable value (like WGS 84 for example)


  3. View -> Measure -> Measure line


Now it is working perfectly and I have quite old version! (2.8.2-Wien)


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