The S11 competition is in full swing. As an old player and geographer in the S3 season, I want to take you to the world of LOL from another perspective.
1. Data acquisition
A Preliminary Study of 1.1 Data
The Alliance of Heroes launched its web version of the World Map at: https://map.leagueoflegends.com/.
When the mouse moves over the icon, there is an administrative map of the area:
As you zoom in, the area becomes clear and has relief:
So this map should have a high-resolution map, a high-resolution map, similar to a raster pyramid. There is also a DEM data to stretch the terrain.
1.2 Map Grabbing
The unchanged F12 key, view web page requests when opened from the page, find png pictures:
1.3 Analysis of the Map Structure of the Alliance of Heroes
Through later data capture and thinking, I sketched a LOL to show the structure of the map:
The map of the League of Heroes is silky to browse, but its principles are complex. Not only will DEM be rendered online, but it will also be judged based on a variety of masks, such as the area covered by the ocean mask, which will produce a ripple effect.
2. Local Map Making
There are three main aspects: the production of vector maps of each city state, the synthesis of high-resolution image maps, and the reconstruction of DEM data.
2.1 City State Vectorization
From the official web page structure, we can get vector maps, each city state has a range raster (.png format, 2048*2048 pixels), for example, the city state of Nox:
We put it in arcgis and describe it one by one according to its boundaries:
2.2 Refactoring DEM Data
From the official website interface, we can see that the three-dimensional terrain data is actually rendered online by Blender using a DEM map. The DEM data we get from the web page is a raster map with Unit8 pixel depth, and the range of DEM values is 0-255.
The Value range of the DEM is 0-146, and we don't know the true elevation. Is there any way to get a general idea of the true height represented by each Value of the DEM?
Consider that the valley plain of the city of Demasia has a pixel value of around 20 and that the LOL peak should exceed 4000 meters. We assume that each pixel value represents a height of 28 meters. Therefore, the highest mountain in the LOL world is 416 meters above sea level.
Using a raster calculator, recalculate the DEM of the LOL world:
Using Blender locally renders DEM data as follows:
Reduplication of 2.3 LOL High Resolution Map
LOL official maps have two resolutions, one is the low resolution of the map overview and the other is the high resolution placed locally. High-resolution maps need to be captured one by one.
I observed that high-resolution map links were regular, so I wrote a script to crawl these pictures down:
After downloading the data, use the mosaic script I wrote before to mosaic the pictures one by one:
#Mosaic images import PIL.Image as Image import os IMAGES_PATH = r'Path to small slices' # Picture Set Address # IMAGES_FORMAT = ['.jpg', '.JPG'] # Picture format IMAGES_FORMAT = ['.png'] # Picture format IMAGE_SIZE = 256 # Size of each small picture IMAGE_ROW = 7 # Picture spacing, that is, when combined into a single image, has several rows IMAGE_COLUMN = 6 # Picture spacing, that is, when combined into a single image, has several columns IMAGE_SAVE_PATH = 'predict.jpg' # Picture converted address #Sort by Number Size files = os.listdir(IMAGES_PATH) files.sort(key=lambda x: int(x.split('.'))) # Get all picture names under the picture set address image_names = [name for name in files for item in IMAGES_FORMAT if os.path.splitext(name) == item] # Simple quantitative judgment on parameter settings and actual picture set size if len(image_names) != IMAGE_ROW * IMAGE_COLUMN: raise ValueError("The number of parameters and requirements for the composite picture do not match!") print(image_names) # Define Image Stitching Function def image_compose(): to_image = Image.new('RGB', (IMAGE_COLUMN * IMAGE_SIZE, IMAGE_ROW * IMAGE_SIZE)) # Create a new diagram # Loop through and paste each picture in sequence to its corresponding location for y in range(1, IMAGE_ROW + 1): for x in range(1, IMAGE_COLUMN + 1): from_image = Image.open(IMAGES_PATH + image_names[IMAGE_COLUMN * (y - 1) + x - 1]).resize( (IMAGE_SIZE, IMAGE_SIZE), Image.ANTIALIAS) to_image.paste(from_image, ((x - 1) * IMAGE_SIZE, (y - 1) * IMAGE_SIZE)) return to_image.save(IMAGE_SAVE_PATH) # Save New Graph
The size of the low-resolution image is 20482048, and the size of the high-resolution image is 71686144.
3. Data analysis
3.1 Land area analysis of each city state
Use the area tabulation tool of gis to count the number of each city state.
Because the LOL world is a spherical planet, it is not known if the map has a projection distortion. For the time being, we will use the number of cells to represent the area of each city state. Nox is not only large in area, but also spans three large areas, which are of great strength.
Although Nox is four times as large as Demasia, it will never give in.
3.2 Topographic analysis of individual Federations
Reclassify the altitude of the LOL world:
An elevation of more than 1960 meters can be considered a mountain range, and you can see the mountain ranges of each city state:
From this picture, we can guess where Texas and Demasia are fighting most fiercely, where the so-called narrow road meets the brave and wins:
4. Write to the end
(1) The tweet is for learning only. Do not use it as illegal use. Any illegal use is not related to me.
(2) Wishing EDG good results, LPL refueling!