Generating XYZ tiles(MBTiles) in QGIS # Lesson 28 of 29 # QGIS Tutorial.

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

I find it extremely slow it says it's using all cores but I doubt it and CPU utilization does not show it. Anyone have issues with raster tiling in QGIS.

Geopackage or mbtiles or folder of XYZ

have several HP Z820 AND HP Z840 dual Xeon workstations and a Dell R820 quad xeon setup for raster tiling But can't use QGIS takes too long

👍︎︎ 1 👤︎︎ u/techmavengeospatial 📅︎︎ Aug 20 2021 đź—«︎ replies
Captions
[Music] [Music] so [Music] hi guys welcome to today's qgis tutorial lesson 28. in this video we will learn generating xyz tiles in qgis if you haven't subscribed to my channel please do so so that you can get a notification when i upload my next video if you're new to my channel you can follow all my previous lessons and useful gis tips from the links in the descriptions below let's get started so today we're going to learn about xyz tiles and we'll learn how to create these xyz tiles so the first thing that you're going to do is you're going to learn how to create new connection of x-ray tiles in a browser panel the examples of these tile map services that you're going to use today are the bing maps or the s3 imagery and then two we're going to generate the xyz tiles that will enable users access base maps offline on their devices for example on their mobile on their mobile phones or tablets so let's go to qgis and look at today's exercise so i'm going to open qgis and i'm going to create a new blank project so now that we have our new blank project the next thing we need to do is we need to load these xyz tiles how do we do that we use the browser panel and you can see currently i don't have the browser panel so i'm missing the browser panel here i just have the layers panel so what i'm going to do is i'm going to bring the browser's panel back here for your case you might be already having it there i usually like working without it so i'm going to return it here how do i return it i can actually i can just right click on the toolbar and look for the browser panel and i can just sit on the browser panel here that is actually how you can actually do it another way is you can just go to view then panels then you can actually just add the browser panel from here but this is now an easier way where just right click anywhere on the toolbar and you can actually return any panel that you're missing so now that you have our browser panel here and we are going to pull it up we need to look for the xyz tile and you can see i have the xyz tile here so it currently if i click on the drop down here i'll see that i have already some tiles loaded here for your case you might only be having the open street map so the first thing i want to show you is i want us to learn how to just add a new connection if for example you only have the open street map and you want to use something like say maybe say let's look at what you don't have here there is the the bing map is missing so you want to look at the big map so you can actually create a new connection how do you create a new connection by just right by clicking on the x id type then saying you want to create a new connection so what kind of connection do i want to create i want to create a connection for the big maps here right so bing maps then i need a url for the bing maps so actually there are very many sites where you can get these uh tile connections uh for my case i've already prepared some basemap links so i have the bing virtual app here and this is the connection so i'm just going to copy the whole of this connection here copy it and then i'm going to now paste it in the url so we are looking at the bing map virtual i'm going to paste it i'm going to press the url of the bing button here then i'm going to just say okay and you can see the minimum zoom level is zero and the maximum zoom level is 18 so i'm going to say okay and now you can see i have at the bing map virtual here so that is how you can actually load these xyz tiles using these uh browser panel now there are several sites where you can actually get these uh map tile services and i will just show you an example of a website where you can get them and you can get most of these tile services from there qms dot next gis and under the service you can see there is a tile map service so you can actually just select the tile map service and then you can actually look at the ones that are actually online you can see google china is online it's green so i can click on that and then when i scroll down here i can actually see the url for that so i can actually just copy this and then come to my qgis and then create a new connection again and say this is detainer china google china can you say google china then i can paste the url here and then i just make that connection by saying okay and now you can see i have added google china here so in today's exercise we're going to be using the bing map virtual so i'm going to load this being up virtual now that i've already created a connection so i'm going to just you can actually double click on it here or you can just select it and drag it into the layers panel so either way it will work and you can now see i have now connected to the bing map virtual i can still remove it and then just double click here and you see it will still come back here so that is how you can actually load it then i can just zoom in to a place that i want to get the images of maybe say let me just zoom in into some region here in the southern african region maybe somewhere here i'm going to zoom in until i can see a clear image of the area that i want to work with so you can see when as i continue zooming in it's actually a collection of very many tiles so when you're zooming in you can actually zoom into just a certain minimum where the image will start becoming blurred so i think that is the highest you can zoom into so what i want to do is maybe i just do an assumption that i want to but this is actually my project area and i want to save this image so that i can actually put it on my android phone or devices or just a device so that i can actually work with this image later on when offline because sometimes maybe you go to the field and the regions that you're in you can't actually access internet internet so you really need to have the best layers and how are you going to now be working without the best layers so you can actually save this image offline so that you can actually use it so now that we have our bingmap virtual here we want to go to the next step which is now getting the xyz tiles for just this region only we actually want to just concentrate on this region because if we try to get the images for the whole of africa or maybe for the whole of the world then it will take months or years or ages i don't know i've never tried it and i'll never try it because it depends on the processing speed of your computer and very many other factors so before even we get try to get some images of uh of this region we can actually just experiment and look at what we have actually loaded the google map china let's see if it actually works so i can actually just double click on it and see all right it has actually loaded there google map china and you can see there's a little bit of difference between there the google map china and the the bing map so depending on your need you can actually just choose any kind of best map for for your region so i'm going to remove the google map china because you're not going to be using it today you're just going to be using the bing maps so the next thing you're going to do is go to the next step which is generating the x-ray size that will enable users or access based maps offline on their devices for example their mobile phones and all that so we're going to go to the next step and how do we now do that we go to the processing toolbox so i'm going to select processing then toolbox and just bring here the processing toolbox and under the processing toolbox you can see there are very many processes you can actually do so we are interested in raster tools so select cluster tools so that we have these uh so you're going to select the drop down so that you can actually now access these and they want to generate xyz times so raster tools then generate exercise tiles i'm going to double click on unit xyz tiles wait for just few seconds for it to be for the logarithm to pop up then now we have our we have our window where we are supposed to put all the parameters that are required so the first thing is the extent what extent do we want to have so you can actually just click here and you will see calculate from layer you can actually calculate from the layer if you have a layer like for example a shape file but you know we don't have any share file for the area of interest so you can also use the map canvas extent and the map conversation just selects the canvas which is this the accent of the canvas this is the accent of the canvas but i'm more interested in being very very precise here so i'm going to select draw on canvas so i'm going to select drawn canvas and i want to just select this region here up to maybe say here that's my region of interest and it will actually give you now the coordinates the corner coordinates of the region that you actually have selected so the minimum zoom is i'm going to actually remove reduce this to maybe say two and i'm going to make sure that the maximum zoom is 18 according to you remember when we were looking at the minimum and maximum zoom we saw for the being maps of zero and 18 so i'm going to make sure that i have all the images when all the tile all the times that i'm i'm required to have for that scene so i'm going to say 18 and then the dpi the dpi i can actually say instead of 96 i want to put maybe 300 or sorry 300 and you can see on the dpi here they say the minimum value is 48 and the maximum value is 600 so i won't just put 300 dpi it will actually be a very clear image then the background color i'm going to just leave it transparent the tile formats i'm going to change it instead of png you can actually leave it png but i can change it to jpeg then the quality i can add it to maybe say 85 which is okay and then if you scroll down the meta meta type file my meta tile size is for i'm just going to leave it by the default then output file i'm going to now save it as a file here so i'm going to save it in a folder that i created in a gis data data raster tiles i'm not wrong yes that's the tiles and i have already i had already created some rasta tires i up to seven so i'm going to say this is my area of interest area of interest i have up to seven so i'll say area windows 8 and then i'm going to click on save and that is my area of interest the area of interest that i want to have in that folder so i'm going to say run so when i click on run it will start processing your logarithm and you can see now it's actually running here so let's give it some time to run and most of the time the speed at which it runs depends on how large your area is you can see for these it just took as little as 21 seconds to run but when you go to select a bigger area it will take more time so it's you to be patient and don't actually get a very big scene because it will actually maybe it might even take six hours like i'll show you and and one that i actually did initially that took me to two hours to just download so you can see now it has actually generated the titles for level two up to level 18 as you had commanded it to and uh our bug background color the dpi was 300 this was the extent bound and the meta file and then the output output file is in our js data data file which is uh the area of interest 8 the quality is 85 so let's try to look at now uh the tile that we have actually just uh downloaded so in order for us to now bring it bring the tile here we can actually just go to layer add layer and now we're adding a raster layer because we had actually just generated the raster layer then i'm going to browse where my wrestle layer is and it is in in the desktop gis data raster raster tiles and it is the rasta tile 8 this is the mbtile file that we actually created so i'm going to click on open and i'm going to click on add and it has been added here so i'm going to click on close and you can't actually see any change here for you to be able to see any change i'm i'm actually going to remove and check the big map virtual so when i check the bing map virtual now you can see i have remained with the file that we had we had actually wanted to save for area of interest and you can actually see it's just more of this more or less the same as the image you can actually see it just blends in very nicely like if i zoom to the layer and you can't even actually see where the cut line was so the only time you can actually be able to see the cut line if you uncheck the beam map and then if i check it again let me just go to an area like for example where there is this road here there is this road so let me just check check the bing area back and you can see how clear it is though the image that i created is a bit pixelated but it's actually good for for your fieldwork so you can actually now copy this because it's in your folder and be able to in my data folder gis data folder raster tiles and you can see we have we have it here and it's it's it's actually fairly a small a small file but you can see the one that i was telling you about is a very very big file for a very very large area so let me just load the area of interest 5 so that you can actually see the difference in size because this is 1.8 gb and this one is just six 600 616 kb because of a small area so let me just try to load there the area of interest five actually use the same technique so i'm going to go to layer add layer add raster layer then i'm going to browse and you can see i have the area of interest 5 which is 1.7 gb and if i open it and if i add it it's really wait for it to add it has actually added so i'm going to click on close i'm going to zoom to layer you can't actually see it currently because everything is actually blending in well so when i remove the beam being a bing map virtual you can see this is the image and you can see if i continue zooming in i can actually zoom in and zoom in until it's clear and this is now saved on my computer so the advantage that i have now is i have the the rasta data and i'm going to just put in my phone or my tablet by copying it and pasting it in the sd card and do my field work very very easily since this image is already referenced so you can try to get a bigger area and do your analysis as you like for your field work that's it for today's exercise if you found this video useful and you want to learn more qgis subscribe to my channel don't forget to give this video a thumbs up otherwise i'm just happy you're here see you in my next video you
Info
Channel: WiseGIS
Views: 4,538
Rating: undefined out of 5
Keywords: how to generate xyz tiles in qgis, xyz tiles qgis, xyx mbtiles, qgis, qgis tutorial, qgis 3, qgis tutorial for beginners, qgis 3.14 tutorial, qgis latest version, qgis latest release, gis, remote sensing, remote sensing and gis, education news today, remote sensing lecture, remote sensing tutorial, data structures and algorithms, data, raster data, bing maps
Id: d7eBl2f0kL8
Channel Id: undefined
Length: 18min 44sec (1124 seconds)
Published: Mon Jan 04 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.