Map layer data processing method and system based on GIS coordinate generation and electronic equipment
Through the map layer data processing method based on the generation of GIS coordinates, the problems of data security, customization capabilities, learning costs and inefficiency in traditional map printing technology are solved, and efficient, safe and customized map generation and output are achieved.
Patent Information
- Application Number
- CN202411548624.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-01
- Publication Date
- 2025-02-14
AI Technical Summary
Traditional map printing technology has data security problems, insufficient customization capabilities, high learning costs and inefficient efficiency.
Using the map layer data processing method based on generating GIS coordinates, it uses the user's API service call request, query and record layer data, upload it to the map tool service, create map tool objects and call the render function to draw map layers, and automatically generate Map layer data and output map pictures in target format.
It improves the efficiency of map generation, simplifies user operations, enhances data security and customization capabilities, and the output map pictures have a unified visual style and format.
Smart Images

Figure CN119441373A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of map printing, and in particular to a map layer data processing method, system and electronic equipment based on generating GIS coordinates. Background Art
[0002] Traditional map printing technology usually involves exporting online layer data to GIS software such as QGIS, and then exporting it as an image. However, this method has several obvious problems:
[0003] Data security issues: Online layer data may be at risk of cyber attacks or unauthorized access.
[0004] Insufficient customization capabilities: It is difficult for users to customize the appearance and content of the map according to specific needs.
[0005] High learning cost: Professional software such as QGIS requires a long time to learn and become familiar with before you can operate it proficiently.
[0006] Inefficiency: The entire process requires multiple steps and the operations are cumbersome, resulting in low efficiency in map generation. Summary of the invention
[0007] The purpose of the present invention is to provide a map layer data processing method, system and electronic device based on generating GIS coordinates to solve the problems raised in the above background technology.
[0008] By adopting the above technical solution, it is possible to generate map images more efficiently and respond to user needs quickly.
[0009] The purpose of the present invention is achieved by adopting the following technical solutions:
[0010] A first aspect of the present invention provides a method for processing map layer data based on generating GIS coordinates, the method comprising:
[0011] Receive an API service call request from a user; call the API based on the data type and business requirements requested by the user, query the layer data recorded in the database, and execute the transmission of the layer data; wherein the API includes an API uplink interface and an API downlink interface;
[0012] Receive API service call requests from the user through the API upstream interface, query and record layer data during the API call process; upload the layer data recorded in the database to the map tool service through the API downstream interface;
[0013] Create and initialize a map tool object based on the map tool service, call the render function in the map tool object to draw the map layer; automatically generate map layer data and display it in the interactive interface;
[0014] Get the map layer data displayed on the interactive interface; based on the annotation data and style of the map layer set by the user through the interface, output the map image in the target format.
[0015] Optionally, the step of creating and initializing the map tool further includes:
[0016] Set the title text and icon of the map tool object, and get the area of each polygon;
[0017] Based on statistical algorithms, the area boundary of the polygon is calculated;
[0018] Set custom layer data and label data for polygons:
[0019] Filter polygons whose area is too large or too small in the area boundary calculation results of the polygon;
[0020] Set polygon data, including color and outline information; set annotation data and bottom text.
[0021] Optionally, the render function in the map tool object is called to draw the map layer:
[0022] Calculate the common range of all current map features according to the set polygon data;
[0023] Calculate the center point and canvas width and height based on the range boundaries, and create a picture object and picture canvas;
[0024] Call the drawing title, tile, custom layer data and map annotation data, as well as the bottom text function to generate and save the map image.
[0025] Optionally, drawing a map layer includes:
[0026] Processing the acquired map layer data file into discrete point data, and interpolating the discrete point data into grid point data according to the area covered by the map layer data;
[0027] Reading the longitude and latitude information of the grid point data, and dividing the map layer data into regions;
[0028] A map layer is drawn according to the latitude and longitude information of the grid point data.
[0029] Optionally, drawing a map layer according to the latitude and longitude information of the grid point data includes:
[0030] The grid points of tiles in the same area range are connected by a curve, and the area where the curve is located is defined as the drawing area corresponding to the area range, and the drawing area of the same area range in the map layer is represented by the same color, and the background part outside the area is drawn as a transparent color.
[0031] Optionally, adjusting the latitude and longitude range to be consistent with the map layer and overlaying the map layer on the GIS map includes:
[0032] Accessing the map layer into a database;
[0033] The latitude and longitude range of the map layer is located through the Geographic Information System (GIS), and the positioning information of the map layer is displayed in the Geographic Information System (GIS) map through coordinate conversion and superimposed with the GIS map.
[0034] Optionally, the coordinate conversion method includes:
[0035] The longitude and latitude range of the map layer is used for coordinate calibration;
[0036] Convert the latitude and longitude range of the map layer into hexadecimal coordinates;
[0037] By converting the coordinate system, the map layer is positioned and projected into the GIS map.
[0038] Optionally, the annotation data includes predefined grid point numbers and tile distribution;
[0039] The defined grid point numbers include:
[0040] According to the grid longitude and latitude information, the target area is hierarchically divided into regional blocks using a quadtree structure;
[0041] Calculating the longitude and latitude intervals between the grid points of the area block;
[0042] Determine the grid point number according to the longitude and latitude intervals between the grid points; wherein the grid point number includes the longitude number and latitude number of the grid point;
[0043] The longitude interval Li and latitude interval Wi between grid points in the area block are determined by the following formulas:
[0044] Li=(L1-L0) / LNum
[0045] Wi=(W1-W0) / WNum
[0046] Where L0 is the minimum latitude, L1 is the maximum longitude, W0 is the minimum latitude, W1 is the maximum latitude, Li is the grid point longitude interval, LNum is the number of grid points in the longitude direction, and WNum is the number of grid points in the latitude direction;
[0047] The longitude LNo number and latitude WNo number of the grid point are determined by the following formula:
[0048] LNo=[(LX-L0) / Li]
[0049] WNo=[(WX-W0) / Wi]
[0050] Where LX represents the longitude position of any grid point; WX represents the latitude position of any grid point, and the symbol [] indicates rounding.
[0051] Optionally, the outputting of the map image in the target format based on the user terminal setting the annotation data and style of the map layer through the interface includes:
[0052] Set the latitude and longitude boundary range of the map layer;
[0053] Adjust the latitude and longitude range to be consistent with the map layer, and overlay the map layer on the geographic information system GIS map;
[0054] Display map layer data according to predefined grid point numbers and tile distribution; obtain the area block corresponding to any grid point data according to the grid point number; and perform continuous superposition of map layers according to the drawing order of the map layers to form a map image in the target format.
[0055] A second aspect of the present invention provides a map layer data processing system based on generating GIS coordinates, the system comprising:
[0056] The request module is used to receive API service call requests from the user end;
[0057] A query module is used to call the API based on the data type and business requirements requested by the user end, query the layer data recorded in the database, and execute the transmission of the layer data; wherein the API includes an API uplink interface and an API downlink interface;
[0058] The data transmission processing module is used to receive the API service call request from the user through the API upstream interface, query and record the layer data during the API call process; upload the layer data recorded in the database to the map tool service through the API downstream interface;
[0059] The drawing module is used to create and initialize a map tool object based on the map tool service, call the render function in the map tool object to draw the map layer; automatically generate map layer data and display it in the interactive interface;
[0060] A custom module used to obtain the map layer data displayed on the interactive interface; based on the annotation data and style of the map layer set by the user through the interface, output the map image in the target format
[0061] Compared with the prior art, the present invention has the following beneficial effects:
[0062] The present invention discloses a method, system and electronic device for processing map layer data based on generating GIS coordinates, including receiving an API service call request from a user end; calling the API based on the data type and business requirements requested by the user end, querying the map layer data recorded in the database, and executing the transfer of the map layer data; wherein the API includes an API uplink interface and an API downlink interface; receiving the API service call request from the user end through the API uplink interface, querying and recording the map layer data during the API call process; uploading the map layer data recorded in the database to the map tool service through the API downlink interface; creating and initializing a map tool object based on the map tool service, calling the render function in the map tool object to draw the map layer; automatically generating the map layer data and displaying it on the interactive interface; obtaining the map layer data displayed on the interactive interface; and outputting a map image in the target format based on the annotation and style of the map layer set by the user end through the interface. The above scheme uses deep learning to achieve rough recall of knowledge base classification, which can make up for the long time-consuming defect caused by the previous full text block recall.
[0063] The technical solution of the present invention has the following advantages:
[0064] Customizable layers: Users can flexibly select different map layers to meet the needs of different application scenarios.
[0065] Fully automated output: Simple operation for users, one-click generation of required map images, saving time and labor costs.
[0066] Standardized and unified output: The output map images have a unified visual style and format, meeting professional standards and user expectations. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] Figure 1 A general flow chart of a map layer data processing method based on generating GIS coordinates provided by the present invention;
[0068] Figure 2 A working principle diagram of the map layer data processing method based on generating GIS coordinates provided by the present invention;
[0069] Figure 3 A structural block diagram of a map layer data processing system based on generating GIS coordinates provided in one embodiment;
[0070] Figure 4 The figure is a diagram of the internal structure of an electronic device provided in one embodiment. DETAILED DESCRIPTION
[0071] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0072] See also Figure 1 The present invention combines custom applications with modern technology for new map printing, and provides a technical solution: a method for processing map layer data based on generating GIS coordinates, comprising:
[0073] Application Development: We developed a custom application that connects to the database to obtain map layer data through program configuration.
[0074] Algorithm design: Based on the obtained layer data, we designed a special algorithm to calculate the range of the layer and determine the tile map data that needs to be loaded.
[0075] Technical implementation: We used the Pillow package in Python to load and process tile map data, and integrated custom layer data and map annotation data, as well as a custom title at the top and technical support information at the bottom.
[0076] Output map images: Through this process, we can automatically generate map images. Users can perform simple operations and settings on the interface to output the required maps in a standardized and uniform manner.
[0077] The above technical ideas can solve several major problems existing in traditional technologies:
[0078] Data security protection: All data are stored in the background database, and data security is guaranteed through permission control and encryption technology.
[0079] Highly customizable: Users can select and customize the map's layers, annotations, and styles according to their needs to meet the specific needs of different users.
[0080] Easy and efficient operation: The entire process is automatically completed by the application with a user-friendly interface, reducing the difficulty and time cost of operation.
[0081] Output efficiency is significantly improved: Compared with traditional methods, new technology solutions are more efficient in generating map images and can quickly respond to user needs.
[0082] After adopting the new technology solution, the advantages of map printing technology are obvious:
[0083] Customizable layers: Users can flexibly select different map layers to meet the needs of different application scenarios.
[0084] Fully automated output: Simple operation for users, one-click generation of required map images, saving time and labor costs.
[0085] Standardized and unified output: The output map images have a unified visual style and format, which meets professional standards and user expectations. The specific implementation steps are as follows:
[0086] Step S101, receiving an API service call request from a user terminal;
[0087] Step S102, calling an API based on the data type and business requirements requested by the user, querying the layer data recorded in the database, and executing the transmission of the layer data; wherein the API includes an API uplink interface and an API downlink interface;
[0088] Step S103, receiving the API service call request from the user end through the API uplink interface, querying and recording the layer data during the API call process; uploading the layer data recorded in the database to the map tool service through the API downlink interface;
[0089] Step S104, creating and initializing a map tool object based on the map tool service, calling the render function in the map tool object to draw a map layer; automatically generating map layer data, and displaying it on the interactive interface;
[0090] Step S105, obtaining the map layer data displayed on the interactive interface; based on the annotation data and style of the map layer set by the user end through the interface, outputting a map image in a target format.
[0091] In the above embodiment, the creation and initialization of the map tool further includes:
[0092] Set the title text and icon of the map tool object, and get the area of each polygon;
[0093] Based on statistical algorithms, the area boundary of the polygon is calculated;
[0094] Set custom layer data and label data for polygons:
[0095] Filter polygons whose area is too large or too small in the area boundary calculation results of the polygon;
[0096] Set polygon data, including color and outline information;
[0097] Set the annotation data and bottom text.
[0098] In the above embodiment, the render function in the map tool object is called to draw the map layer:
[0099] Calculate the common range of all current map features according to the set polygon data;
[0100] Calculate the center point and canvas width and height based on the range boundaries, and create a picture object and picture canvas;
[0101] Call the drawing title, tile, custom layer data and map annotation data, as well as the bottom text function to generate and save the map image.
[0102] The algorithm is as follows:
[0103] Map_tools.py related classes and function definitions:
[0104] Class Title:
[0105] def__init__(self,text,icon_path,color='#46086C')
[0106] def set_font_size(self,w)
[0107] class Label:
[0108] def__init__(self,coord,text,font_size,color='#00FBF8')
[0109] def set_font_size(self,enlarge)
[0110] class Bottom:
[0111] def__init__(self,text,color='#46086C')
[0112] def set_font_size(self,w)
[0113] class Polygon:
[0114] def__init__(self,coords,fill_color,outline_color,line_width=5,simplify=False)
[0115] @property
[0116] def extent(self)
[0117] class MapTools:
[0118] def__init__(self,padding_x=100,padding_y=50,enlarge=2,
[0119] url_template="https: / / a.tile.openstreetmap.org / {z} / {x} / {y}.png",
[0120] tile_size=256,tile_request_timeout=None,headers=None,reverse_y=False,
[0121] background_color="#fff",delay_between_retries=0)
[0122] def set_title(self,title)
[0123] def set_bottom(self,bottom)
[0124] def add_polygon(self,polygon)
[0125] def add_label(self,label)
[0126] def render(self)
[0127] def_determine_extent(self)
[0128] def_x_to_px(self,x)
[0129] def_y_to_px(self,y)
[0130] def_draw_title_layer(self,image,w)
[0131] def_draw_tile_layer(self,image)
[0132] def_draw_data_layer(self,image)
[0133] def_draw_bottom_layer(self,image,w,h)
[0134] def_tile_features(self,tile,image)
[0135] def_polygon_features(self,polygon,draw)
[0136] def_label_features(self,label,draw)
[0137] def_lon_to_x(lon,zoom)
[0138] def_lat_to_y(lat,zoom)
[0139] def_y_to_lat(y,zoom)
[0140] def_x_to_lon(x,zoom)
[0141] def_px_to_font_size(px)
[0142] def_simplify(points,tolerance=11)
[0143] def_get(url,**kwargs)
[0144] In the above embodiment, drawing the map layer includes:
[0145] Processing the acquired map layer data file into discrete point data, and interpolating the discrete point data into grid point data according to the area covered by the map layer data;
[0146] Reading the longitude and latitude information of the grid point data, and dividing the map layer data into regions;
[0147] A map layer is drawn according to the latitude and longitude information of the grid point data.
[0148] In the above embodiment, drawing a map layer according to the latitude and longitude information of the grid point data includes:
[0149] The grid points of tiles in the same area range are connected by a curve, and the area where the curve is located is defined as the drawing area corresponding to the area range, and the drawing area of the same area range in the map layer is represented by the same color, and the background part outside the area is drawn as a transparent color.
[0150] In the above embodiment, adjusting the latitude and longitude range to be consistent with the map layer, and overlaying the map layer on the GIS map includes:
[0151] Accessing the map layer into a database;
[0152] The latitude and longitude range of the map layer is located through the Geographic Information System (GIS), and the positioning information of the map layer is displayed in the Geographic Information System (GIS) map through coordinate conversion and superimposed with the GIS map.
[0153] In the above embodiments, the coordinate conversion method includes:
[0154] The longitude and latitude range of the map layer is used for coordinate calibration;
[0155] Convert the latitude and longitude range of the map layer into hexadecimal coordinates;
[0156] By converting the coordinate system, the map layer is positioned and projected into the GIS map.
[0157] In the above embodiment, the annotation data includes predefined grid point numbers and tile distribution;
[0158] The defined grid point numbers include:
[0159] According to the grid longitude and latitude information, the target area is hierarchically divided into regional blocks using a quadtree structure;
[0160] Calculating the longitude and latitude intervals between the grid points of the area block;
[0161] Determine the grid point number according to the longitude and latitude intervals between the grid points; wherein the grid point number includes the longitude number and latitude number of the grid point;
[0162] The longitude interval Li and latitude interval Wi between grid points in the area block are determined by the following formulas:
[0163] Li=(L1-L0) / LNum
[0164] Wi=(W1-W0) / WNum
[0165] Where L0 is the minimum latitude, L1 is the maximum longitude, W0 is the minimum latitude, W1 is the maximum latitude, Li is the grid point longitude interval, LNum is the number of grid points in the longitude direction, and WNum is the number of grid points in the latitude direction;
[0166] The longitude LNo number and latitude WNo number of the grid point are determined by the following formula:
[0167] LNo=[(LX-L0) / Li]
[0168] WNo=[(WX-W0) / Wi]
[0169] Where LX represents the longitude position of any grid point; WX represents the latitude position of any grid point, and the symbol [] indicates rounding.
[0170] In the above embodiment, the output of the map image in the target format based on the annotation data and style of the map layer set by the user terminal through the interface includes:
[0171] Set the latitude and longitude boundary range of the map layer;
[0172] Adjust the latitude and longitude range to be consistent with the map layer, and overlay the map layer on the geographic information system GIS map;
[0173] Display map layer data according to predefined grid point numbers and tile distribution; obtain the area block corresponding to any grid point data according to the grid point number; and perform continuous superposition of map layers according to the drawing order of the map layers to form a map image in the target format.
[0174] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0175] Based on the above content, the following implementation process is proposed in combination with specific application scenarios. The flowchart of the entire technical solution is as follows: Figure 2 shown.
[0176] Calling process:
[0177] 1. Create and initialize map tools: m = MapTools (url_template = URL_TEMPLATE, enlarge = enlarge, padding_x = padding_x, padding_y = padding_y)
[0178] 2. Set title text and icon: m.set_title(Title(branch_name,ICON_FILE))
[0179] 3. Get the area of each polygon: spaces = [polygon['properties']['space']forpolygon in polygons['features']]
[0180] 4. Based on statistical algorithm: calculate the area boundary: lower, upper = _get_lower_upper (spaces)
[0181] 5. Set zoom: zoom = 16
[0182] 6. Set Polygon and Label in a loop:
[0183] for i,polygon in enumerate(polygons['features']):
[0184] 6.1. Filter polygons that are too large or too small according to the calculation results in step 4
[0185] space=polygon['properties']['space']
[0186] if lower>space>upper:
[0187] break
[0188] 6.2. Set polygon data
[0189] m.add_polygon(Polygon(co[0],COLORS_TUPLE[i%len(COLORS_TUPLE)],outline_color='#46086C',simplify=False))
[0190] 6.3. Set annotation data
[0191] m.add_label(Label(centroid,name,size+2))
[0192] 7. Set the bottom text
[0193] m.set_bottom(Bottom("This map is provided by YuanQing Information Technology"))
[0194] 8. Painting pictures
[0195] image=m.render(zoom=zoom)
[0196] 8.1、The calling process of the render function in the map tool object:
[0197] A1: Calculate the common range of all current map elements based on the set polygon data
[0198] extent = _determine_extent()
[0199] A2: Calculate the center point based on the boundary:
[0200] lon_center,lat_center=(extent[0]+extent[2]) / 2,(extent[1]+extent[3]) / 2
[0201] self.x_center=_lon_to_x(lon_center,self.zoom)
[0202] self.y_center=_lat_to_y(lat_center,self.zoom)
[0203] A3: Calculate the canvas width and height:
[0204] self.width=int(abs(_lon_to_x(extent[2],self.zoom)-_lon_to_x(extent[0],self.zoom))*self.tile_size)
[0205] self.height=int(abs(_lat_to_y(extent[3],self.zoom)-_lat_to_y(extent[1],self.zoom))*self.tile_size)
[0206] A4: Create a picture object and a picture canvas
[0207] image = Image.new()
[0208] A5: Call the function to draw the title, tiles, custom data, and bottom text:
[0209] _draw_title_layer(self,image)
[0210] _draw_tile_layer(self,image)
[0211] _tile_features(self,tile,image)
[0212] _draw_data_layer(image)
[0213] _polygon_features(self,polygon,draw)
[0214] _label_features(self,label,draw)
[0215] _draw_bottom_layer(image)
[0216] 9. Save the image image.save(image_file_path).
[0217] Based on the same inventive concept, the embodiment of the present application also provides a system for processing map layer data based on generating GIS coordinates for implementing the above-mentioned method for processing map layer data based on generating GIS coordinates. The implementation scheme for solving the problem provided by the system is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in the embodiments of one or more systems for processing map layer data based on generating GIS coordinates provided below can refer to the limitations of the system method for processing map layer data based on generating GIS coordinates above, and will not be repeated here.
[0218] In one embodiment, Figure 3 As shown, a map layer data processing system based on generating GIS coordinates is provided, comprising: a request module 210, a query module 220, a data transfer processing module 230, a drawing module 240 and a custom module 250, wherein:
[0219] The request module 210 is used to receive an API service call request from a user terminal;
[0220] The query module 220 is used to call the API based on the data type and business requirements requested by the user end, query the layer data recorded in the database, and execute the transmission of the layer data; wherein the API includes an API uplink interface and an API downlink interface;
[0221] The data transmission processing module 230 is used to receive the API service call request from the user end through the API uplink interface, query and record the layer data during the API call process; upload the layer data recorded in the database to the map tool service through the API downlink interface;
[0222] The drawing module 240 is used to create and initialize a map tool object based on the map tool service, call the render function in the map tool object to draw a map layer, automatically generate map layer data, and display it on the interactive interface;
[0223] The custom module 250 is used to obtain the map layer data displayed on the interactive interface; based on the annotation data and style of the map layer set by the user through the interface, output the map image in the target format. Optionally, the preprocessing module 210 includes:
[0224] Figure 4 A structural block diagram of an electronic device for a map layer data processing method based on generating GIS coordinates provided by one or more embodiments of the present invention.
[0225] like Figure 4 As shown, the present application provides an electronic device, including: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus;
[0226] A computer program is stored in the memory. When the computer program is executed by the processor, the processor performs the steps of a map layer data processing method based on generating GIS coordinates.
[0227] The present application also provides a computer-readable storage medium storing a computer program executable by an electronic device. When the computer program runs on the electronic device, the electronic device executes the steps of a map layer data processing method based on generating GIS coordinates.
[0228] The present application also provides a data platform, including:
[0229] An electronic device for implementing the steps of a method for processing map layer data based on generating GIS coordinates;
[0230] A processor, the processor runs a program, and when the program runs, the steps of the map layer data processing method based on generating GIS coordinates are output from the electronic device;
[0231] The storage medium is used to store a program, which, when running, performs steps of a method for processing map layer data output from an electronic device based on generating GIS coordinates.
[0232] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0233] The electronic device includes a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and a memory. The operating system can be any one or more computer operating systems that implement electronic device control through a process, such as a Linux operating system, a Unix operating system, an Android operating system, an iOS operating system, or a Windows operating system. In addition, in an embodiment of the present invention, the electronic device can be a handheld device such as a smart phone or a tablet computer, or can be an electronic device such as a desktop computer or a portable computer, which is not particularly limited in the embodiment of the present invention.
[0234] The execution subject of the electronic device control in the embodiment of the present invention may be an electronic device, or a functional module in the electronic device that can call and execute a program. The electronic device may obtain the firmware corresponding to the storage medium. The firmware corresponding to the storage medium is provided by the supplier. The firmware corresponding to different storage media may be the same or different, which is not limited here. After the electronic device obtains the firmware corresponding to the storage medium, the firmware corresponding to the storage medium may be written into the storage medium, specifically, the firmware corresponding to the storage medium may be burned into the storage medium. The process of burning the firmware into the storage medium may be implemented using existing technology, which will not be described in detail in the embodiment of the present invention.
[0235] The electronic device can also obtain a reset command corresponding to the storage medium. The reset command corresponding to the storage medium is provided by the supplier. The reset commands corresponding to different storage media may be the same or different, and are not limited here.
[0236] At this time, the storage medium of the electronic device is a storage medium in which the corresponding firmware is written, and the electronic device can respond to the reset command corresponding to the storage medium in the storage medium in which the corresponding firmware is written, so that the electronic device resets the storage medium in which the corresponding firmware is written according to the reset command corresponding to the storage medium. The process of resetting the storage medium according to the reset command can be implemented by the existing technology and will not be described in detail in the embodiments of the present invention.
[0237] For the convenience of description, the above devices are described in terms of functions and are divided into various units and modules. Of course, when implementing the present application, the functions of each unit and module can be implemented in the same or multiple software and / or hardware.
[0238] Those skilled in the art will appreciate that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art in the art to which the present invention belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined.
[0239] For the method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0240] It can be known from the description of the above implementation modes that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be essentially or partly contributed to the prior art in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a server or a network device, etc.) to execute the methods described in the various implementation modes of the present application or certain parts of the implementation modes.
[0241] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for processing map layer data based on generating GIS coordinates, characterized in that: The method comprises: Receive API service call requests from the user side; Calling the API based on the data type and business requirements requested by the user, querying the layer data recorded in the database, and executing the transmission of the layer data; wherein the API includes an API uplink interface and an API downlink interface; Receive API service call requests from the user through the API upstream interface, query and record layer data during the API call process; upload the layer data recorded in the database to the map tool service through the API downstream interface; Create and initialize a map tool object based on the map tool service, call the render function in the map tool object to draw the map layer; automatically generate map layer data and display it in the interactive interface; Get the map layer data displayed on the interactive interface; based on the annotation data and style of the map layer set by the user through the interface, output the map image in the target format.
2. The method according to claim 1, characterized in that The creation and initialization of the map tool also includes: Set the title text and icon of the map tool object, and get the area of each polygon; Based on statistical algorithms, the area boundary of the polygon is calculated; Set custom layer data and label data for polygons: Filter polygons whose area is too large or too small in the area boundary calculation results of the polygon; Set polygon data, including color and outline information; set annotation data and bottom text.
3. The method according to claim 1, characterized in that The render function in the map tool object is called to draw the map layer: Calculate the common range of all current map features according to the set polygon data; Calculate the center point and canvas width and height based on the range boundaries, and create a picture object and picture canvas; Call the drawing title, tile, custom layer data and map annotation data, as well as the bottom text function to generate and save the map image.
4. The method according to claim 1, characterized in that: The drawing of the map layer comprises: Processing the acquired map layer data file into discrete point data, and interpolating the discrete point data into grid point data according to the area covered by the map layer data; Reading the longitude and latitude information of the grid point data, and dividing the map layer data into regions; A map layer is drawn according to the latitude and longitude information of the grid point data.
5. The method according to claim 4, characterized in that Drawing a map layer according to the latitude and longitude information of the grid data includes: The grid points of tiles in the same area range are connected by a curve, and the area where the curve is located is defined as the drawing area corresponding to the area range, and the drawing area of the same area range in the map layer is represented by the same color, and the background part outside the area is drawn as a transparent color.
6. The method according to claim 4, characterized in that Adjusting the latitude and longitude ranges to be consistent with the map layer, and overlaying the map layer on the GIS map includes: Accessing the map layer into a database; The latitude and longitude range of the map layer is located through the Geographic Information System (GIS), and the positioning information of the map layer is displayed in the Geographic Information System (GIS) map through coordinate conversion and superimposed with the GIS map.
7. The method according to claim 6, characterized in that The coordinate conversion method comprises: The latitude and longitude range of the map layer is used for coordinate calibration; Convert the latitude and longitude range of the map layer into hexadecimal coordinates; By converting the coordinate system, the map layer is positioned and projected into the GIS map.
8. The method according to claim 1, characterized in that: The annotation data includes predefined grid point numbers and tile distribution; The defined grid point numbers include: According to the grid longitude and latitude information, the target area is hierarchically divided into regional blocks using a quadtree structure; Calculating the longitude and latitude intervals between the grid points of the area block; Determine the grid point number according to the longitude and latitude intervals between the grid points; wherein the grid point number includes the longitude number and latitude number of the grid point; The longitude interval Li and latitude interval Wi between grid points in the area block are determined by the following formulas: Li=(L1-L0) / LNum Wi=(W1-W0) / WNum Where L0 is the minimum latitude, L1 is the maximum longitude, W0 is the minimum latitude, W1 is the maximum latitude, Li is the grid point longitude interval, LNum is the number of grid points in the longitude direction, and WNum is the number of grid points in the latitude direction; The longitude LNo number and latitude WNo number of the grid point are determined by the following formula: LNo=[(LX-L0) / Li] WNo=[(WX-W0) / Wi] Where LX represents the longitude position of any grid point; WX represents the latitude position of any grid point, and the symbol [] indicates rounding.
9. The method according to claim 1, characterized in that: The outputting of the map image in the target format based on the annotation data and style of the map layer set by the user through the interface includes: Set the latitude and longitude boundary range of the map layer; Adjust the latitude and longitude range to be consistent with the map layer, and overlay the map layer on the geographic information system GIS map; Display map layer data according to predefined grid point numbers and tile distribution; obtain the area block corresponding to any grid point data according to the grid point number; and perform continuous superposition of map layers according to the drawing order of the map layers to form a map image in the target format.
10. A map layer data processing system based on generating GIS coordinates, characterized in that: The system comprises: The request module is used to receive API service call requests from the user end; A query module is used to call the API based on the data type and business requirements requested by the user end, query the layer data recorded in the database, and execute the transmission of the layer data; wherein the API includes an API uplink interface and an API downlink interface; The data transmission processing module is used to receive the API service call request from the user through the API upstream interface, query and record the layer data during the API call process; upload the layer data recorded in the database to the map tool service through the API downstream interface; The drawing module is used to create and initialize the map tool object based on the map tool service, call the render function in the map tool object to draw the map layer; automatically generate the map layer data and display it in the interactive interface; The custom module is used to obtain the map layer data displayed on the interactive interface; based on the user end setting the annotation data and style of the map layer through the interface, output the map image in the target format.
Citation Information
Cited By
GIS-based ecological economic data transmission and availability screening method and system
CN120259577A