MapTiler plugin with Adam Laza

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
alrighty and we are live which is great so hi everyone welcome to the next session of the day it's the third if i've counted correctly um so welcome everybody um thanks for joining in on the session um this session is going to be on the map tyler plugin which is an absolutely fantastic um plugin that i've been using and playing with actually so it's it's really really interesting and basically my tyler plugin allows the native loading of vector tiles but to explain more and for someone who has a lot more experience using it than all the background um tricks and tips um i will hand you over to adam who's coming to us from the czech republic which is so exciting um and he's going to take us through um the math tyler plugin so over to you adam okay thank you amy i will share my screen okay great i can see perfect okay perfect so hi everybody i'm adam uh from map tyler and i will tell you something about the map error qgis plugin we developed uh in map tyler we develop street and satellite maps of the entire world and we also do working on a platform which makes it easy to integrate your own data into into maps i will start with a bit of theory about maps and vector tiles just at the beginning so we have some some kind of context and and then i will move to to the actual plugin so about the vector tiles uh that's how most of the maps usually works on the web they are tiled into into zooms and they are usually in soda mercator projection and every style can be can be found by by its position by zoom and by its coordinate x and y on every zoom the tile will be split into four smaller smaller tiles as you can see on the on the picture there are like historically there there were raster tiles vector tiles are a little bit younger and with raster tiles you get this png image of the of the tile and you directly display it on your on your screen with vector tiles uh the rendering is done on on a client and uh when you when you request a vector file from server you will get a file which is encoded in pbf and it has only a few few bytes and it it it keeps just just data so as you can see here on the on the picture um it it has no visual visual context or any look or feeling it's just the data which are which are saved into different layers there are line layers point layers polygon players um if you if you want to have in your vector tiles just some some like simple geometry it's easy to to to define it but if you want to have a real world map in your vector tiles the schema which defines what will be in the vector tiles can be quite complicated that's why we maintain open source project which is called openmptiles which helps you to to define uh what you want to display in your vector tiles so this openmptile schema defines ok at zoom 5 show me just continents and ocean but at zoom six at some points with uh names of the of the bigger countries etc uh so on this vector teleschema are our vector tiles are based on but once again in vector tiles there are only data but you want to give them some some style style is delivered in separate file which is called style json and uh install json there are layers uh style layers which say uh okay so we have style layer called ocean and you define the color for the ocean then you can have another layer which is called major highway and you def define uh the width of the highway and then you define a minor minor road and you define uh the width of the minor road in the style json in nostalgia jason there is also a source to source section uh where are links to to your vector tiles defined and some metadata links to sprites and fonts i will not go too deep into this uh what i'm saying uh here on the picture you see vector tile it's just one vector tile on a zoom six and it contain it contains the data but you hardly can say what's on the tile actually if you style the data suddenly you will get uh you will get the the map and as you can see you can have the same vector tile with different uh style defined and you will get different look and feel of the map so if you want to have a basic map with just boundaries and roads you will use a simple style if you want use a more um if you want to have a topographic map you will use more topographic style but the point is used you have the same same data same lecture tiles and just different style jsons okay about about the tiles in qgis qga started to support vector tests in 314 uh it was developed by martin de bias from luther consulting and in the in the version 314 uh there are you you could load the vector tiles into qgis but you know you couldn't give them any style or it was quite quite difficult uh that's why we started to develop the map title plugin and in the 314 it was actually the only only way or the easiest way how to style the tiles uh in version 316 the the plugin code was supported into c plus classes in qjs core and since then you can style your vector tiles directly from qgis but if you have a vector style with with multiple sources with multiple vector type sources uh it's still uh you can do it in the in one click if you use directly the menu from qjs that's why metalloplugin is still a slightly better choice if you have complicated or multi-sources uh style um [Music] so metaro plugin is open source it has its own github repository um it's still the work on the plugin is still in progress so if you find any bug just let us know we will be happy to to add some feature requests um and fix any bugs you found a metal plugin allows you to display display vector tiles and style jsons hosted anywhere but by default it uh it brings some predefined maps which are uh which are hosted on map title cloud uh if you want to use your own sergis and your old water tiles just fine to to use the plugin as it is but if you want to use the maps and wait for tiles from uh map tile or cloud you have to have an api key uh which you can you can get if you sign in with your google account on mactelacloud.com uh we have a free plan which is which is more than enough if you want to just just play with director tiles uh but yes as i said uh if you have your own style json hosted on your server you don't need the api key recently we released new version of the auto plugin version 2.0 it's like one month ago and um we added support for icons which were missing in the first version and it was a bit bit a pain we edit outdoor map as one of the predefined maps we implemented a solution for [Music] for labels in uh in various languages and we work on the printing so printing of the printing map is now much much better and it looks better but what does the plugin actually do so as i said install json you defined the style of the of the map and you can see on the left side uh how the style is defined in style json so there is a id of the of the style error lens user residential the type which means that it's a polygon and then there are the defined paint properties like fill color and the opacity so the plugins uh converts this style json into qgis styling so as you can see on the right side there is uh how it will be translated into qjs plugin you can see the the color it's defined there and you can see that the opacity is set to 70 so this style conversion is quite easy however the there are the [Music] the conversion can get more complicated you can see on the on the left side install jason uh there is uh there is some definition of the of the color of a felt outline line and uh as you can see on in nostalgia and it's defined on on five lines and it looks quite um easy to read but if you want to translate this uh this definition from style json to qgis styling uh it starts starts to get complicated because uh you have to use um scale in our function you have to use case expression so in these cases the plugin converts the star json definition to qgis styling definition but as you can see it's uh in qgs styling it's already defined on the definition it's much much complicated and then you can have json which uh with style definitions like this and uh in this case uh qj's uh my title plugin will say okay this is this is too complicated for me i can't translate this so what i am saying if you have really complicated um style definition with uh with a lot of nested expressions uh you might get a warning from qj's plugin that uh that the plugins is not able to to convert the style or not all the layers okay that was about dtra and now let's move to the actual demo oh excitement okay let's start with new profile okay so installation of the plugin is very easy as you would say from from the plugin menu just found my tiler and install it uh the plugin will appear in the in the browser panel uh right now if you uh these are the predefined uh maps that are um are offered from mataro cloud if you want to uh use it you will get a warning that you need an api key which is very easy to get from this metro account window click on the link go to cloud.mapter.com sign in with any google account and that's it now we were assigned into into your cloud account and in your account details information you will get the api key which you can just just copy and paste into pjs okay so we have api key and now we can display a map so the plugin offers various maps these maps are are tuned to looked looked good in qjs the style is is uh is um defined so there are no uh no problems with style conversion and uh the basic one is just the first one on the on the list and as you can see it's uh uh it offers a style which is not too complicated and if you note a really simple base map basic one is the one to go um it's also possible to so so right now the the basic uh this basic map is a webster tiles but uh if you prefer wrestle tasks you can edit also as a raster and now you get a restaurant tiles but what's the main main advantage of the of the vector tiles is the is the level of the sharpness so on this street zoom level it's like looking it looks like with there's no problem but if you zoom really really deep uh as usual with restaurants you you will get uh the lines pixelated so that's why it's always better to use vector tiles because with vector tiles it's vector so the level of sharpness it's it always always beats the the raster uh so this is a basic basic map uh then we have a street map which is uh i would say most popular map which we provide uh it's more colorful um aside from that one really nice is also the outdoor map which we added recently i will just go into some some more uh mountains region [Music] and i will use outdoor so this one is satellite and as as i said um we get a warning that uh style could not be completely converted if you click on details uh it will print a warning that uh expressions in interpolation functions are not supported so that means that in in the in the style of this map there is some expression which is not supported and uh instead of some complicated interpolation it will use just linear interpolation but the map is still visible so this is our satellite map or we call it satellite hybrid map because there are um roads and labels as a vector tiles and and and also there is a raster layer with the actual satellites but i want to show you the outdoor map which is new in uh in this in this version it brings uh bike trails uh via ferratas contour lines hill shading and it's a nice map if you need if you need any base map for uh for an outdoor activity what is really nice about vector tiles is that it's better for printing i can again show the difference if you use raster tiles if you zoom in it starts to get pixelated with vector tiles it looks much better and uh if you decide to i will zoom somewhere if you decide to print it i will use just simple exports to pdf you can define the dpi whatever you wish and you will get you will get a pdf with with high dpi and if you zoom in it's still uh all the labels are very sharp and all the lines are very sharp so it's uh great for printing [Music] what else we edit in the in the latest version as i said we added me support for uh for different languages so if you want to have a map in your language so right now by default there is a there is english but if you want to have it in your own language you can just simply go to customize in cloud and customize editor will appear so you are in customize editor in your website or cloud account and you can simply use different different language so obviously let's try french for example publish the map okay so we have we have this this map published on our cloud and you want to just use vector style and copy link to style json i will copy it and open in qgis here right click on map tyler add a new map and so i added the french version of this map to my metal plugin i will add it to the canvas and i will get the same map but with labels in in french we support more than 50 languages so probably if you want if you are if you need english spanish arabian chinese you you can have it [Music] so that was about about language modification but um you can also quite easily change the style of the map um i will remove those um open the basic one and let's say that i'm quite happy with this map but i want to just slightly modify it so i can customize it in a cloud once again and let's say that i want to just change the color a little bit and make the landscape okay something like this and change the color of the roads so in just few steps i i changed the look and feelings look and feeling of the of the map and i can easily save it call it basic two [Music] i have a new map and once again just go to start json copy it and paste into qgis hmm oh wait for a second i always think of that message as cue just as overwhelmed right now i'll get right back to you i think it's fantastic to have that flexibility and styling you know everyone especially cartographers it's quite a creative pursuit and i think it's fantastic to just be able to you know specify those colors and make sure it fits with the theme even if you're working for a client you can make the colors exactly what is needed i'm really impressed by that functionality uh yes as you mentioned cartographers uh maybe most of the cartographers would say okay but changing coral it's not it's not just about changing colors so um that's why we also have this uh okay so basic two is already here so that's the map that we we modified in in few in few steps but as you said maybe uh cartographers would say okay but i need some more powerful tool and that's why we provide these advanced editing i will save the map first and now i can use the advanced editor uh where you can define much more much more things that just color so you can play with many things like at which zoom level you want to show a layer um you can change the color opacity you can actually manually write the style in json editor and uh this is probably the place where you want to where you want to work if you want if you are like a real cartographer not like me who just change colors um is there a functionality to say um if you have a couple of sld for folders or um that you use often or use as a normal template for all your maps is there functionality to just upload it or would you sort of yeah jason section that's what i would do but so so if you want to create a new map you can either go to we are this customized it's like simple editor we via the editor which is more more advanced but if you have your orange style json already defined uh you can just upload the style um yeah and what i want to mention that it's very easy to change the change the look of the map so uh one of our map which we which i quite often show on this uh kind of talks it's uh this qgis map which we created just just for fun a few few months ago and it's just a matte bit use the styling of ugi's colors uh okay so i think that's pretty much everything about the plugin so yeah if there are any questions i'm happy to answer them awesome thanks so much i see that we do have a comment so buenas dias um there is one question from george um while trying to set up matt tyler on cue just 320 i get multiple errors about fonts not found but that might just be because they've the fonts aren't in your queue just set up um the following yeah so so qgis uh qgis loads the the fonts that you that are installed on your system so if you use if you use uh fonts in your style json and the font is not installed on your system you will get an error so either you have to modify the style json uh to use some like basic basic fonts or you have to install the phones on your system um i'm not sure where george but somewhere in the um cutest universe of resources there is actually a list of loads of fonts that you i'm not sure what system you're running but i know for ubuntu at least that you can literally just um download this whole list of fonts and you will be able to access all of those in qgis um i will have to look up the resource for you but i can attach the link to that in the um [Music] the video um information if i do forget please just message me on telegram if you're on telegram i'm also on telegram so that i can show you because it's it's really it's great to have more fonts than less especially when you're cut doing cartography so yeah that is definitely more acute just problem than a plugin problem alrighty um i just wanted to ask you are the vector tiles live so i know that they're pulling from osm but are they updated frequently if i went out and put in a whole bunch of buildings would that show immediately on on the vector tiles uh okay so that depends on the on the source of your vector tiles this source is defined in your cell json and uh you can use the vector test that that we provide from map terror cloud and uh um we do we we have we update our tiles every month but we also run some quality checks which which takes like four four four weeks so uh if you uh if you [Music] make any change let's say let's say today at the end of october it will most likely be propagated into our vector tiles at the beginning of december if you use the if you use our main typeset which is called reptile planet this is styleset which which has this uh quality control that's why the updates are a little bit um delayed but we have also uh openmctiles planet which is a tileset which uh contains data just from openstreetmap because in the in the in in the first uh in the first style set we use also data from different different sources but we have a tyrosine which is called open metals planet and uh this is um this is a tile set which uh we update on uh every week so if you if if you make any any edits on openstreetmap uh it will get uh into into our tars next week but uh then you have to use this this open street map planet style set in your style json all right fantastic and then i just wanted to know if you know if people um who are watching or just who are interested want to learn a little bit more or contribute in any way to the math tyler universe um how can they go about doing that so what are the best channels uh so uh go just check our website mattel.com uh we have channels on on youtube which are really great if if you want to learn something we have a lot of tutorials there uh we have uh facebook instagram and instagram and all these social media uh or just just just write write us an email and if you are uh interested in in the black plugin specifically just uh just create an issue or create a pull request on the on the github people right fantastic and all of those things we can find at the website yeah sure fantastic then um i'm going to put it up to our audience if they want to ask any more questions this is your last moment but um from my side i want to know where matt tyler kind of wants to go because it's a really really great tool but um where do you want to grow to what kind of things would what kind of functionality would um be ideal to add or want to add to this well i think that our main goal is to provide uh the best maps uh that means uh from the from the like aesthetic point of view and also from the data point of view that's why we try to uh improve our maps every day uh to to bring our customers the uh best maps they uh they need we have several projects like we just started with some weather visualization which also really cool and yeah there are so many things we want to achieve i think weather visualization is fantastic especially in like climate change and that sort of thing i think that's really i didn't even think about that oh you're opening my eyes to all these cool things um yeah and so that is um our time if there's nothing more anyone would like to add from our audience or from your side adam then i will start um wrapping us up okay all right great stuff so um thank you so much for your oh wait let me put my camera on then you can see me great um so thank you so much for your fantastic talk i really i know that most people use math tiles and map tyler especially if they're making maps on a daily basis so it's fantastic to see how the plugin is improving and um it's very exciting that you know there's always some way to go and there's always some way to build so i think the most important thing is is that you're providing such quality data that can be used so um thank you for taking us through step by step giving us a bit of the background and a bit of the theory and um for everyone who is on the cutest open day journey with us um we have the next session coming up in probably about 30 minutes so do go and grab a cup of tea and we will then start off with the last session of the day so thank you so much adam and we'll end there thank you emmy cheers
Info
Channel: QGIS
Views: 358
Rating: undefined out of 5
Keywords:
Id: gyxmu9M6mUU
Channel Id: undefined
Length: 34min 0sec (2040 seconds)
Published: Fri Oct 29 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.