Geographic information graph format conversion method and device, equipment and storage medium
By extracting the geographical location information and spatial resolution in the geographic infographic and converting it into Mercator coordinates, the problem of inconsistent resolution after cutting of the geographic infographic is solved, and the accuracy of the geographical model is improved.
Patent Information
- Application Number
- CN202411461749.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-18
- Publication Date
- 2025-03-14
AI Technical Summary
The resolution and size of the geographic infographics are inconsistent after cutting, resulting in the lack of geographical information, which in turn reduces the accuracy of geographic infographic cutting.
By extracting geographical location information and spatial resolution from the geographic infographic, the coordinates in the geographic infographic are converted into Mercator coordinates, and a geographic model map with a preset export format is generated.
The accuracy of the three-dimensional model creating geographic models based on geographic infographics is improved, avoiding the loss of geographic information, and ensuring the accuracy of geographic model maps.
Smart Images

Figure CN119624752A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of geographic information system technology, and in particular to a format conversion method, device, equipment and storage medium for geographic information maps. Background Art
[0002] A geographic information map is a chart that displays geographic spatial data in a visual way. It can be used to create three-dimensional geographic models and is therefore widely used in various fields.
[0003] The use of geographic information maps to create three-dimensional geographic models usually requires the use of three-dimensional software to convert geographic information maps into grayscale images in a file format that can be recognized by the three-dimensional software, so that the three-dimensional software can recognize the geographic information in the geographic information map based on the grayscale values of the grayscale image, and then create a three-dimensional geographic model. However, when compressing grayscale images, geographic information is usually lost, so that the three-dimensional software cannot accurately create a three-dimensional geographic model based on the grayscale image, which leads to inaccurate geographic model creation.
[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0005] The main purpose of this application is to provide a format conversion method for geographic information maps, aiming to solve the technical problem that the resolution size is inconsistent after the geographic information map is cut, resulting in the loss of geographic information in the cut image, thereby reducing the accuracy of the geographic information map cutting.
[0006] To achieve the above purpose, the present application proposes a method for format conversion of a geographic information map, the method comprising:
[0007] Extracting geographic information from the acquired geographic information map to obtain geographic location information in the geographic information map and the spatial resolution of the geographic information map;
[0008] Based on the geographical location information and the spatial resolution, the coordinates in the geographical information map are converted into Mercator coordinates to obtain a Mercator geographical map;
[0009] A geographic model map in a preset export format is generated based on the Mercator geographic map.
[0010] In one embodiment, the step of extracting geographic information from the acquired geographic information map to obtain the geographic location information in the geographic information map and the spatial resolution of the geographic information map includes:
[0011] Extracting the geographic height range of the corresponding map and the spatial resolution of the geographic information map from the acquired geographic information map;
[0012] According to the geographic height range, performing a projection matrix conversion on the geographic information map to obtain a projection matrix;
[0013] Based on the terrain information included in the projection matrix, each geographical location in the geographical information map is located to obtain the geographical location information in the geographical information map.
[0014] In one embodiment, the step of extracting the geographic height range of the corresponding map from the acquired geographic information map includes:
[0015] Processing the acquired geographic information map into TIF format to obtain the elevation value of each location in the geographic information map;
[0016] The geographic height range of each location in the geographic information map is determined based on the elevation value.
[0017] In one embodiment, the step of converting the coordinates in the geographic information map into Mercator coordinates based on the geographic location information and the spatial resolution to obtain a Mercator geographic map includes:
[0018] Extracting geographic coordinate information from the geographic information map based on the geographic location information and the spatial resolution;
[0019] Projecting the geographic coordinate information into global geographic coordinates;
[0020] The global geographic coordinates are converted into Mercator coordinates to obtain a Mercator geographic map.
[0021] In one embodiment, the preset export format includes a PNG format and a GLB format, the geographic model map includes a grayscale map in the PNG format and a GLB model in the GLB format, and the step of generating a geographic model map in a preset export format based on the Mercator geographic map includes:
[0022] If it is determined that the preset export format is the PNG format, then based on the Mercator geographic map, determine the terrain corresponding to each geographical location in the geographic information map, and obtain a grayscale map containing terrain information;
[0023] If it is determined that the preset export format is the GLB format, information processing is performed on the Mercator geographic map based on preset parameters to obtain a GLB model.
[0024] In one embodiment, the preset parameters include a sampling rate, a coordinate origin, and an edge banding, and the step of performing information processing on the Mercator geographic map based on the preset parameters to obtain a GLB model includes:
[0025] Based on the sampling rate, performing resolution conversion processing on the Mercator geographic map to determine a required target resolution;
[0026] Based on the coordinate origin, the coordinates of the Mercator map are reset according to the preset origin coordinates to determine the required target coordinates;
[0027] In response to the edge sealing selection, determining whether the target resolution is divisible by the geographic information map, and if not, determining the supplementary information required for resolution conversion processing;
[0028] The Mercator geographic map is converted based on the target resolution, the target coordinates and the supplementary information to obtain a GLB model.
[0029] In addition, to achieve the above-mentioned purpose, the present application also proposes a format conversion device for a geographic information map, the format conversion device for a geographic information map comprising:
[0030] An extraction module is used to extract geographic information from the acquired geographic information map to obtain the geographic location information in the geographic information map and the spatial resolution of the geographic information map;
[0031] A conversion module, configured to convert the coordinates in the geographic information map into Mercator coordinates based on the geographic location information and the spatial resolution, so as to obtain a Mercator geographic map;
[0032] A generation module is used to generate a geographic model map in a preset export format based on the Mercator geographic map.
[0033] In addition, to achieve the above-mentioned purpose, the present application also proposes a format conversion device for a geographic information map, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the format conversion method for a geographic information map as described above.
[0034] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the format conversion method of the geographic information map described above are implemented.
[0035] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the format conversion method of the geographic information map as described above.
[0036] One or more technical solutions proposed in this application have at least the following technical effects:
[0037] By extracting geographic location information and the spatial resolution of the geographic information map from the geographic information map, the geographic location in the geographic information map can be accurately determined through the geographic location information, and detailed terrain data can be extracted from the geographic information map through the spatial resolution. Then, based on the geographic location information and the spatial resolution, the geographic information map is converted into coordinates to obtain Mercator coordinates that can be directly read by three-dimensional software, so as to obtain a Mercator geographic map based on the Mercator coordinates, and then the Mercator geographic map is converted into a geographic model map in a preset format. Since the Mercator geographic map contains geographic location information and detailed terrain data, and the Mercator geographic map is a two-dimensional geographic image, the three-dimensional software can directly convert the Mercator coordinates. Therefore, the geographic model map in the preset format converted from the Mercator geographic map can also be directly read by the three-dimensional software. There is no need to compress the geographic model map, which avoids the loss of geographic information, thereby improving the accuracy of the three-dimensional model in creating a geographic model based on the geographic information map. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0040] Figure 1 A flowchart of the first embodiment of the method for converting the format of a geographic information map of the present application is provided;
[0041] Figure 2 A schematic diagram of the functional interface of the "image generation model" provided for the format conversion method of the geographic information map of this application;
[0042] Figure 3 A flowchart of the second embodiment of the method for converting the format of a geographic information map of the present application is provided;
[0043] Figure 4 A flowchart of the third embodiment of the method for converting the format of a geographic information map of the present application is provided;
[0044] Figure 5 A schematic diagram of the "image cutting" function interface provided for the format conversion method of the geographic information map of this application;
[0045] Figure 6 A schematic diagram of the module structure of a format conversion device for a geographic information map according to an embodiment of the present application;
[0046] Figure 7 This is a schematic diagram of the device structure of the hardware operating environment involved in the format conversion method of the geographic information map in the embodiment of the present application.
[0047] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0048] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0049] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0050] The main solution of the embodiment of the present application is: after acquiring the geographic information map, the geographic information map conversion tool extracts geographic information from the geographic information map to obtain the geographic location information and the spatial resolution of the geographic information map; then based on the geographic location information and the spatial resolution, the coordinates in the geographic information map are converted into Mercator coordinates to obtain a Mercator geographic map; finally, based on the Mercator geographic map, a geographic model map in a preset export format is generated.
[0051] In this embodiment, for ease of description, the following description is made by taking the identification of the geographic information map conversion tool as the execution subject.
[0052] In the prior art, the use of geographic information maps to create three-dimensional geographic models usually uses three-dimensional software to convert the geographic information map into a grayscale map in a file format that can be recognized by the three-dimensional software, so that the three-dimensional software can recognize the geographic information in the geographic information map according to the grayscale value of the grayscale map, and then create a three-dimensional geographic model. However, when compressing the grayscale map, the geographic information is usually lost, so that the three-dimensional software cannot accurately create a three-dimensional geographic model based on the grayscale map, which leads to inaccurate creation of the geographic model.
[0053] The present application provides a solution, by extracting geographic location information and the spatial resolution of the geographic information map from the geographic information map, the geographic location in the geographic information map can be accurately determined through the geographic location information, and detailed terrain data can be extracted from the geographic information map through the spatial resolution, and then the geographic information map is subjected to coordinate conversion according to the geographic location information and the spatial resolution to obtain Mercator coordinates that can be directly read by three-dimensional software, so as to obtain a Mercator geographic map according to the Mercator coordinates, and then the Mercator geographic map is converted into a geographic model map in a preset format. Since the Mercator geographic map contains geographic location information and detailed terrain data, and the Mercator geographic map is a two-dimensional geographic image, the three-dimensional software can directly perform coordinate conversion on the Mercator coordinates. Therefore, the geographic model map in the preset format converted from the Mercator geographic map can also be directly read by the three-dimensional software. There is no need to compress the geographic model map, thereby avoiding the loss of geographic information, and thus improving the accuracy of the three-dimensional model in creating a geographic model based on the geographic information map.
[0054] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a geographic information map conversion tool, etc. The following takes the geographic information map conversion tool as an example to illustrate this embodiment and the following embodiments.
[0055] Based on this, the present application embodiment provides a method for converting the format of a geographic information graph, referring to Figure 1 , Figure 1 This is a flowchart of the first embodiment of the format conversion method of the geographic information map of the present application.
[0056] In this embodiment, the format conversion method of the geographic information map includes steps S10 to S30:
[0057] Step S10, extracting geographic information from the acquired geographic information map to obtain geographic location information in the geographic information map and the spatial resolution of the geographic information map;
[0058] It should be noted that geographic information maps are thematic maps used to represent various geographic elements on the earth's surface. They use graphics, symbols and colors to show the spatial distribution and interrelationships of natural elements such as topography, landforms, climate, vegetation, soil, hydrology, and human elements such as population, cities, transportation, and economy. Geographic information maps are usually in TIF (Tagged Image File Format) format when used in geographic information systems. Geographic information can be information composed of geographic location data, attribute data and time dimensions. Geographic location information can be data related to the location of a place in a geographic information map. Spatial resolution is a metric used to describe the ability to resolve image details, that is, the minimum distance or size that can be distinguished in an image. The higher the spatial resolution, the more details can be extracted.
[0059] It should be noted that attribute data refers to non-spatial data associated with a geographic location, which describes the characteristics and properties of a specific location, such as land use type, population density, building height, etc.
[0060] It can be understood that in order to ensure that the geographic model map obtained after the conversion of the geographic information map can contain all the geographic information in the geographic information map, it is necessary to extract geographic information from the geographic information map to obtain the location of each point in the geographic information map, as well as data related to the location, which includes terrain data, landform data, vegetation data, soil data and other information, and obtain the spatial resolution of the geographic information map to convert the coordinates of the geographic information map according to the extracted geographic location information combined with the spatial resolution.
[0061] In the specific implementation, refer to Figure 2 The user selects the "Image Generation Model" function from the geographic information map conversion tool and obtains the geographic information map in TIF format selected by the user. After the selection is completed, the geographic information map conversion tool will display the height and width values of the resolution of this map. After the user triggers the processing control in the geographic information map conversion tool, the geographic information map conversion tool extracts geographic information from the geographic information map and obtains the geographic location information and spatial resolution of the geographic information map to facilitate the subsequent processing of the spatial resolution of the geographic location information and convert the coordinate system of the geographic information map.
[0062] Step S20, based on the geographical location information and the spatial resolution, converting the coordinates in the geographical information map into Mercator coordinates to obtain a Mercator geographical map;
[0063] It should be noted that Mercator coordinates are a map projection coordinate system used to convert the longitude and latitude coordinates on the earth's surface into plane coordinates. Mercator projection maintains the correctness of direction and angle, that is, the shape of the object on the map will not change, so Mercator coordinates can ensure that the geographic information in the geographic information map will not be lost. Mercator geographic map can be a map that uses the Mercator coordinate system to express the geographic location.
[0064] It is understandable that, since current 3D software can perform 3D modeling directly based on the Mercator coordinate system, by converting the coordinates in the geographic information map into Mercator coordinates, the 3D software can directly perform 3D map modeling based on the Mercator coordinate system, reducing the loss of geographic information caused by coordinate conversion, thereby ensuring the accuracy of 3D modeling.
[0065] It can be understood that since Mercator coordinates are coordinates in geographic information maps converted based on geographic location information and spatial resolution, and Mercator coordinates can also record all the characteristics of each terrain in the geographic information map, and the geographic location information contains detailed data of each terrain, therefore, converting the geographic information map into the Mercator coordinate system ensures that the terrain information can be fully expressed by the Mercator coordinate system during the coordinate conversion process, avoiding the loss of terrain information during coordinate conversion, and thus ensuring the accuracy of three-dimensional modeling.
[0066] Furthermore, step S20 may also include:
[0067] Extracting geographic coordinate information from the geographic information map based on the geographic location information and the spatial resolution;
[0068] Projecting the geographic coordinate information into global geographic coordinates;
[0069] The global geographic coordinates are converted into Mercator coordinates to obtain a Mercator geographic map.
[0070] It should be noted that the global geographic coordinates are based on the latitude and longitude coordinate system of the earth's ellipsoid, that is, a three-dimensional spherical surface is used to define the position on the earth's surface, and accurate reference to surface points is achieved through a latitude and longitude grid composed of longitude and latitude lines.
[0071] It is understandable that since geographic coordinates include different types such as astronomical longitude and latitude, geodetic longitude and latitude, and geocentric longitude and latitude, they are slightly different in measurement units, reference ellipsoids, etc. For example, the WGS84 coordinate system is a widely used geocentric longitude and latitude coordinate system, and the coordinate system used in the geographic information map may be any of these geographic coordinates. In order to ensure that the coordinates in the geographic information map can be accurately converted into a Mercator geographic map, it is necessary to first convert the geographic coordinate information in the geographic information map into global geographic coordinates, and then convert the global geographic information into Mercator coordinates to ensure that any type of geographic coordinates can be accurately converted into Mercator coordinates.
[0072] It is understandable that considering the spatial resolution when extracting geographic coordinate information can ensure that the generated Mercator map strikes a balance between detail representation and data volume, which not only meets the accuracy requirements, but also avoids data redundancy and improves data processing efficiency.
[0073] Step S30: generating a geographic model map in a preset export format based on the Mercator geographic map.
[0074] It should be noted that the preset export format can be a format determined by the user according to the 3D software, which can include a 16-bit PNG (Portable Network Graphics) format or a GLB (Global Location Code Block) format. The bit depth can be understood as the number of bits used for the color of each pixel in the image. The 16-bit depth can be understood as an image represented by 16 bits (binary) for each pixel, showing more color levels and richer color information. The geographic model map is an image that the 3D software can directly read the information in the map for modeling.
[0075] It is understandable that in order for the three-dimensional software to directly recognize detailed geographic data such as coordinate information, geographic information, and terrain information in the image output by the geographic information map conversion tool, it is necessary to generate a geographic model map in a preset export format based on the Mercator geographic map, so that the geographic model map not only meets the requirement that the three-dimensional software can directly recognize it, but also meets the requirement that the coordinate system used in the geographic model map is the Mercator coordinate system, thereby avoiding the three-dimensional software from converting the coordinates. In other words, it avoids the three-dimensional software from processing the image output by the geographic information map conversion tool and losing geographic information, thereby improving the accuracy of the three-dimensional model in creating a geographic model based on the geographic information map.
[0076] The present embodiment provides a method for format conversion of a geographic information map, by extracting geographic location information and the spatial resolution of the geographic information map from the geographic information map, the geographic location in the geographic information map can be accurately determined by the geographic location information, and detailed terrain data can be extracted from the geographic information map by the spatial resolution, and then the geographic information map is subjected to coordinate conversion according to the geographic location information and the spatial resolution to obtain Mercator coordinates that can be directly read by three-dimensional software, so as to obtain a Mercator geographic map according to the Mercator coordinates, and then the Mercator geographic map is converted into a geographic model map in a preset format. Since the Mercator geographic map contains geographic location information and detailed terrain data, and the Mercator geographic map is a two-dimensional geographic image, the three-dimensional software can directly perform coordinate conversion on the Mercator coordinates. Therefore, the geographic model map in the preset format converted from the Mercator geographic map can also be directly read by the three-dimensional software. There is no need to compress the geographic model map, thereby avoiding the loss of geographic information, thereby improving the accuracy of the three-dimensional model in creating a geographic model according to the geographic information map.
[0077] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can refer to the above introduction, and will not be repeated later. Figure 3 , step S10 includes steps S11 to S13:
[0078] Step S11, extracting the geographic height range of the corresponding map and the spatial resolution of the geographic information map from the acquired geographic information map;
[0079] Step S12, performing projection matrix conversion on the geographic information map according to the geographic height range to obtain a projection matrix;
[0080] Step S13, based on the terrain information included in the projection matrix, positioning each geographical location in the geographical information map to obtain the geographical location information in the geographical information map.
[0081] It should be noted that the geographic height range can be the range between the lowest sea level and the highest sea level of the terrain represented by the geographic information map. The projection matrix can accurately convert the three-dimensional terrain data into a two-dimensional geographic image, so that the two-dimensional geographic image contains all the terrain information in the three-dimensional terrain data. Because the projection matrix can simplify the complex earth surface into a two-dimensional image that is easier to understand and process, it can reduce the complexity of geographic information map processing, thereby improving the accuracy of extracting geographic location information from the geographic information map.
[0082] It can be understood that by extracting the geographic height range and spatial resolution, the level of detail of the map and the elevation range it covers can be understood, so that the geographic information map can be accurately converted into a projection form suitable for a specific application through the projection matrix conversion, so as to eliminate the distortion caused by the curvature of the earth. By analyzing and locating the terrain information in the projection matrix, the specific geographic location information in the geographic information map can be obtained, so as to accurately determine the various locations on the map, thereby providing reliable data support for subsequent steps and improving the accuracy of three-dimensional software modeling.
[0083] Furthermore, step S11 includes:
[0084] Processing the acquired geographic information map into TIF format to obtain the elevation value of each location in the geographic information map;
[0085] The geographic height range of each location in the geographic information map is determined based on the elevation value.
[0086] It should be noted that the TIF format can be edited and then restored without compression loss. The elevation value can be information describing the height of a point on the earth's surface relative to sea level.
[0087] It can be understood that by processing the geographic information map in TIF format, it is ensured that the loss of geographic information caused by compression of the geographic information map can be avoided when the geographic information map is subsequently processed. By obtaining the elevation value of each geographical location in the geographic information map, the geographical height range of each geographical location can be accurately described.
[0088] It is understandable that since the real height is above and below sea level, but the 3D software can only support up to 16-bit images, in order to reduce the noise in the final geographic model map, the parameters below sea level that will not be used can be set to 0, that is, all negative values (below sea level) will be returned to 0, so as to simply filter out the noise and allow the 16-bit 2 bytes to better retain the height data above sea level.
[0089] In the specific implementation, read the TIF image content, and identify various TIF compression methods such as LZW compression method for decompression. Read the information inside, GEO (Geospatial Information System) geographic coordinates, resolution, altitude range and other parameters, and then use Magick plug-in to read the image to obtain the resolution of TIF, and then import the data into GDAL (Geospatial Data Abstraction Library) plug-in to extract and classify information, and obtain the selected altitude range, GEO positioning information and spatial resolution value.
[0090] Based on the first and second embodiments of the present application, in the third embodiment of the present application, the same or similar contents as those in the above embodiments can be referred to the above introduction, and will not be described in detail later. Figure 4 , step S30 includes steps S31-S32:
[0091] Wherein, the preset export formats include PNG format and GLB format, and the geographic model map includes a grayscale map in the PNG format and a GLB model in the GLB format;
[0092] Step S31, if it is determined that the preset export format is the PNG format, then based on the Mercator geographic map, determine the terrain corresponding to each geographical location in the geographic information map, and obtain a grayscale map containing terrain information;
[0093] Step S32: If it is determined that the preset export format is the GLB format, information processing is performed on the Mercator geographic map based on preset parameters to obtain a GLB model.
[0094] It should be noted that the grayscale image is a grayscale image that represents the height of the terrain, that is, different grayscale values represent different terrain heights. For example, when the grayscale value of a pixel is 0, it represents the sea level, and when the pixel is 255, it represents the highest point in the terrain. The preset parameters include sampling rate, coordinate origin, and edge sealing.
[0095] It can be understood that outputting geographic model maps in different formats according to user needs increases the flexibility of geographic information map conversion tools.
[0096] It is understandable that in order to make the grayscale image in the exported PNG format have a 16-bit depth, detailed terrain information can be obtained according to the Mercator geographic map to generate a real 16-bit depth grayscale image according to the terrain information.
[0097] Further, step S32 includes:
[0098] Based on the sampling rate, performing resolution conversion processing on the Mercator geographic map to determine a required target resolution;
[0099] Based on the coordinate origin, the coordinates of the Mercator map are reset according to the preset origin coordinates to determine the required target coordinates;
[0100] In response to the edge sealing selection, determining whether the target resolution is divisible by the geographic information map, and if not, determining the supplementary information required for resolution conversion processing;
[0101] The Mercator geographic map is converted based on the target resolution, the target coordinates and the supplementary information to obtain a GLB model.
[0102] It should be noted that the sampling rate can be the size of the ground area represented by each pixel. If the sampling rate is set to 1, it is equivalent to restoring all parameter details 1:1, that is, the resolution of the GLB model surface and TIF remains the same. If the sampling rate is set to 2, it is equivalent to restoring 1 of the 4 points in the horizontal and vertical coordinates, that is, the resolution of TIF is twice the resolution of the GLB model. The coordinate origin can be the world coordinate origin of the 3D software or the Mercator coordinate origin. Edge sealing can be used when the sampling rate is not set to 1, that is, when the sampling rate and TIF resolution cannot be divided evenly, some content will be lost at the edge. The missing information can be filled in by edge sealing.
[0103] It is understood that by performing a resolution conversion process on the Mercator map, it is possible to ensure that the map has an appropriate level of detail when converted to the GLB model, maintaining the accuracy of geographic features while optimizing file size and performance.
[0104] It can be understood that by resetting the coordinates of the Mercator map based on the preset origin coordinates, it can be ensured that the map has the correct spatial positioning when converted into the GLB model, so as to ensure that the positions of the geographic features in the 3D space are accurate.
[0105] It is understood that if the target resolution is not divisible by the geodatabase, it may be necessary to add supplementary information to ensure the integrity of the model, which can be achieved through interpolation or other methods to ensure that the edges of the model are smooth and free of distortion.
[0106] It can be understood that by using Mercator projection geographic maps, it can be ensured that the GLB model has high-precision geographic information, and the GLB format is binary and optimized, which can reduce file size and improve loading and processing speed while maintaining high-quality details. In addition, the GLB format has good cross-platform compatibility, can be adapted to various 3D software, and contains dynamic elements such as animation, which can ensure that richer 3D information is obtained and improve the accuracy of 3D software modeling.
[0107] Optionally, since the three-dimensional geographic model obtained by the three-dimensional software according to the geographic model map does not contain color information, it is usually necessary to attach a map with color information to the three-dimensional geographic model after the three-dimensional geographic model is obtained. Therefore, the geographic information map conversion tool can also cut the map, wherein the map can be obtained according to the existing geographic information software.
[0108] In the specific implementation, refer to Figure 5The "Image Cutting" function is used to cut large-resolution maps into equal parts. The user selects the "Image Cutting" function from the geographic information map conversion tool, and the "Image Cutting" function interface displays the resolution of the entire map that needs to be enlarged or reduced, the required number of cut parameters, the format and quality of the cut image, and the width of each cut sub-image. After the user triggers the start cutting control, the map selected by the user is cut according to the data set by the user.
[0109] Among them, select the picture you want to cut: select JPG or PNG picture, you can choose ultra-large resolution, and it can support pictures with resolutions exceeding tens of thousands.
[0110] Width and Height: You can set the resolution for enlarging or reducing the entire image, and you can scale the entire image according to "Set the width of each partition".
[0111] Cutting quantity parameter setting: You can set the horizontal and vertical number to be cut, for example, set horizontal 3 and vertical 3, that is, 3x3=9 pictures.
[0112] Set format and quality: Customize the format without having to adjust the original Figure 1 When setting JPG, you can set the overall quality from 0 to 100, and when setting PNG, the quality is the highest.
[0113] Set the width of each partition: You can set the commonly used resolutions of 8K, 4K and 2K. The resolution of each partition is fixed in width and the height is scaled proportionally according to the number of cuts, and then the width and height of the entire image will be recalculated.
[0114] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the format conversion method of the geographic information map of the present application. More forms of simple transformations based on this technical concept are all within the scope of protection of the present application.
[0115] This application also provides a format conversion device for geographic information graphs, please refer to Figure 6 , the format conversion device of the geographic information map includes:
[0116] The extraction module 10 is used to extract geographic information from the acquired geographic information map to obtain the geographic location information in the geographic information map and the spatial resolution of the geographic information map;
[0117] A conversion module 20, configured to convert the coordinates in the geographic information map into Mercator coordinates based on the geographic location information and the spatial resolution, so as to obtain a Mercator geographic map;
[0118] The generating module 30 is used to generate a geographic model map in a preset export format based on the Mercator geographic map.
[0119] Optionally, the extraction module 10 is also used to extract the geographic height range of the corresponding map and the spatial resolution of the geographic information map from the acquired geographic information map; perform a projection matrix conversion on the geographic information map according to the geographic height range to obtain a projection matrix; and locate each geographic location in the geographic information map based on the terrain information contained in the projection matrix to obtain the geographic location information in the geographic information map.
[0120] Optionally, the extraction module 10 is further used to process the acquired geographic information map in TIF format to obtain the elevation value of each position in the geographic information map; and determine the geographic height range of each position in the geographic information map based on the elevation value.
[0121] Optionally, the conversion module 20 is further used to extract geographic coordinate information from the geographic information map based on the geographic location information and the spatial resolution; project the geographic coordinate information into global geographic coordinates; and convert the global geographic coordinates into Mercator coordinates to obtain a Mercator geographic map.
[0122] Optionally, the preset export format includes a PNG format and a GLB format, and the geographic model map includes a grayscale map in the PNG format and a GLB model in the GLB format;
[0123] The generation module 30 is also used to determine the terrain corresponding to each geographical location in the geographic information map based on the Mercator geographic map if the preset export format is determined to be the PNG format, and obtain a grayscale map containing terrain information; if the preset export format is determined to be the GLB format, then based on preset parameters, the Mercator geographic map is processed to obtain a GLB model.
[0124] Optionally, the preset parameters include sampling rate, coordinate origin and edge sealing;
[0125] The generation module 30 is also used to perform resolution conversion processing on the Mercator geographic map based on the sampling rate to determine the required target resolution; based on the coordinate origin, reset the coordinates of the Mercator geographic map according to the preset origin coordinates to determine the required target coordinates; in response to the edge banding selection, determine whether the target resolution is divisible by the geographic information map, if not, determine the supplementary information required for resolution conversion processing; convert the Mercator geographic map based on the target resolution, the target coordinates and the supplementary information to obtain the GLB model.
[0126] The format conversion device of the geographic information map provided in the present application adopts the format conversion method of the geographic information map in the above-mentioned embodiment, which can solve the technical problem that the resolution size is inconsistent after the geographic information map is cut, resulting in the loss of geographic information in the cut image, thereby reducing the accuracy of the cutting of the geographic information map. Compared with the prior art, the beneficial effects of the format conversion device of the geographic information map provided in the present application are the same as the beneficial effects of the format conversion method of the geographic information map provided in the above-mentioned embodiment, and the other technical features of the format conversion device of the geographic information map are the same as the features disclosed in the above-mentioned embodiment method, which will not be repeated here.
[0127] The present application provides a format conversion device for a geographic information map, the format conversion device for a geographic information map comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the format conversion method for the geographic information map in the above-mentioned embodiment one.
[0128] Reference below Figure 7 , which shows a schematic diagram of the structure of a format conversion device suitable for implementing the embodiment of the geographic information map of the present application. The format conversion device of the geographic information map in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The format conversion device for the geographic information map shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0129] like Figure 7As shown, the format conversion device of the geographic information graph may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the format conversion device of the geographic information graph are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1009. The communication device 1009 can allow the format conversion device of the geographic information map to communicate wirelessly or wired with other devices to exchange data. Although the figure shows the format conversion device of the geographic information map with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have instead.
[0130] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0131] The format conversion device of the geographic information map provided by the present application adopts the format conversion method of the geographic information map in the above embodiment, which can solve the technical problem that the resolution size is inconsistent after the geographic information map is cut, resulting in the loss of geographic information in the cut image, thereby reducing the accuracy of the cutting of the geographic information map. Compared with the prior art, the beneficial effects of the format conversion device of the geographic information map provided by the present application are the same as the beneficial effects of the format conversion method of the geographic information map provided by the above embodiment, and the other technical features of the format conversion device of the geographic information map are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0132] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0133] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0134] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the format conversion method of the geographic information map in the above-mentioned embodiment.
[0135] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0136] The computer-readable storage medium may be included in the format conversion device of the geographic information map; or may exist independently without being assembled into the format conversion device of the geographic information map.
[0137] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the format conversion device of the geographic information map, the format conversion device of the geographic information map: extracts geographic information from the acquired geographic information map to obtain the geographic location information in the geographic information map and the spatial resolution of the geographic information map; based on the geographic location information and the spatial resolution, converts the coordinates in the geographic information map into Mercator coordinates to obtain a Mercator geographic map; and generates a geographic model map in a preset export format based on the Mercator geographic map.
[0138] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0139] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0140] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0141] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the format conversion method of the above-mentioned geographic information map, and can solve the technical problem that the resolution size is inconsistent after the geographic information map is cut, resulting in the lack of geographic information in the cut picture, thereby reducing the accuracy of the geographic information map cutting. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the format conversion method of the geographic information map provided by the above-mentioned embodiment, and will not be repeated here.
[0142] The present application also provides a computer program product, including a computer program, which implements the steps of the format conversion method of the geographic information map as described above when executed by a processor.
[0143] The computer program product provided by the present application can solve the technical problem that the resolution size is inconsistent after the geographic information map is cut, resulting in the loss of geographic information in the cut image, thereby reducing the accuracy of the geographic information map cutting. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the format conversion method of the geographic information map provided by the above embodiment, and will not be repeated here.
[0144] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A method for converting the format of a geographic information graph, characterized in that: The method includes: Extracting geographic information from the acquired geographic information map to obtain geographic location information in the geographic information map and the spatial resolution of the geographic information map; Based on the geographical location information and the spatial resolution, the coordinates in the geographical information map are converted into Mercator coordinates to obtain a Mercator geographical map; A geographic model map in a preset export format is generated based on the Mercator geographic map.
2. The method according to claim 1, characterized in that The step of extracting geographic information from the acquired geographic information map to obtain the geographic location information in the geographic information map and the spatial resolution of the geographic information map comprises: Extracting the geographic height range of the corresponding map and the spatial resolution of the geographic information map from the acquired geographic information map; According to the geographic height range, performing a projection matrix conversion on the geographic information map to obtain a projection matrix; Based on the terrain information included in the projection matrix, each geographical location in the geographical information map is located to obtain the geographical location information in the geographical information map.
3. The method according to claim 2, characterized in that The step of extracting the geographic height range of the corresponding map from the acquired geographic information map comprises: Processing the acquired geographic information map into TIF format to obtain the elevation value of each location in the geographic information map; The geographic height range of each location in the geographic information map is determined based on the elevation value.
4. The method according to claim 1, characterized in that The step of converting the coordinates in the geographic information map into Mercator coordinates based on the geographic location information and the spatial resolution to obtain a Mercator geographic map comprises: Extracting geographic coordinate information from the geographic information map based on the geographic location information and the spatial resolution; Projecting the geographic coordinate information into global geographic coordinates; The global geographic coordinates are converted into Mercator coordinates to obtain a Mercator geographic map.
5. The method according to claim 1, characterized in that The preset export format includes a PNG format and a GLB format, the geographic model map includes a grayscale map in the PNG format and a GLB model in the GLB format, and the step of generating a geographic model map in a preset export format based on the Mercator geographic map includes: If it is determined that the preset export format is the PNG format, then based on the Mercator geographic map, determine the terrain corresponding to each geographical location in the geographic information map, and obtain a grayscale map containing terrain information; If it is determined that the preset export format is the GLB format, information processing is performed on the Mercator geographic map based on preset parameters to obtain a GLB model.
6. The method according to claim 5, characterized in that The preset parameters include a sampling rate, a coordinate origin, and an edge banding. The step of performing information processing on the Mercator geographic map based on the preset parameters to obtain a GLB model includes: Based on the sampling rate, performing resolution conversion processing on the Mercator geographic map to determine a required target resolution; Based on the coordinate origin, the coordinates of the Mercator map are reset according to the preset origin coordinates to determine the required target coordinates; In response to the edge sealing selection, determining whether the target resolution is divisible by the geographic information map, and if not, determining the supplementary information required for resolution conversion processing; The Mercator geographic map is converted based on the target resolution, the target coordinates and the supplementary information to obtain a GLB model.
7. A device for converting the format of a geographic information map, characterized in that: The device comprises: An extraction module is used to extract geographic information from the acquired geographic information map to obtain the geographic location information in the geographic information map and the spatial resolution of the geographic information map; A conversion module, used for converting the coordinates in the geographic information map into Mercator coordinates based on the geographic location information and the spatial resolution to obtain a Mercator geographic map; A generation module is used to generate a geographic model map in a preset export format based on the Mercator geographic map.
8. A device for converting the format of a geographic information map, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the method for format conversion of a geographic information graph as described in any one of claims 1 to 6.
9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the method for format conversion of a geographic information map as described in any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the method for format conversion of a geographic information graph as claimed in any one of claims 1 to 6 are implemented.