1

The problem

I have tens of thousands of small polygons for which I want to create buffer/doughnuts for, but I don’t get the units right. I want meters and not degrees, and changing to (what I think is) the right CRS my layer doesn’t longer show. The polygons are small farming plots. I work in QGIS 3.4.15.

Let me take you through it

I start by adding a vector layer. I opt for ‘Directory’ as a source type (Encoding: UTF-8 by default) and under Source (Type: UK. NTF2 by default) I point to the folder in which I store the shapefile.

The default CRS is set to EPSG:4326 – WGS 84, for both layer and the project (checked in bottom right), and unit is thus in degrees. I add the layer world map (EPSG:4326 – WGS 84 by default) by taping “world” in the coordinate box in the middle bottom, I also add Open street map (EPSG:3857 – WGS 84 / Pseudo-Mercator by default) from XYZ Tiles. The polygons appear nicely on the map considering some are just adjacent to the nearby lake, many nicely adjacent to roads, etc.

When attempting to do buffers the distance is obviously set to degrees. I have tried to change the CRS, both for the layer(s) and the projects, but without luck. After researching (e.g. here: https://epsg.io/?q=Kenya%20kind%3APROJCRS) I believe that the correct CSR would be Arc 1960 / UTM zone 36S EPSG:21036 (it is my understanding that either 36N or 36S would work as the polygons appear both south and north of, but close enough to the equator). When setting the mentioned CRS for my polygon layer, the polygons disappear from the map, and remain gone even after setting the project CSR (by bottom right) to the same. It seems that whenever I try with different CRS in UTM, the layer doesn’t show. Does this mean that the polygons are somehow not compatible with units in meter? Is there an issue with importing the .prj file?

Other things I've tried:

I have made a good attempt searching for solutions. I have ensured that the polygon layer is on top of the layers list. I have ensured the file names are identical and tried all different suitable CRS I can think of. I have seen similar questions been solved by saving the .shp 'as', but I don't think that's my issue as it's already a .shp file. Can it be the case that I need to perform a datum transformation? I gave it a shot using a transformation code (1122) provided by above link, but then the polygons were projected on the Antarctica on the world map, so obviously something went quite wrong...

Note that when I have changed to what I believe is the right CRS I can execute buffers in units of meters, however, they do not appear on the window…

  • 1
    tl;dr: Let me guess: You set the CRS to a different one, you didn't reproject/transform your data? Load your original data, the rightclick it and export it. Here you may choose a target CRS, which should be one fitting your area of interest and your intended processing (as in, "choose the correct UTM strip"). Note: The buffer-tool only cares about the CRS of your layer. – Erik Jan 24 at 14:03
  • Thanks! Had't understood that was necessary, thanks. Is it correct that the format shall be ESRI Shapefile? – Agnes Jan 24 at 17:28
  • The file format does not matter. – MrXsquared Jan 24 at 17:40
4

Do not use "Set CRS" within layer properties. This does not reproject your data. You only define the CRS there. Means: you can tell QGIS the layer is in a different CRS in which it actually is not.

Do use "Export layer as..." and choose your desired CRS over there. This does actually reproject your data. You need to save your data into a new file. This new file will then be in the chosen CRS.

| improve this answer | |

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.