CN114218338A - Map level information file generation method, device, equipment and storage medium - Google Patents

Map level information file generation method, device, equipment and storage medium Download PDF

Info

Publication number
CN114218338A
CN114218338A CN202111299481.7A CN202111299481A CN114218338A CN 114218338 A CN114218338 A CN 114218338A CN 202111299481 A CN202111299481 A CN 202111299481A CN 114218338 A CN114218338 A CN 114218338A
Authority
CN
China
Prior art keywords
map
pixel
target
pixel unit
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111299481.7A
Other languages
Chinese (zh)
Inventor
刘舟
杨帆
马柏威
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Sanqi Jiyao Network Technology Co ltd
Original Assignee
Guangzhou Sanqi Jiyao Network Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Sanqi Jiyao Network Technology Co ltd filed Critical Guangzhou Sanqi Jiyao Network Technology Co ltd
Priority to CN202111299481.7A priority Critical patent/CN114218338A/en
Publication of CN114218338A publication Critical patent/CN114218338A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Remote Sensing (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The application relates to a map layer level information file generation method and device, computer equipment and a storage medium. The method comprises the following steps: acquiring a map level picture; analyzing the pixel information of each pixel unit in the map level picture, and determining a target pixel unit according to the pixel information of each pixel unit; and according to the target map service layer mapped by the map level picture, associating the map data of the target map service layer for each target pixel unit to generate a map level information file of the target map service layer. By adopting the method, the development efficiency of the virtual map can be improved.

Description

Map level information file generation method, device, equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for generating a map layer level information file, a computer device, and a storage medium.
Background
With the development of computer technology, virtual map technology appears, and a large amount of map data is contained in a virtual map, which is one of important tasks for virtual map development in editing and maintaining the map data in the virtual map.
In the conventional virtual map development process, developers need to manually edit little by using an editing engine according to a pre-drawn map design drawing. For example, after taking a map design drawing, developers see several "trees" in the lower right corner of the map design drawing, and then they select the resource "tree" in the editing engine and put it in the lower right corner of the virtual map in the engine, and then manually check whether the positions of the several "trees" in the map design drawing and the virtual map are consistent, so that the editing of the whole virtual map is completed at one point. However, such manual editing is time-consuming and labor-consuming, so that the development efficiency of the virtual map is low. Moreover, synchronizing the map data to the server database after editing is also an extremely complex and tedious task, and subsequent maintenance of the map data is also a task with extremely high difficulty and easy error. Therefore, a set of map development schemes which are efficient, simple to operate, convenient to adjust and support data synchronization is needed.
Disclosure of Invention
In view of the above, it is necessary to provide a map level information file generation method, apparatus, computer device, and storage medium capable of improving the efficiency of virtual map development.
A map level information file generation method comprises the following steps: acquiring a map level picture; analyzing the pixel information of each pixel unit in the map level picture, and determining a target pixel unit according to the pixel information of each pixel unit; and according to the target map service layer mapped by the map level picture, associating the map data of the target map service layer for each target pixel unit to generate a map level information file of the target map service layer.
In one embodiment, determining the target pixel unit according to the pixel information of each pixel unit includes: and determining the pixel unit of which the pixel information is matched with the preset information as a target pixel unit.
In one embodiment, a pixel unit includes a plurality of pixels, and analyzing pixel information of each pixel unit in a map-level picture includes: acquiring pixel information of each pixel point in a pixel unit; respectively counting the number of pixel points carrying different pixel information in a pixel unit; and taking the pixel information of the pixel point with the largest number as the pixel information of the pixel unit.
In one embodiment, associating the map data of the target map service layer for each target pixel unit, and generating a map level information file of the target map service layer includes: generating a two-dimensional array to be assigned according to the size information of the map level picture and the size information of each pixel unit; determining coordinate information of each target pixel unit in a map level picture; determining corresponding target elements of each target pixel unit in the two-dimensional array to be assigned; assigning the two-dimensional array to be assigned by taking the coordinate information as an index value of each target element and taking the map data of the target map service layer as a numerical value of each target element to obtain an assigned two-dimensional array; and generating a map level information file of the target map service layer according to the assigned two-dimensional array.
In one embodiment, the method further comprises: displaying the assigned two-dimensional array in a display interface; and responding to the modification operation of the numerical value of any element in the assigned two-dimensional array, and updating the numerical value of the element corresponding to the modification operation.
In one embodiment, the method further comprises: responding to a replacing instruction of a target map service layer, and acquiring a new map hierarchical picture; and generating a map level information file of the target map service layer according to the new map level picture.
In one embodiment, the method further comprises: rendering according to the map level information file to generate a virtual map service layer; responding to the triggering operation of any position in the virtual map service layer, and determining a pixel unit to be edited corresponding to the triggering operation; and in response to the modification operation of the map data associated with the pixel unit to be edited, updating the map data corresponding to the pixel unit to be edited.
A map-level information file generation apparatus, the apparatus comprising:
the image acquisition module is used for acquiring a map level image;
the pixel analysis module is used for analyzing the pixel information of each pixel unit in the map level picture and determining a target pixel unit according to the pixel information of each pixel unit;
and the file generation module is used for associating the map data of the target map business layer for each target pixel unit according to the target map business layer mapped by the map hierarchical picture to generate a map hierarchical information file of the target map business layer.
A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the map-level information file generation method described above when executing the computer program.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the map-level information file generation method described above.
The map hierarchy information file generation method, the map hierarchy information file generation device, the computer equipment and the storage medium determine the target pixel units in the map hierarchy picture by analyzing the map hierarchy picture, and associate the map data of the map service layer corresponding to the map hierarchy picture for each target pixel unit, so that the map hierarchy picture is converted into the map hierarchy information file for describing the data information of the virtual map service layer. By adopting the method, a user does not need to manually edit the map data of each service layer of the virtual map by contrasting the landing layer level pictures, but can quickly and efficiently convert the map level pictures into the map level information files for describing the data information of the virtual map service layers by importing the map level pictures, so that the development efficiency of the virtual map can be improved.
Drawings
FIG. 1 is a diagram of an application environment of a map level information file generation method in one embodiment;
FIG. 2 is a flowchart illustrating a method for generating a map level information file according to an embodiment;
FIG. 3 is a flowchart illustrating steps of generating a map hierarchy information file for a target map business layer in one embodiment;
FIG. 4 is a diagram of modifying map data in a virtual map business layer, in one embodiment;
FIG. 5 is a block diagram showing the construction of a map level information file generating apparatus according to an embodiment;
FIG. 6 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The map level information file generation method provided by the application can be applied to the application environment shown in fig. 1. The terminal 102 acquires a map level picture; analyzing the pixel information of each pixel unit in the map level picture, and determining a target pixel unit according to the pixel information of each pixel unit; and according to the target map service layer mapped by the map level picture, associating the map data of the target map service layer for each target pixel unit to generate a map level information file of the target map service layer. The terminal 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices.
In an embodiment, as shown in fig. 2, a map layer level information file generation method is provided, which is described by taking the example that the method is applied to the terminal in fig. 1, and includes the following steps:
step S202: and acquiring a map level picture.
The map level picture can be a binary picture describing relevant information of any map service layer of the map in the form of a binary image. Each pixel in a binary image has only two possible pixel values or pixel grey scale states, and thus a binary image may also be referred to as a black-and-white image or a monochrome image. The map level picture can also be a picture describing relevant information of any map service level of the map in the form of a color image, a transparency image and the like. The map level picture is used as a picture file, which can be stored in any picture format, and is not limited herein. The map service layer refers to a map layer of a map containing certain type of service data, for example, a map service layer representing movable area data, a map service layer representing terrain rendering data, a map service layer representing public resource point position data, and the like.
In this step, the user may select a map level picture that is desired to generate the map level information file, and trigger a picture import instruction for importing the selected map level picture to the terminal, and the terminal acquires the imported map level picture in response to the picture import instruction triggered by the user.
Step S204: and analyzing the pixel information of each pixel unit in the map level picture, and determining a target pixel unit according to the pixel information of each pixel unit.
The pixel unit may only include one pixel point, or may include a plurality of pixel points, that is, one pixel point may be used as one pixel unit, or a cell formed by a plurality of pixel points may be used as one pixel unit. The size and the shape of the cell formed by the pixel points are not limited, and the cell can be set by self according to requirements. Illustratively, if a map level information file of a hexagonal mesh virtual map needs to be generated, the shape of the pixel unit may be set to be a hexagonal mesh shape. The target pixel unit is a pixel unit in which pixel information determined from a plurality of pixel units in the map-level picture meets a condition.
The pixel information refers to information reflecting the characteristics of the pixel. For example, for a binary picture describing information in a binary image, each pixel on the binary picture has only two possible pixel values, namely "0" or "1"; or, each pixel thereon has only two possible gray scale states, i.e., "0 level" or "255 level", and therefore, if the map-level picture is a binary picture, the pixel information may include a pixel value or pixel gray scale information. For pictures describing information in a color image, the pixel information may also include pixel color values and the like. For pictures where the information is described in a transparency image, the pixel information may also include pixel transparency values and the like.
In this step, after acquiring a map-level picture imported by a user, the terminal may perform image analysis processing on the map-level picture, analyze pixel information such as a pixel value or a pixel grayscale of each pixel unit in the map-level picture, determine whether the pixel information meets a set condition according to the pixel information obtained by the analysis, and determine a pixel unit of which the pixel information meets the condition as a target pixel unit.
For example, in a case that one pixel point is taken as one pixel unit, the terminal may respectively take the pixel information of each pixel point as the pixel information of the pixel unit corresponding to the pixel point; under the condition that a cell formed by a plurality of pixel points is used as a pixel unit, the terminal can respectively acquire the pixel information of each pixel point in the pixel unit, and the pixel information of the pixel unit is determined after the statistical analysis is carried out on the pixel information of each pixel point.
Step S206: and according to the target map service layer mapped by the map level picture, associating the map data of the target map service layer for each target pixel unit to generate a map level information file of the target map service layer.
The map data refers to data reflecting geographic characteristic information in the virtual map, and may be data such as numbers, enumerated values, character strings, and the like. The map level information file is a computer readable file for describing map data information of a certain service layer of the virtual map, and each service layer of the virtual map can be generated by rendering according to each map layer level information file.
Specifically, a map level picture may be configured to map at least one map business layer. The mapping relation between the map level pictures and the map service layer can be configured in a user-defined mode. For example, a user can configure a mapping relationship between a map hierarchy picture and a map service layer by self-definition through a display interface of a terminal, and submit configured data representing the mapping relationship to the terminal, so that the terminal takes the map service layer mapped by the map hierarchy picture as a target map service layer according to the mapping relationship configured by the user, and associates map data of the target map service layer with a target pixel unit in the map hierarchy picture, thereby converting the map hierarchy picture into a map hierarchy information file for describing information of the target map service layer.
For example, a user may import a map hierarchy picture into a terminal, the user may configure a mapping relationship between the map hierarchy picture and a map service layer through a display interface of the terminal, and if the user configures the map hierarchy picture as a grassy layer of a mapping map, the terminal may associate map data of the grassy layer for each target pixel unit of the map hierarchy picture according to the grassy layer mapped by the map hierarchy picture, that is, associate map data representing a grassy field for each target pixel unit, thereby generating a map hierarchy information file for describing information of the grassy layer.
Further, the user may further continue to import another map hierarchy picture to the terminal, and configure the sea level of the map hierarchy picture, so that the terminal may associate, for each target pixel unit of the map hierarchy picture, map data of the sea level according to the sea level mapped by the map hierarchy picture, that is, associate, for each target pixel unit, map data representing the sea, thereby generating a map hierarchy information file for describing information of the sea level. By introducing the map level pictures one by one or introducing a plurality of map level pictures at one time and configuring the mapping relation between the introduced map level pictures and the map service layer, the terminal can quickly generate a map level information file for describing the information of each map service layer according to the introduced map level pictures and the map service layer mapped by the map level pictures,
further, a map information file for describing information of the entire virtual map can be quickly obtained by integrating the respective map-level information files.
The map level information file generation method determines the target pixel units in the map level picture by analyzing the map level picture, and associates the map data of the map service layer corresponding to the map level picture for each target pixel unit, thereby converting the map level picture into the map level information file for describing the data information of the virtual map service layer. By adopting the method, a user does not need to manually edit the map data of each service layer of the virtual map by contrasting the landing layer level pictures, but can quickly and efficiently convert the map level pictures into the map level information files for describing the data information of the virtual map service layers by importing the map level pictures, so that the development efficiency of the virtual map can be improved.
In one embodiment, determining the target pixel unit according to the pixel information of each pixel unit includes: and determining the pixel unit of which the pixel information is matched with the preset information as a target pixel unit.
In this embodiment, preset information for determining the target pixel unit may be preset, and after the terminal obtains the pixel information of each pixel unit through parsing, the pixel information obtained through parsing may be compared with the preset information, and when the pixel information matches with the preset information, the pixel unit with the pixel information matching with the preset information is determined as the target pixel unit.
Illustratively, the terminal obtains a pixel value of each pixel unit by performing image analysis on the map-level picture, and for a binary picture, the pixel value of each pixel unit is "0" or "1". If the preset information is "1", the terminal may determine whether the pixel value of each pixel unit matches the preset information, that is, determine whether the pixel value of each pixel unit is "1", and if so, determine the pixel unit with the pixel value of "1" as the target pixel unit. Of course, the pixel value "0" may also be set as the preset information as needed, and whether the pixel value of each pixel unit is "0" is determined, so that the pixel unit with the pixel value "0" is determined as the target pixel unit, and the like.
In one embodiment, a pixel unit includes a plurality of pixels, and analyzing pixel information of each pixel unit in a map-level picture includes: acquiring pixel information of each pixel point in a pixel unit; respectively counting the number of pixel points carrying different pixel information in a pixel unit; and taking the pixel information of the pixel point with the largest number as the pixel information of the pixel unit.
In this embodiment, the terminal may respectively analyze the pixel information of each pixel point in the pixel unit, and if the pixel information of the pixel points included in the pixel unit is not completely the same, the number of the pixel points corresponding to different pixel information may be counted, and the pixel information of the pixel point with the largest number is used as the pixel information of the pixel unit.
Exemplarily, if the map-level picture is a binary picture, one pixel unit includes 9 pixel points, the number of the pixel points whose pixel values are "1" is 5, and the number of the pixel points whose pixel values are "0" is 4, the pixel information of the pixel point whose pixel value is "1" is taken as the pixel information of the pixel unit, that is, the pixel value of the pixel unit is "1".
Exemplarily, if the map-level picture is a color picture, and one pixel unit includes 9 pixels, three different pixel color values are provided, where the pixel color value is 1 pixel with RGB (0, 0, 255), 2 pixels with RGB (0, 255, 0), and 6 pixels with RGB (255, 0, 0), the pixel color value is (255, 0, 0) and the pixel color value of the pixel unit is (RGB ═ 0, 0).
In an embodiment, if the number of the pixel points of different pixel information in one pixel unit is the same, the priority of the pixel information can be set by user according to the business requirement, and the pixel information with higher priority is used as the pixel information of the pixel unit. For example, for a binary picture, if the number of pixels with a pixel value of "1" in a pixel unit is the same as the number of pixels with a pixel value of "0", the priority of "1" may be preset to be greater than "0", and in this case, the pixel with a pixel value of "1" is used as the pixel information of the pixel unit.
In an embodiment, referring to fig. 3, fig. 3 is a flowchart illustrating a step of generating a map hierarchy information file of a target map service layer in an embodiment, specifically, associating map data of the target map service layer with each target pixel unit to generate the map hierarchy information file of the target map service layer, which may include the following steps:
step S302: and generating a two-dimensional array to be assigned according to the size information of the map level picture and the size information of each pixel unit.
Step S304: coordinate information of each target pixel unit in the map-level picture is determined.
Step S306: and determining the corresponding target element of each target pixel unit in the two-dimensional array to be assigned.
Step S308: and assigning the two-dimensional array to be assigned by taking the coordinate information as the index value of each target element and taking the map data of the target map service layer as the numerical value of each target element to obtain the assigned two-dimensional array.
Step S310: and generating a map level information file of the target map service layer according to the assigned two-dimensional array.
In this embodiment, the terminal may determine the number of rows and columns of the to-be-assigned two-dimensional array and the number of elements to be generated according to the size of the map-level picture and the size of each set pixel unit, where each pixel unit corresponds to one element in the to-be-assigned two-dimensional array. The terminal can determine the coordinate information of each target pixel unit according to the position information of each target pixel unit in the map level picture, determine the corresponding target element of each target pixel unit in the to-be-assigned two-dimensional array according to the position information of each target pixel unit in the map level picture, use the coordinate information of each target pixel unit as the index value of each target element in the to-be-assigned two-dimensional array, use the map data of the target map service layer as the corresponding numerical value of each target element, assign the to-be-assigned two-dimensional array, and obtain the assigned two-dimensional array.
Furthermore, the terminal can also convert the generated assigned two-dimensional array into a byte array, store the level information representing the target map service layer at the first position of the byte array, and generate a map level information file which can be read by a rendering engine according to the byte array.
Illustratively, assuming that the size of the map level picture is 100 × 100, the size of the pixel unit is 1 × 1, and the generated two-dimensional array a is an array of 100 × 100. The coordinate information of the target pixel unit of the map level picture is represented by (x, y), the index value of each target element in the array can be represented by a [ x ] [ y ], the value ranges of x and y are determined according to the position of each target pixel unit in the map level picture, and the numerical value of the index value a [ x ] [ y ] is map data of the target map service layer.
In one embodiment, the method further comprises: displaying the assigned two-dimensional array in a display interface; and responding to the modification operation of the numerical value of any element in the assigned two-dimensional array, and updating the numerical value of the element corresponding to the modification operation.
In this embodiment, the terminal may further display the generated assigned two-dimensional array in a display interface for a user to view. And each element in the assigned two-dimensional array corresponds to each pixel unit in the map level picture. And the user can edit and modify the numerical value of any element in the assigned two-dimensional array through the display interface, and the terminal updates the numerical value of the modified element in response to the modification operation of the user. The modification operation may include operations of adding data, deleting data, or changing data.
In this embodiment, when analyzing the pixel information of the map-level picture to associate the map data, the target pixel unit may be determined to be inaccurate, so that a small number of pixel units may be associated with the map data but not associated with the map data, or the map data may be associated with the map data but not associated with the map data. According to the embodiment, the assigned two-dimensional array is displayed on the display interface, and the user is supported to check and modify the numerical value of any element in the assigned two-dimensional array, so that the map data can be finely edited and adjusted, and the accuracy of information in the map level information file is improved.
In one embodiment, the method further comprises: responding to a replacing instruction of a target map service layer, and acquiring a new map hierarchical picture; and generating a map level information file of the target map service layer according to the new map level picture.
In this embodiment, when a user desires to modify the map data of the target map service layer in a larger area, a replacement instruction for the target map service layer may be further triggered, and the terminal receives, in response to the replacement instruction, a new map-level picture imported for the target map service layer, parses pixel information of each pixel unit in the new map-level picture, determines a target pixel unit according to the pixel information of each pixel unit, and associates the map data of the target map service layer with each target pixel unit, thereby converting the new map-level picture into a map-level information file of the target map service layer.
By the embodiment, any map service layer can be modified quickly, map data in the map service layer does not need to be modified one by one, and the map data of the whole map service layer can be adjusted comprehensively only by replacing map level pictures, so that the modification efficiency of the map data is improved.
In one embodiment, the method further comprises: and rendering according to the map level information file to generate a virtual map service layer.
In this embodiment, the terminal may further import the generated map hierarchy information file into the rendering engine, so that the rendering engine generates a grid unit of a service layer of the virtual map according to each pixel unit in the map hierarchy information file, and renders the content of each target grid unit according to the map data of the target map service layer associated with each target pixel unit, thereby generating the virtual map service layer corresponding to the information represented by the map hierarchy picture. For example, if the target pixel units are associated with map data of a grassland layer, the rendering engine is used to render the effect of generating a grassland in the target grid unit corresponding to each target pixel unit according to the map data representing the grassland, so as to obtain a virtual map grassland layer.
Further, the method of this embodiment may further comprise the steps of: responding to the triggering operation of any position in the service layer of the virtual map, and determining a pixel unit to be edited corresponding to the triggering operation; and in response to the modification operation of the map data associated with the pixel unit to be edited, updating the map data corresponding to the pixel unit to be edited.
In the implementation, the terminal can also support the modification operation of the map data of the virtual map service layer generated by rendering the map level information file, and the user can more directly and definitely judge which map data may have errors through the rendered virtual map service layer, so that the efficiency of fine modification of the map data can be further improved through the embodiment.
Exemplarily, referring to fig. 4, fig. 4 is a schematic diagram of modifying map data in a virtual map service layer in an embodiment, a user may perform a trigger operation at any position in the virtual map service layer 400 through a mouse, a keyboard, a finger, and the like, a terminal determines a pixel unit corresponding to the position according to the trigger operation and uses the pixel unit as a pixel unit to be edited 401, the user may perform a modification operation on the map data corresponding to the pixel unit to be edited 401, and the terminal receives the modified new map data and updates the map data corresponding to the pixel unit to be edited into the new map data modified again by the user.
In one embodiment, the terminal may further send the generated map level information file to the server in response to a data upload instruction, so that the server performs data cooperation processing or data integration processing according to the map level information file received from different terminals.
In the embodiment, the map level information file is synchronized to the server, so that the server can read the map data in the file in time and store the map data in the database, and data support is provided for other business development. In addition, the server can also receive map level information files sent by different terminals to perform data integration processing or data cooperation processing, so that the aim of developing a virtual map by a plurality of terminals is fulfilled.
It should be understood that although the various steps in the flow charts of fig. 2-3 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-3 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 5, there is provided a map layer level information file generating apparatus, including: a picture taking module 510, a pixel parsing module 520, and a file generating module 530, wherein:
a picture acquiring module 510, configured to acquire a map level picture.
The pixel analysis module 520 is configured to analyze pixel information of each pixel unit in the map-level picture, and determine a target pixel unit according to the pixel information of each pixel unit.
The file generating module 530 is configured to associate, for each target pixel unit, map data of a target map service layer according to the target map service layer mapped by the map hierarchy picture, and generate a map hierarchy information file of the target map service layer.
In one embodiment, the pixel parsing module 520 determines a pixel unit of which the pixel information matches the preset information as the target pixel unit.
In one embodiment, one pixel unit includes a plurality of pixels, and the pixel analysis module 520 obtains pixel information of each pixel in the pixel unit; respectively counting the number of pixel points carrying different pixel information in a pixel unit; and taking the pixel information of the pixel point with the largest number as the pixel information of the pixel unit.
In one embodiment, the file generating module 530 generates a two-dimensional array to be assigned according to the size information of the map-level picture and the size information of each pixel unit; determining coordinate information of each target pixel unit in a map level picture; determining corresponding target elements of each target pixel unit in the two-dimensional array to be assigned; assigning the two-dimensional array to be assigned by taking the coordinate information as an index value of each target element and taking the map data of the target map service layer as a numerical value of each target element to obtain an assigned two-dimensional array; and generating a map level information file of the target map service layer according to the assigned two-dimensional array.
In one embodiment, the apparatus further includes a data modification module 540, where the data modification module 540 is configured to display the assigned two-dimensional array in a display interface; and responding to the modification operation of the numerical value of any element in the assigned two-dimensional array, and updating the numerical value of the element corresponding to the modification operation.
In one embodiment, the data modification module 540 is further configured to obtain a new map layer-level picture in response to a replacement instruction for the target map service layer; and generating a map level information file of the target map service layer according to the new map level picture.
In one embodiment, the data modification module 540 is further configured to generate a virtual map service layer according to the map hierarchy information file; responding to the triggering operation of any position in the virtual map service layer, and determining a pixel unit to be edited corresponding to the triggering operation; and in response to the modification operation of the map data associated with the pixel unit to be edited, updating the map data corresponding to the pixel unit to be edited.
For the specific limitation of the map level information file generation device, reference may be made to the above limitation on the map level information file generation method, which is not described herein again. The respective modules in the map level information file generation apparatus described above may be wholly or partially implemented by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 6. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a map level information file generation method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 6 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program: acquiring a map level picture; analyzing the pixel information of each pixel unit in the map level picture, and determining a target pixel unit according to the pixel information of each pixel unit; and according to the target map service layer mapped by the map level picture, associating the map data of the target map service layer for each target pixel unit to generate a map level information file of the target map service layer.
In one embodiment, when the processor executes the computer program to determine the target pixel unit according to the pixel information of each pixel unit, the following steps are specifically implemented: and determining the pixel unit of which the pixel information is matched with the preset information as a target pixel unit.
In one embodiment, when the processor executes the computer program to realize the analysis of the pixel information of each pixel unit in the map level picture, the following steps are specifically realized: acquiring pixel information of each pixel point in a pixel unit; respectively counting the number of pixel points carrying different pixel information in a pixel unit; and taking the pixel information of the pixel point with the largest number as the pixel information of the pixel unit.
In one embodiment, when the processor executes the computer program to associate the map data of the target map service layer with each target pixel unit and generate the map level information file of the target map service layer, the following steps are specifically implemented: generating a two-dimensional array to be assigned according to the size information of the map level picture and the size information of each pixel unit; determining coordinate information of each target pixel unit in a map level picture; determining corresponding target elements of each target pixel unit in the two-dimensional array to be assigned; assigning the two-dimensional array to be assigned by taking the coordinate information as an index value of each target element and taking the map data of the target map service layer as a numerical value of each target element to obtain an assigned two-dimensional array; and generating a map level information file of the target map service layer according to the assigned two-dimensional array.
In one embodiment, the processor, when executing the computer program, further performs the steps of: displaying the assigned two-dimensional array in a display interface; and responding to the modification operation of the numerical value of any element in the assigned two-dimensional array, and updating the numerical value of the element corresponding to the modification operation.
In one embodiment, the processor, when executing the computer program, further performs the steps of: responding to a replacing instruction of a target map service layer, and acquiring a new map hierarchical picture; and generating a map level information file of the target map service layer according to the new map level picture.
In one embodiment, the processor, when executing the computer program, further performs the steps of: rendering according to the map level information file to generate a virtual map service layer; responding to the triggering operation of any position in the virtual map service layer, and determining a pixel unit to be edited corresponding to the triggering operation; and in response to the modification operation of the map data associated with the pixel unit to be edited, updating the map data corresponding to the pixel unit to be edited.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: acquiring a map level picture; analyzing the pixel information of each pixel unit in the map level picture, and determining a target pixel unit according to the pixel information of each pixel unit; and according to the target map service layer mapped by the map level picture, associating the map data of the target map service layer for each target pixel unit to generate a map level information file of the target map service layer.
In one embodiment, when the computer program is executed by the processor to determine the target pixel unit according to the pixel information of each pixel unit, the following steps are specifically implemented: and determining the pixel unit of which the pixel information is matched with the preset information as a target pixel unit.
In one embodiment, when executed by a processor, the computer program implements the following steps when analyzing pixel information of each pixel unit in a map level picture: acquiring pixel information of each pixel point in a pixel unit; respectively counting the number of pixel points carrying different pixel information in a pixel unit; and taking the pixel information of the pixel point with the largest number as the pixel information of the pixel unit.
In one embodiment, when the computer program is executed by the processor to associate the map data of the target map service layer with each target pixel unit and generate the map level information file of the target map service layer, the following steps are specifically realized: generating a two-dimensional array to be assigned according to the size information of the map level picture and the size information of each pixel unit; determining coordinate information of each target pixel unit in a map level picture; determining corresponding target elements of each target pixel unit in the two-dimensional array to be assigned; assigning the two-dimensional array to be assigned by taking the coordinate information as an index value of each target element and taking the map data of the target map service layer as a numerical value of each target element to obtain an assigned two-dimensional array; and generating a map level information file of the target map service layer according to the assigned two-dimensional array.
In one embodiment, the computer program when executed by the processor further performs the steps of: displaying the assigned two-dimensional array in a display interface; and responding to the modification operation of the numerical value of any element in the assigned two-dimensional array, and updating the numerical value of the element corresponding to the modification operation.
In one embodiment, the computer program when executed by the processor further performs the steps of: responding to a replacing instruction of a target map service layer, and acquiring a new map hierarchical picture; and generating a map level information file of the target map service layer according to the new map level picture.
In one embodiment, the computer program when executed by the processor further performs the steps of: rendering according to the map level information file to generate a virtual map service layer; responding to the triggering operation of any position in the virtual map service layer, and determining a pixel unit to be edited corresponding to the triggering operation; and in response to the modification operation of the map data associated with the pixel unit to be edited, updating the map data corresponding to the pixel unit to be edited.
It will be understood by those skilled in the art that all or part of the processes of the methods for implementing the embodiments described above can be implemented by hardware related to instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, the computer program can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A map level information file generation method, the method comprising:
acquiring a map level picture;
analyzing the pixel information of each pixel unit in the map-level picture, and determining a target pixel unit according to the pixel information of each pixel unit;
and according to the target map service layer mapped by the map level picture, associating the map data of the target map service layer for each target pixel unit to generate a map level information file of the target map service layer.
2. The method of claim 1, wherein determining a target pixel unit according to the pixel information of each pixel unit comprises:
and determining the pixel unit of which the pixel information is matched with the preset information as the target pixel unit.
3. The method according to claim 1, wherein one pixel unit includes a plurality of pixels, and the analyzing the pixel information of each pixel unit in the map-level picture includes:
acquiring pixel information of each pixel point in the pixel unit;
respectively counting the number of pixel points carrying different pixel information in the pixel unit;
and taking the pixel information of the pixel point with the largest number as the pixel information of the pixel unit.
4. The method of claim 1, wherein the associating the map data of the target map business layer for each of the target pixel units to generate a map hierarchy information file of the target map business layer comprises:
generating a two-dimensional array to be assigned according to the size information of the map level picture and the size information of each pixel unit;
determining coordinate information of each target pixel unit in the map-level picture;
determining a corresponding target element of each target pixel unit in the to-be-assigned two-dimensional array;
assigning the two-dimensional array to be assigned to obtain an assigned two-dimensional array by taking the coordinate information as an index value of each target element and taking the map data of the target map service layer as a numerical value of each target element;
and generating a map level information file of the target map service layer according to the assigned two-dimensional array.
5. The method of claim 4, further comprising:
displaying the assigned two-dimensional array in a display interface;
and responding to the modification operation of the numerical value of any element in the assigned two-dimensional array, and updating the numerical value of the element corresponding to the modification operation.
6. The method of claim 1, further comprising:
responding to a replacing instruction of the target map service layer, and acquiring a new map hierarchical picture;
and generating a map level information file of the target map service layer according to the new map level picture.
7. The method of claim 1, further comprising:
rendering according to the map level information file to generate a virtual map service layer;
responding to a trigger operation of any position in the virtual map service layer, and determining a pixel unit to be edited corresponding to the trigger operation;
and updating the map data corresponding to the pixel unit to be edited in response to the modification operation of the map data associated with the pixel unit to be edited.
8. An apparatus for generating map level information files, the apparatus comprising:
the image acquisition module is used for acquiring a map level image;
the pixel analysis module is used for analyzing the pixel information of each pixel unit in the map-level picture and determining a target pixel unit according to the pixel information of each pixel unit;
and the file generation module is used for associating the map data of the target map business layer for each target pixel unit according to the target map business layer mapped by the map hierarchical picture to generate a map hierarchical information file of the target map business layer.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 7 are implemented when the computer program is executed by the processor.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202111299481.7A 2021-11-04 2021-11-04 Map level information file generation method, device, equipment and storage medium Pending CN114218338A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111299481.7A CN114218338A (en) 2021-11-04 2021-11-04 Map level information file generation method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111299481.7A CN114218338A (en) 2021-11-04 2021-11-04 Map level information file generation method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114218338A true CN114218338A (en) 2022-03-22

Family

ID=80695667

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111299481.7A Pending CN114218338A (en) 2021-11-04 2021-11-04 Map level information file generation method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114218338A (en)

Similar Documents

Publication Publication Date Title
CN114115844A (en) Page generation method and device, computer equipment and storage medium
JP2022531638A (en) Element rendering method, device, computer program and computer device
CN112825020A (en) Picture generation method and device, computer equipment and storage medium
CN111223155A (en) Image data processing method, image data processing device, computer equipment and storage medium
CN114546558A (en) Drawing processing method and device, computer equipment and storage medium
CN111597151A (en) File generation method and device, computer equipment and storage medium
CN117112090A (en) Business page theme generation method, device, computer equipment, medium and product
CN110807112A (en) Data display method and device based on map
CN114218338A (en) Map level information file generation method, device, equipment and storage medium
CN109544661B (en) Area map drawing method, apparatus, computer device and storage medium
CN114218339A (en) Map information file generation method and device, computer equipment and storage medium
WO2021135325A1 (en) Method and apparatus for gis point data rendering, computer device, and storage medium
CN112748839A (en) Picture processing method and device, computer readable storage medium and computer equipment
CN117251661B (en) Webpage file generation method, device, computer equipment and storage medium
CN116452702B (en) Information chart rapid design method, device, computer equipment and storage medium
CN117612192A (en) Electronic drawing information identification method, system, electronic equipment and storage medium
CN116541454B (en) Event configuration method, device, computer equipment and storage medium
CN117435100A (en) Element display method, device, computer equipment and storage medium
CN115113945A (en) Page loading method and device, computer equipment and storage medium
CN114327435A (en) Technical document generation method and device and computer readable storage medium
CN115840861A (en) Method and device for updating style layout information, computer equipment and storage medium
CN114201464A (en) Data display method and device, computer equipment and storage medium
CN116049009A (en) Test method, test device, computer equipment and computer readable storage medium
CN115934238A (en) Interface display method and device, computer equipment and storage medium
CN117688638A (en) Electronic drawing generation method, system, electronic device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination