Friday 30 January 2015

distance - projection change to create buffer in QGIS


I am about to become desperate... I like to create buffer around several points - if possible - with a declaration of the size in km of these buffers. Just to show you what I am working with:


enter image description here


My problem seems to be the projection of my data. Its in the WGS84 projection and my background map is in the RGF93 / Lambert-93 projection (I dont know why that works together). With the WGS84 projection the distances will be shown in degrees, so i tried to change the projection of the background map, the projection of the data or both together but I dont find any other projection where they fit together.



Do you have any suggestions how to create these buffers with a clearly shown distance?



Answer



FYI, the buffer tool always use the input layer's Coordinate Reference System (CRS) units. In your case, to buffer your points, it will always use WGS84 in degrees (Since WGS84 is a geographic coordinate system, and not a projected one).


Notice, that changing the CRS by using "set layer CRS" does not change their actual values, It only says to QGIS "from now on, read this values as if they are on this different CRS". Wish would tell for instance that "from now on read this degrees as if they are meter", and that won't work well! :-P


Therefore, it's very important that all your layers are set with their correct CRS. If on, QGIS "On the fly transformation" will read layers from different CRSs and display them in the Project chosen CRS. (thats why your layers work together)


The solution is very simple tho, all you need is to reproject you point data to a suitable projected CRS. For what I can see, the RGF93 / Lambert-93 is suitable for your working area.



  • Right-click "points" layer, and choose "Save as...";

  • Choose "Selected CRS" instead of "Layer CRS";

  • Browse for the desired CRS. (typing 'RGF93' on the filter, it will help you to find and select the "RGF93 / Lambert-93" (EPSG:2154) CRS);


  • Choose your output shapefile location, select the "add saved file to map" an click Ok.


The resulting layer can now be used as input to buffer tool, and You can now use meters in the buffers distance.


Hope this helps!


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