I have a regular layer from a database containing WKT polygons. I'm also using a XYZ Tiles layer of Google Maps. I would like to perform the Vector
> Geoprocessing Tools
> Difference
operation between the two layers, except using an XYZ Tiles
layer is not a possibility in the Difference
dialog box (notice no expand
arrow to allow access to OpenStreetMap
or gmm
(Google Maps)). QGIS 3.16 being used.
-
2XYZ Tiles = Raster, your trying to using vector tools on raster data.– Mapperz ♦Commented Nov 7, 2020 at 21:54
1 Answer
The Difference operation is an operation that only works with vector layers (as you can see from the fact that it's located in the vector menu). You can't process any raster with that. The OpenStreetMap Layer represents raster data from raster tiles. If you want to process OpenStreetMap data with the Difference operation, you should first download OSM data in vector format. However, as you don't mention what exactely you want to achieve using the Difference operation, there are maybe other options. So I suggest to open a new question where you explain what is your final goal.
By the way: as far as I know, XYZ tiles cannot be processed at all, not even as raster. So you can't use XYZ tiles in the raster calculator. They are here just as basemaps, for orientation purpose etc.
-
1Export XYZ tiles to raster (geotiff) then they can use the raster tools.– Mapperz ♦Commented Nov 7, 2020 at 22:05
-
1remember that XYZ tiles are a picture of the data not actual data, so exporting to GeoTiff is unlikely to give good results Commented Nov 8, 2020 at 11:55