 Hi, hi everyone, and I'm Shivashish and I am a fourth year engineering undergrad, I major in skills And I've been working for the past couple of months on a project called mission support system It's it involves both. I mean it involves maps. It's for atmospheric scientists. So they plot their work Yeah, so they plot the plot the fight flight plot flight path which they take For the atmospheric research it can be used for oceanographic scientists as well But more on that later and let's start with the talk I'll be talking on this topic and I'll be talking about parts of each of these words over. I mean the other set of slides So let's get started What is common among the products listed below the first one is arches then uber and then google maps Clearly this one is quite obvious their maps, right? But of course, we won't be talking about 2d paper maps. They're pretty cool But we won't be talking since we can't use python on that We'll be talking digital maps digital maps are pretty cool. I mean for the last decade they have been used extensively for visualizations and you know for research research purposes as well because You see scientists which which for which the data they involve Geography it's it's quite easier to visualize if you present them in a map Again So what is geographic information system? It's it's something which you know a system or a technology stack which we use to add modify or use Things that involve geographic or geo geospatiality, right? so all all the stack we this is called geographic information system and Maps how they generated like for example, uh, when you when you've used google maps from 10 different places and 10 different zoom levels you get different maps, right this it's not like paper 2d map And you don't get a map and they don't cut layers from it and give it to you They generate this map dynamically every time you request for a map So and also what is the need to separate maps and map servers like, uh Why not they just give you one map or a thousand different maps and ask you to plot the data yourself? You can do that But sometime or the other you'll run out of your memory or your processing power to render the map So it's better to keep them separated and uh, there's a map server. It serves this map They if you want they can collect all your data And then while rendering they can give it back to you. That's easy, right? Also for this talk will be taking an sttp connection and Yeah The the map server and the map client will be connected by an sttp interface. That's how the standards are defined Which I will be talking about sometime down the line And okay, since you have an idea about the talk it is about now Let's talk about what will I cover the first one basic geography or The primer for to understand all these stuff even if you're new to this And creating maps to serve a map servers here to create the maps first I'll be talking about how to create maps and how do you store or manipulate the georata which you Use to create the maps and of course at the end where maps are how to put it all together And this talk will not be about commercial usage of maps or the scale So that's all that's all let's get started. Yeah So first of all we'll talk about I mean this is a list of the topic we'll be talking about When we talk about primer and first of all projections and before that Look at this url and this is the final thing which you have to develop. Yeah to get a map you have to I mean show your server in an interface like this. I'll be going to this link and I think it's visible Give it some time Yeah, so this is the map you get. I mean this is this is a standard for everything This is just in png image. You will go to this link later. You will see something like this So now let's get back to the slides and talk about what are the features they are I'm sorry So, yeah, what are the what are the stuff you need to care about? So look at look at stuff like The service is wms that is a map service. There are a ton of different service But this is the simplest one or you can understand this better and request look at the request It's get map for this instance and bbox is the Bonding box which you put two different coordinates or one coordinate and they're with the night That's a different type of request. But and also SIR is a special reference system. I'll be talking about everything But first I need you to understand why I'll be talking about them And layers are blue marvel in cities. I'll be talking about layers too And we can ignore style in format for now. Yeah format this image format you can get other formats as well So, yeah, so now, you know, what are we going to talk about and why because all of these are necessary to generate the map Map projections map projections try to portray the surface of the earth or a portion of earth on a flat piece of paper or computer screen What is this? so Earth is geordian shape right and uh, there are not when I mean it's easier for us to put it in a paper or to print it And then do stuff on it, right? So to generate maps, we need to first of all project the the surface on a on a piece of paper So look at how we can do it in the in the first example you there's a light inside and The light projects out and each time it hits the second surface after the spear That's the plot of the uh geographic, you know coordinate on the uh paper and you roll out the paper You get a map but and there are other ways to do it as well The second one involves a cone and the third one involves two 2d sheets of circle on the top and bottom So there there's a flaw with it not one many flaws with it We'll talk about distortions. Yeah, so think about this There's a patch in in the equator and then when when the projection is received in the cylindrical surface It'll be more or less same, right? I mean the area would be same but on the same in the same time Imagine something which is on the polia And then the projection would be I mean it would be a cos theta component for the the breath and sign for the height So it will be elongated. I mean, that's why the the common thing which we see the Russia is Quite smaller than its area or it's a different shape. So these are distortions and exactly why we should care about coordinate reference system So coordinate reference system then defines with the help of these coordinates How the two dimensional projected map in your gs is related to real places on earth? So for now, I'll just say that each coordinate system it defines the map projection And we'll see why look at the maps of united states in all of these uh maps Different coordinate reference system are used or they're all different projections And you can tell that the area of some states or distances between two places They cannot be you know, uh nothing is standard. So you just cannot go measure the distance and multiply it by the Units of this map you cannot do that. So that's why keep track of coordinate reference system If you know how you made the map, you know how to calculate area You know how to get the length of these we get the length. I mean get the distance between two places So and also in This is generally done in a way that the the the projections are made to keep one thing constant I mean These are the four major things in which distortions can arise and the Projections are generally they make one thing constant and change the three things But all of these changes can be later fixed or compensated by your Calculations, which you do with reference to coordinate reference system I next we move to layers. So why layers? Okay, what are layers layers are different semantic segments which Are different types of data which can be represented by a map for example Yeah, basically Let's say your this is a haul right we can we can for our convenience We can consider people as one layer and the chairs is another why? because you see okay, this is a 2.5d world and We part it to three different layers the first one is vegetation data then buildings and then street If we combine all of these into one map, it's fine for three. What about If there are like hundred and thousands of layer because there are they will be So you cannot all press them into one one one page and give it to them or one image So that's why layers are defined. Also. They make it easy to query stuff For example, okay, I'll talk about querying stuff within a layer later Now types of views so It's I mean the the definition is self explanatory like you have some data. How do you view it? The one which we already know it to review the top view we go to the top a helicopter view of the place And the second one which is okay. This is a better example. So that's that's that's a that's from a game I don't know where but yeah It's it's a to remap a helicopter which sees from the surface and this one is a mobile RPG a typical mobile RPG game where The dungeon is viewed when we cut the surface of the earth. So this is called a side view and this is used to visualize say The data in a I mean, you know a 2d shape in an ocean or atmosphere anywhere So I will be talking about these two and legend image is something which you use to define all the You know shortcuts we've used in your map So that's about it. That's about all the terms you need to know to understand the rest of the talk Let's now take a shot D2 to understand custom maps And now we'll be talking about how to build maps Before that, how do you use? How do you build? I mean, how do you get the data or how do you keep the data? So there are two major types we'll be talking about. Well, yesterday anand talk the first talk we had anand talked about Vector data so and not because of that, but we'll be talking a lot about raster here But still before that raster is something which Uh, let's say you have an n dimensional image and each I mean Your unit power and area or space would be Storing equal amount of data for example in here Uh, you see all of the coordinates. They store one integer Which in this case, yeah, they represent the g value of the image And each grid represents a data point and the examples. I mean or the the some I mean, okay, they're stored in forms of net CDF geodes if there are others But we'll be talking about net CDF a lot And vector data vector data they're used uh used to work on map for example, they're mostly used to Draw shapes on map or They're mainly 2d. We don't use vector data in 3d maps Or 3d to represent 3d data So, uh, yeah, so they're stored in the form of shapefile or geogation The vertices are stored in or there are points and Yeah markers as well. They they can also be stored as vectors Okay, let's not let's not talk about net CDF. I talked this raster format of data, right? So, uh, okay, what are the complex keys? Why do we need net CDF in the first place? So think about this you have a 2d image or You you store 2d data in the form of csv and latitudes are rows and longitudes are column And when you introduce another factor let's say time then you have to You have to copy the whole series beneath the csv and when you need more dimensions You index the csv and when you need more you create directories like indices. So that's that's messy. You don't do that Okay, you use net CDF net CDF can store Okay, the parts of net net CDF which we need to know are there are variables and dimensions. So dimensions They are variables in which your real data will vary like xyz here Your data will vary according to The variables and those variables are called dimensions will know more about it during the demo and variables are normal variables like Say temperature pressure, whatever you need to represent in a map in a map. That's called a variable Okay, the file is identified nc extension and uh, okay You don't have to do that here. I'll be demoing this but meratu is a data set provided by nasa. They They have variables such as temperature pressure And a lot of things but for this demo We'll use the temperature at two meter data and I'll be demoing this shortly But before that I'll be talking about base map. So base map is this API which you use to draw map and how do we draw that? So I've talked about projections and background right the demo which I will show you it will have Uh Like it will have you it will take your input as to what projection to use the backgrounds can be like the terrain or The sensors image Many types of that then you have They will take your input. Sorry base map will take your input and there are easy apis to draw oceans continents labels If I tell you how to generate maps from your custom data You will later know that all of these stuff can be broken down to The same thing which I'll tell you And the data plot can be done by contour or plot contour There are curves and plot you can plot points or shape files a lot of stuff you can do with plot and I'll be using color but Yeah, and uh map base map is debris deprecated and they are moving in favor of carto pie But I'll ask you to check it out. They don't fully support all the All the coordinates reference system yet, but still that's the Stuff, okay Now let's talk about the demo. Uh, let's let's try to plot data on a map before that I'll do the nc view demo Okay, okay. This is the interface of nc view nc view was developed by some other scientist So, uh, this is what I was talking about it It it it it it like inter in first some value by default from the net cdf file and plots the data So this way you can quickly view the net cdf file. Uh So, okay. Now, let's talk about some stuff. So this is the code used to plot The merit to data set on a map So first of all, I okay. This is the data I loaded I extract longitudes and latitudes and t2m. Okay. I don't know why Did this but yeah, so it extracts all the it's a 3d data set and Okay here check this projection is eck4 right, I'll Do this with a different projection as well. That's where it takes your projection lab 0 long 0 at the center of the map Yeah, and then I I I make a mess grid with lat lawn and I okay map the line 30 It it it converts your latitudinal longitude to x and y these are the coordinates in your crs or local to this map which you're drawing and Yeah, so this is the important line line 17. I color. Okay. I take x and y coordinate as the first second parameters This is the latitude and longitude and this thing which you see here This is a 2d array. You have to make sure this will be a 2d array. We'll take another data set and draw plot But you will see that Your data can have different Like I said, there can be 6 7 10 dimensions to to an hcdf file, right? So you have to make sure this will be a 2d array And these are vmin and vmax are your min and max values and cmap is used to do the colors We'll see this And like I said map draw parallels and meridians. They're used to draw the latitudes and longitudes in the side of the map So, yeah, the cbar is the color bar So you have used cmap to color the map and you want a reference or something you add a cbar Okay, we can run this file here. Okay. In the meanwhile, I'll I'll okay. I think okay. This is the map you get and all this stuff are What I talked about this is the nck4 You know coordinate reference system and you see all the data. This is Explanatory that you know in the equator. It's kind of hot and And the top and bottom is kind of cold and yeah, this data is temperature data t2m That stands for temperature at two meters and Okay So this is another data set and look at this It is a 40 data set in which time is another variable. So see this is where I take time equal to zero and I take everything else. There are three other dimensions But from which I'm taking the average of pressure X is zero was the pressure So I take average of them and this is now ap data now The the point where I said you have to make this a 2d array is np dot squeeze ap There was a single list of single elements. So I had to squeeze that but yeah, so this is where you have to make the change Just make sure you plot The right data when you are given many dimensions And rest of the stuff remains same And the name the plot title that's different but Okay, uh, you okay that that was a I mean that the data we had was only to that area We didn't do anything else here. It smartly plots everything So that's about how to make a map from data now. Look at this We made we added our custom layers into this right and when the maps are generated if you have Points as in this is a land. This is a this is not a land. This is c So that's how you generate like kind of maps which are drawn inside or the the gray maps So this is how you draw it if you have data you can straight out plot it and you get the map And you want to add layers you add layers And yeah, that was my point if you have any any any kind of 3d data you make it to 2d in which you can plot in a paper You use these tools you make a map Let's go back to the slides Okay, this is something I told you press a data set for the world map and yeah I explain how is the map created the map as in uh here the You know gray and gray and white or black and white Okay, so that's done. We know now how to create an uh create a map now. Let's talk about uh Oh wm is the title of the top. It's it's called. It's termed wm as server and there are standards But why okay? They're about uh They're like hundreds of wm app servers and same hundreds of wm app clients and you need to make sure both of them understand each other So that's why this comes in. This is open geospatial consortium So they set the standards for all of the Up products like web map server web map tile server, but yeah, we'll talk about a map server And uh, this is the link to the pdf in which they define everything Will go but will not be going through details here I'll I'll be talking about some points but Okay, I'll be talking about some stuff. We'll uh check on that later. The first of all is get capabilities So this is where you for you are a web map client you go to the web map server You want to check what kind of layers does it provide what kind of uh coordinate fn system? Does it use or there are many are there many can you use all of them? So all of this stuff is done. Uh, when you okay, I'll talk about this later But yeah, let's go to this kind of request Okay, so I have set up a local web map server in my local host and uh, check this out so You see all I mean each layer has their uh name srs in which they are represented lat long bonding walks and uh There are times I guess. Yeah, there are times the starting time and end time So this is uh, you I talked about a 3d data set right or rather 4d This is you have time and you have height So you have to specify everything and then you get an image. So this is uh, yeah So that's about what what kind of stuff are there and get capabilities and then Yeah, and then we'll talk about the next set of requests or next kind of request Uh get map so get map is the first request we made to another web map server and uh This is the demo URL for get map, but we have seen this earlier and Yeah, we get the data which we saw Like that's one of one of the layers it provides I've selected the first layer and this is the kind of data we get just so that The the web map server is deployed properly. We'll we'll check we'll let's say change the coordinate. Yeah Uh So, yeah, we'll skip this layer. I mean, we'll skip this demo for now, but uh, yeah, my point was We can do all of the modifications and we'll still get different maps And get vstack map. This is for the vertical layer, which I talked about Or the side view layer. This is a vertical section of the cloud cover in an area and you can see that I mean, it's a small difference But yeah, you can check it out that the elevation in which the cloud cover like increases is different for that side and less for Here and we demoed a WMS with gis client if we have time, we'll do it more and okay How does python fare in the sector and why should okay first of all, why should one need python to develop wms? Because first of all, it's easy. It's a language. It's pretty easy. It's like plain english but powerful Why not and second is extensible since most of the research are Or or some of the products and stuff are done in python. Why not make the code base, you know Homogeneous and and write it to python So that's why you should I mean we can use python to develop this and why should you contribute because you're using maps every day All the time you should give back And how can you contribute and okay, so ogc is the I mean these are all links you can go check Check the slides and these are all links and ogc is the repository Which which is used to set the standard you can raise issue and tell them stuff changes to make base map is this The library which I talked about very which you use to develop maps and carto pie is the improved one mss is something which I personally work on it's it involves a web map server and a client and other Add-ons, but yeah, if you want you can check it out to understand wms. I use this you can also combine and check Met pie is metrology python. It's also one of the repositories which use a atmospheric, you know Gis and open street map. This is the best one I mean you can even if you don't want to code you can just contribute geographical data to open street map and then be happy Yeah, so thanks. That's that's about my talk. Thanks for attending and this is my twitter handle. This is email I'm open to questions All right a show of hand for questions Okay Hi Thanks for the session a question like you know, uh, I want the latitude-language of all the places on this world Apart from google maps Which provider provides this? This is open. Whatever you told us open spatial dot o g because you know, I want to implement The challenge here is Google has made their apis, you know chargeable. Okay since last year. Yeah, so I'm not finding any other alternates To get all the coordinates the best alternative is, uh, you know open street map. They they have a lot of different You know terrain and different CRS, which I talked about so open street map would be the thing to go to For this there are other alternatives But or there are libraries which work on top of open street map, but that'll be the best stuff Hi My name is go cool. Yeah, I want to know how do you consume the maps here? Like if it is a web thing you can use leaflet or you can use Yeah, or open street maps itself to consume the map data. So in python, is there any library that you're using to consume the Yeah, yeah, I mean as in So that's open street map the the the the visualizer open street map or the google street google earth All of these are map clients, right? You have map clients in python as well. And uh, uh, if you want to check out I linked it to mss. I'll be posting this on twitter later the slides But yeah, my point is we have an open implementation of client in inside mss and there are other as well others as well and But my point is that's not different. No, as in this is code in javascript. That's code in python since Dextro versions are not used nowadays as in to consume any type of data We use we're using a browser or something. So if you want there are already implementation check mss out and There are others as well check for I personally use mss, but check others out to there are there I'm sure Any more questions Any more questions from the audience? Okay, so I guess we'll end this session here. Uh, thank you, Srivashish. Thanks