3

I have found XYZ layers seem to ignore projections or can't seem to use them. I want to operate using a projection so I can buffer point data, for example. I was attempting to use ESRI:102171 because my data is from Victoria. But even using EPSG:3857 and setting as a projection re-projects my other data but does not effect XYZ layers. In other words the basemaps are in one spot and my data is elsewhere. If I return my layers to CRS EPSG:3857 they all line up. Can XYZ tiles not work with projections?


The problem started when, after I had the map set up perfectly using EPSG:4283 (GDA94 - Australia), I tried to buffer my point data by 50m. As the project was in a CRS and not projection the only option was to use degrees when buffering. I then used ESRI:102171 projection to resolve this. XYZ layers didn't come to the party, so to speak. So, I can have a nice map with XYZ tiles and not be able to perform buffer and other operations OR perform these operations in meters without XYZ tiles to support my work. This is my question, can I have both?

I also tried working from EPSG:3857 and using this for projections which had my data lining up but XYZ tiles not complying. QGIS automatically projects on the fly as far as I understand. I just can't get data to match up with XYZ tiles once projected into a local projection.

  • 1
    The problem started when, after I had the map set up perfectly using ESPG:4283 (GDA94 - Australia), I tried to buffer my point data by 50m. As the project was in a CRS and not projection the only option was to use degrees when buffering. I then used EPSG:102171 projection to resolve this. XYZ layers didn't come to the party, so to speak. So, I can have a nice map with XYZ tiles and not be able to perform buffer and other operations OR perform these operations in meters without XYZ tiles to support my work. This is my question, can I have both? – heymus Jan 24 at 0:23
  • 1
    I also tried working from ESPG:3857 and using this for projections which had my data lining up but XYZ tiles not complying. QGIS automatically projects on the fly as far as I understand. I just can't get data to match up with XYZ tiles once projected into a local projection. – heymus Jan 24 at 0:30
3

At first you need to know, that EPSG:4283 is in degrees. See https://epsg.io/4283. You need to use another projection which uses meters as units. Otherwise you wont be able to buffer your points in meters. An alternative could be https://epsg.io/3112 or https://epsg.io/28355. Do some research to find a projection that fits your needs. (Could not find informations for EPSG:102171 doing a quick search. But if you know this one fits your needs, use it)


Secondly you need to know the difference between Project CRS and Layer CRS (which includes the CRS of tile services)

  1. Project CRS: This is the coordinate system of your map canvas: The projection your map will be displayed in. This works on the fly. The project CRS has nothing to do with the layers CRS. You can use layers in all different projections, but they will all be displayed in the projects CRS.

  2. Layers CRS: This is the coordinate system of your layer: The projection that all operations (like buffering) will be performed in. This is independent of your project CRS.

So you can add a XYZ tile, which is in EPSG:3857, to your project and also add a vector-point-layer, which is in EPSG:28355. The layers themselves will not be reprojected, but beeing displayed in the projects CRS which could for example be EPSG:4326. This happens on-the-fly. They will match in their displayed location.

You can not reproject data of a XYZ tile layer (unless you are the one hosting the service). And there is no need to do so. But you can change the projection that XYZ tile layer is beeing displayed in. This works via the project CRS.


Last and most importantly: Do NEVER USE "set CRS" in layer properties unless you know exactly what you are doing. This does not reproject your data/layer! If you want to reproject a layer, DO USE "export as..." and save it as a new file.

| improve this answer | |
  • If I have my map canvas/project set to ESPG:4283 or ESPG:3857 I can have all the data lined up. If I want to buffer my point data in meters I can't because my layer may not have a projection. It displays in the correct position and everything is fine except for not being able to buffer in meters. So, I can export and add a projection like EPSG:102171 (this may be a bad projection to use(?) but my data covers most of Victoria (Australia)) or use define projection tool to give this layer a projection. But then it jumps to another part of the world. I'll try from the start again and see if works – heymus Jan 24 at 1:03
  • Yes, do use the export function to reproject your points to a metric system. I dont know if EPSG:102171 is a bad projection. I could not find any informations on this one. Do NOT use a define projection tool or set CRS tool. – MrXsquared Jan 24 at 1:12
  • Also couldnt find EPSG:102171 in my list of available projections in QGIS. Is it a custom one? – MrXsquared Jan 24 at 1:14
  • 1
    Sorry, it's ESRI:102171. It seems to work now. I have the project set to ESPG:4283 and all is displaying correctly. I think I was messing around with layer CRS and stuffing myself up. I left the project do all the work seems to be the best approach. I did have some errors in my point data which I corrected, then imported it again (was excel) as shp. I then exported using my ESRI:102171 and it displayed correctly AND allows me to buffer in meters.Your comments helped me stop messing around in the wrong spot (CRS at layer). Not sure why you say don't use export or define projection tools? – heymus Jan 24 at 1:26
  • 1
    The define projection tool is only used when a wrong projection has been assigned to layer. Means that this layer has a projection assigned which it is not in. Therefore this tool is only used to correct errors and or mistakes. This tool does not reproject anything, it does only declare a projection. I say do use export. Export is the tool in QGIS which actually reprojects data. – MrXsquared Jan 24 at 1:39

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.