[Qgis-user] Disable anti-aliasing on XYZ layer
Johannes Kröger (WhereGroup)
johannes.kroeger at wheregroup.com
Sat Mar 11 02:29:16 PST 2023
That looks like the layer's resampling is not set to nearest neighbor.
Also be aware that QGIS will have to resample the tiles whenever the
scale of the map does not match one of the pre-rendered zoomlevels of
the source (and the same CRS). If you have a matching CRS, select the
layer and click the "1:1" zoom icon, the image *should* match the
original 100%.
Cheers, Hannes
Am 09.03.23 um 15:55 schrieb Richard Duivenvoorde via QGIS-User:
> ( bringing it back to the list :-) )
>
> And are you sure the image retrieved from the xyz server is not a jpeg
> (compared to your original png)?
> You can try to see the actual url's used via F12 (the Debugging
> Development Tools panel) in QGIS.
>
> Another option: QGIS does not respect the xyz-zoomlevels always.. so
> it is very easy to go to a zoomlevel in which QGIS has to resize the
> original image a little (and 'resample' it, see Rendering/Raster
> settings in the Options). So to really compare QGIS image to the
> original one, you have to use the 'Zoom to native resolution' in the
> legend/layer context menu).
>
> Last idea: is your project in the same CRS as the xyz service
> (probably EPSG:3857?) Because if not, QGIS will also resample your
> original image to 'fit' the tile in the right position in that other
> crs....
>
> (and again: I know nothing about Qt image rendering ....)
>
> Regards,
>
> Richard Duivenvoorde
>
> On 3/9/23 15:36, Stephane Goldstein wrote:
>> I can see the difference by comparing the .png file in an image
>> editor (https://pasteboard.co/YodS7tuhtzSC.png
>> <https://pasteboard.co/YodS7tuhtzSC.png>) and how it's rendered in
>> QGIS (https://pasteboard.co/tcGLRc7XrsNj.png
>> <https://pasteboard.co/tcGLRc7XrsNj.png>).
>> The examples are at the same zoom level.
>>
>> On Thu, 9 Mar 2023 at 21:46, Richard Duivenvoorde
>> <rdmailings at duif.net <mailto:rdmailings at duif.net>> wrote:
>>
>> On 3/9/23 14:05, Stephane Goldstein via QGIS-User wrote:
>> > Hi.
>> > Is there a way to disable anti-aliasing of the png tiles
>> loaded on an XYZ layer ?
>>
>> Hi Stephane,
>>
>> From what do you conclude that there is anti-aliasing going on
>> with XYZ layers?
>> I use xyz layers also but I'm not aware of such behaviour?
>>
>> FYI: this is the code rendering the images:
>> https://github.com/qgis/QGIS/blob/master/src/providers/wms/qgswmsprovider.cpp
>> <https://github.com/qgis/QGIS/blob/master/src/providers/wms/qgswmsprovider.cpp>
>>
>> (tried to search for 'alias' but could not find anything)
>>
>> Note, I'm not an expert in this field, so just wondering...
>>
>> Regards,
>>
>> Richard Duivenvoorde
>>
>>
>
> _______________________________________________
> QGIS-User mailing list
> QGIS-User at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
--
Johannes Kröger / GIS-Entwickler/-Berater
**********************************************
FOSSGIS Konferenz
15.-18. März 2023 in Berlin
https://fossgis-konferenz.de/2023/
WhereGroup-Beiträge auf der FOSSGIS
https://wheregroup.com/unternehmen/aktuelles/
**********************************************
WhereGroup GmbH
c/o KK03 GmbH
Lange Reihe 29
20099 Hamburg
Germany
Tel: +49 (0)228 / 90 90 38 - 36
Fax: +49 (0)228 / 90 90 38 - 11
johannes.kroeger at wheregroup.com
www.wheregroup.com
Geschäftsführer:
Olaf Knopp, Peter Stamm
Amtsgericht Bonn, HRB 9885
-------------------------------
More information about the QGIS-User
mailing list