QgisUser0004 - Military Maps

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi got my army t-shirt on and in this episode I'm going to show you how you can create military style coordinate systems for your Maps for this I'm just going to use a simple W mts service as a background map but the background map is not important it's the layout so I'm going to start a new print composer let's call it map for simplicity sake and let's add a map like that so most military maps as a standard has 1 in 50,000 or 1 in 100,000 scale and for my map I'm going to use 50,000 but just typing it here it's easy to for that to change by changing and resizing the data frame so instead I added the value to 50,000 and then it will always be 50,000 no matter what I do and the data frame so that's a little tip then I need a grid so go to grids and first of all I need 1 kilometer grid let's call that UTM 1 kilometer should be a solid grid thousand metres interval and then I could use a frame but I really don't fancy this frame that much but let's go for exterior ticks anyway I need to add this frame also let's go back and make the ticks a bit smaller maybe like that like that okay then I need draw the coordinates as a default it takes the entire coordinate with decimals so I'll quickly skip to custom and edit it for a military-style map it's just the kilometer numbers that are interesting so that if that is the only thing we want you can do that by expression so if I explain what I just did here grid number that is the variable that holds the coordinate for the grid line and the value here I take first five rightmost numbers and then I take the two left most numbers of that and that will give me the kilometer numbers as a whole like that however I would like to have a bit more numbers for some of them so let's add a text label here and increase the font so you can see it perhaps Center it like that and create an expression to do this I need some extra functions and the functions I use I will have links in the description below so you can download them yourselves and you need to place them inside let's see if I can find my file you will in your home folder have a hidden folder called QGIS - and in that one you will have a Python folder and an expressions folder and this is where you are supposed to download as to other functions I won't go in to the contents of the files too much but one of them is by Alexander Neto and it creates it finds the max and min coordinates for a map in your layout and the other one let's see where is it I've created myself and it well essentially it it creates index numbers for your coordinates and it adds MGR s support but I'll get back to that a bit later on so to start with we have a fake grid number here one two three four five six that could be a number like before and if I use the previous formula left alright five - you get it two and three and that is what I want but I for some letters I would like to have more than just the kilometre numbers so I have created a few UTM functions and for instance the short one it does exactly what I did previously with the left/right just creates a 23 and I have a long one and that creates indexed numbers for the rest of the left numbers and and that works by using Unicode so the font you use really need to be able to handle Unicode if you don't see those letters like they are here you need to change the font and then the last one is index and that only takes the higher numbers I create index of those so for my map I would like the zeros and tens and twenty to have index like this and the rest like they are so for that I go back to my coordinates and I start by creating an if statement and if left right Graydon Creed number four one equals zero if that is true if it is a zero should be the short one no it should be the index one UTM index of grid number and it if if it isn't zero it should be a short one UTM short grid like that so if essentially the fourth number from the right is a zero then use the index and I'll just the short number like that now we see we have an index number for the zero and that's you zero and if I pan the map to ten you see an index number again down at ninety there's an index number okay let's stay around this 0 so I can also use these functions to create a corner label so let's zoom into the corner and create level so I want to have UTM long for my number like that let's just style that a bit place it in the corner there but I need to fetch the x-coordinate for the corner in the lower-left here and that is where alexandra nito's expressions come come in handy so this one two three four five six should not be used instead I need to use his functions and they are on the Python map X min and that takes two variables first the name of the layout and that is in my case map and then the index number of the map the map element and since I only have one that's zero like that and there we have the corner the leftmost corner coordinate for the map frame it could actually create a small frame like that no pen black good enough I'll just copy and paste that one to the y axis and rotate it 270 degrees and what I need to change now is from X to Y min that's good enough and these numbers will update when I move around the map maybe not immediately but when you print it or export the map they will be updated and sometimes it depends on how you are assumed in on the map as well anyway they should be updated okay now over to mg Rs that is a military's grid reference system mg Rs and that's a way to simplify reporting positions on a map and that is based on a lettering system that gives two letters as a name for each 100 kilometer big square um that system can be calculated from a few values from the coordinate and those letters will replace the index numbers in the coordinates for instance this 4 and this 65 so first I need to divide the map so I know where the borders or the boundaries between these MGR s letters are let's call that M GRS and that is 100 kilometers now let's make that line a bit bigger like that so we can see it that's all I need for that grid then I need to place labels so for instance let's say we have an M gr s letters a B I want them to follow the map and be placed on either side of the boundary so if this is a B then this should be B be and how the system MGR s system works I won't go into that here but anyway so I want that to follow the grid when I pan and move the map and that means I need to create a grid for it and I want it to be placed between those numbers and I can do that with a bit of tweaking so let's start by creating a new grid and start with the lettering for this area and the upper-left call it MGR as upper-left the grid should be spaced at 100 kilometers but it should be offset so it is short of this number and prone of this number here so for X I offset it minus 500 but I can't put in - so I need to do it like 99 five hundred then it the line will show up here and for the Y I can do 500 so from this X here in the upper left I have created a new cross I won't be using the lines later on but I'll keep it for now I need to draw coordinates but I want letters not numbers so let's go to custom and for now I'm just putting in a B because I want to oh maybe I want to style it bigger I think 14 will be good like that's yep that's fine I'm a label away okay so now I need to use one of my own functions and that is mg Rs by Gram it uses the UTM coordinates in easting and northing plus the number for the UTM zone and it calculates the mg Rs by gram or letters for the coordinate so I'll use I'm just diagram and I need the easting and that is the coordinate line for this one good number and I need a northing and that is the extent of the map frame so I use Alexandra's function but why max for my map layout map index zero and it should be in UTM zone 33 like that okay however now it disappeared here that is because I need to differentiate if the label is placed on the x-axis or on the y-axis so I need an if statement if grid access equals x then I should print that letter those letters otherwise I should look to the y-axis MGR s diagram and for the easting i use the minimum ex extent so the map x mean for my map layout map index 0 and the northing should be the grid number at grid number and it's still UTM zone 33 and close of the if statement ok we have uniform foxtrots in the upper left however I have letters here and those I don't want but those are easy to remove to the right disable and bottom disabled like that now I can also remove the lines so for grid type I choose only frame and annotations ok now I need to repeat this for the upper-right MDRS upper right it should be framing annotations only 100 kilometers the offset for X here should be 500 to the right and it should be above the exists 500 so plus in both cases true coordinates and we should only show them on the top right so left disabled and bottom disabled let's set the font right away as well 14 and custom format use the recent and this time it should be WiMAX that's okay and x-max since I'm interested in this side of the map okay uniform folks Victor Falls and once again mg Rs lower left 100 kilometers and since we are down here I need to plus farm at 500 and minus 500 for y so X 599 500 for y2 all coordinates and I can remove it from the left and remove it from the top should be 14 okay and custom use the recent this time it's y-min since it's the bottom of the map xmax still like that victor echo and the final one MGR as lower room I can't differentiate between left and right obviously if previous one was lower right so the lower left frame eternity she's only 100 kilometers and this time it should be minus 500 for both so I need to put in 99 500 like that do a coordinates and hide them from the right and from the top select the font and make the custom label from the recent and this time it's Wyman and x-men moon okay there we go and as I pan the map around everything will be updated MGR s format also use a code for the UTM zone or as it is called the grid zone designator and I also have a function for that so let's pick a coordinate map x-men mapped 0 and easting and northing map why men map 0 and some 33 this should be a function on mg or s grid sown designator there we go like that so here we have the basics for military styled map and I want the map isn't this tile there and the coordinates on style just put on square around this now you can add as much bells and whistles as you want for your map but by using the custom functions I've showed you here you can absolutely create grids of a military style for your Maps one issue though there is a problem when you get to the boundary to the next UTM zone there is no good way to handle this in qgs so but as long as you stay completely within one UTM zone there is absolutely no problem sadly enough for Sweden for instance Stockholm is exactly on one UTM zone malmö and Gothenburg is on the other oh not really mildly but Gothenburg is on the other so we have a bit of a problem when we want to create maps over an UTM zone in Sweden not as I said as long as you stay within the zone this is a one way to create military styled maps in cubies see you next time [Music] [Applause] [Music] [Applause] [Music]
Info
Channel: Klas Karlsson
Views: 10,474
Rating: undefined out of 5
Keywords: QGIS, MGRS, Military Maps
Id: g2tVai2Ubzo
Channel Id: undefined
Length: 30min 29sec (1829 seconds)
Published: Sun Jan 28 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.