Spatial data processing method, system, storage medium and electronic device
By converting different types of spatial data into the same preset format and storing and rendering in a unified manner, the problem of low efficiency in obtaining and rendering of different types of data is solved, and efficient spatial data processing and rendering is achieved.
Patent Information
- Application Number
- CN202210845229.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-18
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2042-07-18
AI Technical Summary
In the prior art, different types of spatial data have low data acquisition efficiency and low computing efficiency due to different sources and structures. It is necessary to obtain and process data from different storage spaces, resulting in complex rendering processes and high computing volume. .
Convert different types of spatial data to the same preset format, and manage it through database and index tables, and adopt a unified rendering strategy to uniformly store and render in the database and simplify the processing process.
It improves data acquisition efficiency and rendering efficiency, saves storage space, and simplifies the data rendering process, supporting the visual presentation of large-scale spatial data.
Smart Images

Figure CN115168470B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a spatial data processing method, system, storage medium and electronic device. Background Art
[0002] At present, when storing data, different types of data (spatial data from different sources and / or different structures) are stored in different ways. Furthermore, since different types of data (spatial data from different sources and / or different structures) are stored in different ways, it is necessary to store different types of data separately, and store different types of data in different storage spaces.
[0003] However, when using existing data storage methods to process different types of data (for example, rendering spatial data from different sources and / or different structures), it is necessary to obtain data from different data storage spaces, resulting in low data acquisition efficiency. And because the types of data stored in different storage spaces are different, the types of data obtained from different storage spaces are also different. Therefore, when processing data obtained from different storage spaces, it is necessary to process data with different structures. However, when processing different types of data, different processing methods need to be used for different types of data, resulting in a large amount of data processing operations. Therefore, the computing efficiency is low when processing data using existing data storage methods.
[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0005] The purpose of the present disclosure is to provide a spatial data processing method, system, storage medium and electronic device, thereby overcoming the problems of low data acquisition efficiency and low computing efficiency caused by the limitations and defects of related technologies at least to a certain extent.
[0006] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.
[0007] According to a first aspect of the present disclosure, there is provided a spatial data processing method, comprising:
[0008] Acquire different types of spatial data, and convert the formats of the different types of spatial data to respectively generate data of the same preset format corresponding to the different types of spatial data;
[0009] Polling the different types of spatial data, storing the data in the preset format corresponding to each type of spatial data in the different types of spatial data into a corresponding first data table, and generating first identification information of the first data table;
[0010] Storing the first data table in a database, and storing the first identification information in an index table;
[0011] Determine third identification information from the first identification information corresponding to the different types of spatial data in the index table, where the third identification information is identification information of the spatial data to be rendered determined according to a viewing frustum;
[0012] The spatial data to be rendered is acquired from a third data table determined in the first data table in the database, and the spatial data to be rendered is rendered, wherein the third data table is a data table corresponding to the third identification information.
[0013] In an exemplary embodiment of the present disclosure, before storing the data in the preset format corresponding to each type of spatial data in the different types of spatial data in the corresponding first data table, the method further includes:
[0014] For each type of spatial data, downsample the spatial data of that type with different precisions to generate downsampled data with different precisions;
[0015] Convert the downsampled data of different precisions into different formats respectively to generate downsampled data of the preset format;
[0016] The downsampled data in the preset format are stored in the corresponding second data table respectively, and second identification information of the second data table is generated according to the target geographic spatial range and the second spatial grid level, wherein the target geographic spatial range is the geographic spatial range corresponding to the spatial data of this type;
[0017] The second data table is stored in the database, and the second identification information is stored in the index table.
[0018] In an exemplary embodiment of the present disclosure, downsampling the type of spatial data with different precisions includes:
[0019] Obtain the first data precision of the spatial data of this type;
[0020] Determining a first spatial grid level corresponding to the first data precision;
[0021] Down-sampling of the spatial data of this type with different precisions is performed according to the first spatial grid level to generate down-sampled data with different precisions, and the second spatial grid level corresponding to the down-sampled data with different precisions is smaller than the first spatial grid level.
[0022] In an exemplary embodiment of the present disclosure, storing the downsampled data in the preset format into corresponding second data tables respectively, and generating second identification information of the second data table according to the target geographic space range and the second spatial grid level includes:
[0023] Determining a second number of second data tables to store the downsampled data in the preset format according to the data amount of the downsampled data in the preset format and the preset storage capacity of the data table;
[0024] respectively configuring the second data table according to the second quantity and storing the downsampled data in the preset format in the second data table;
[0025] The second identification information is configured according to at least one of the type, the target geographic spatial range, and the second spatial grid level.
[0026] In an exemplary embodiment of the present disclosure, storing the data in the preset format corresponding to each type of spatial data in the different types of spatial data into the corresponding first data table, and generating first identification information of the first data table includes:
[0027] For each type of spatial data, determining a first number of first data tables to store the data in the preset format according to the data volume of the data in the preset format and a preset storage capacity;
[0028] configuring the first data table according to the first quantity and storing the data in the preset format in the first data table;
[0029] The first identification information is configured according to at least one of the type, the target geographic spatial range, and the first spatial grid level.
[0030] In an exemplary embodiment of the present disclosure, the acquiring the to-be-rendered spatial data from a third data table determined in the first data table of the database comprises:
[0031] Acquire the visual frustum and determine the geographic space range corresponding to the visual frustum;
[0032] Determine the third identification information from the first identification information in the index table according to the geographic space range, and the third geographic space range corresponding to the third identification information is within the geographic space range;
[0033] Determine, from the first data table in the database, a third data table corresponding to the third identification information according to the third identification information, and obtain third data in a preset format from the third data table;
[0034] The third data in the preset format is format-converted to generate the spatial data to be rendered.
[0035] In an exemplary embodiment of the present disclosure, determining the geographic space range corresponding to the visual frustum includes:
[0036] Acquire a near section, a far section, and a first distance between the near section and the far section of the visual frustum;
[0037] Dividing the first distance to divide an intermediate section between the near section and the far section; wherein each intermediate section is parallel to the near section;
[0038] The geographic space range corresponding to every two adjacent sections is determined respectively according to the near section, the far section and each of the intermediate sections.
[0039] In an exemplary embodiment of the present disclosure, determining the third identification information from the index table according to the geographic space range includes:
[0040] Determining spatial grid levels corresponding to the geographic space ranges respectively according to the target spatial grid level; wherein the spatial grid level is less than or equal to the target spatial grid level, the target spatial grid level is the spatial grid level corresponding to the map scale, and the map scale is the scale of the map corresponding to the visual frustum;
[0041] The third identification information is determined from the index table according to the geographic spatial range and the spatial grid level; wherein the third geographic spatial range corresponding to the third identification information is within the geographic spatial range, and the third spatial grid level corresponding to the third identification information is the spatial grid level.
[0042] In an exemplary embodiment of the present disclosure, determining the spatial grid levels respectively corresponding to the geographic space ranges according to the target spatial grid level includes:
[0043] Determine a first geographic space range according to the near section and an intermediate section adjacent to the near section, and use the target spatial grid level as the spatial grid level corresponding to the first geographic space range;
[0044] According to the second distance between each other geographic space range except the first geographic space range and the first geographic space range, the spatial grid level is downgraded at different levels to obtain the spatial grid levels corresponding to the other geographic space ranges.
[0045] In an exemplary embodiment of the present disclosure, rendering the to-be-rendered spatial data includes:
[0046] Determining different types of the to-be-rendered spatial data according to the third identification information;
[0047] The different types of spatial data to be rendered are rendered according to a first rendering order, and the rendered spatial data are displayed in the geographic space range.
[0048] In an exemplary embodiment of the present disclosure, the method further includes:
[0049] For any type of spatial data to be rendered, the spatial data to be rendered is divided according to the number of threads, and the spatial data to be rendered of the type corresponding to each of the threads is determined;
[0050] The threads are called respectively to render the spatial data to be rendered of the type.
[0051] In an exemplary embodiment of the present disclosure, the method further includes:
[0052] For any type of spatial data to be rendered, obtain location information of the type of spatial data to be rendered;
[0053] Determining a second rendering order of the type of spatial data to be rendered according to the position information;
[0054] The type of spatial data to be rendered is rendered according to the second rendering order to complete the rendering of the type of spatial data to be rendered.
[0055] According to a second aspect of the present disclosure, there is provided a spatial data processing system, comprising:
[0056] A spatial data acquisition module, used to acquire different types of spatial data, and convert the formats of the different types of spatial data to generate data of the same preset format corresponding to the different types of spatial data;
[0057] A spatial data storage module, configured to poll the different types of spatial data, store the data in the preset format corresponding to each type of spatial data in the different types of spatial data into a corresponding first data table, and generate first identification information of the first data table;
[0058] An identification information storage module, used for storing the first data table in a database, and storing the first identification information in an index table;
[0059] an identification information determining module, configured to determine third identification information from the first identification information corresponding to the different types of spatial data in the index table, wherein the third identification information is identification information of the spatial data to be rendered determined according to a viewing frustum;
[0060] The spatial data rendering module is used to obtain the spatial data to be rendered from a third data table determined in the first data table of the database, and render the spatial data to be rendered, wherein the third data table is a data table corresponding to the third identification information.
[0061] According to a third aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the steps of any one of the methods described in the first aspect are implemented.
[0062] According to a third aspect of the present disclosure, there is provided an electronic device, including:
[0063] Processor; and
[0064] A memory, configured to store executable instructions of the processor;
[0065] The processor is configured to perform the steps of any one of the methods described in the first aspect by executing the executable instructions.
[0066] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0067] In summary, the method provided by the present disclosure can store spatial data from different sources and / or different structures in the database in the same preset format, without occupying different storage spaces to store different types of spatial data, which greatly saves storage space. And the spatial data from different sources and / or different structures are stored in the database in the same preset format, and all data can be obtained from the database only, which improves data acquisition efficiency. Furthermore, the data obtained from the database are all in the same preset format, and the same rendering strategy can be used for spatial data from different sources and / or different structures, which simplifies the data rendering process and improves the rendering efficiency of spatial data.
[0068] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0070] Figure 1 A block diagram of a spatial data processing system in an exemplary embodiment of the present disclosure is schematically shown;
[0071] Figure 2 A flowchart of a spatial data processing method in an exemplary embodiment of the present disclosure is schematically shown;
[0072] Figure 3 A flowchart of a down-sampling data storage method in an exemplary embodiment of the present disclosure is schematically shown;
[0073] Figure 4 A flowchart of a method for acquiring spatial data to be rendered in an exemplary embodiment of the present disclosure is schematically shown;
[0074] Figure 5 A flowchart of a method for determining a geographic spatial range in an exemplary embodiment of the present disclosure is schematically shown;
[0075] Figure 6 A schematic diagram schematically shows a storage medium in an exemplary embodiment of the present disclosure;
[0076] Figure 7 A block diagram of an electronic device in an exemplary embodiment of the present disclosure is schematically shown.
[0077] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts. DETAILED DESCRIPTION
[0078] The principles and spirit of the present invention will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present invention, and are not intended to limit the scope of the present invention in any way. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.
[0079] Those skilled in the art will appreciate that the embodiments of the present invention may be implemented as a system, device, apparatus, method or computer program product. Therefore, the present disclosure may be specifically implemented in the following forms, namely: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.
[0080] The management technology of multi-source heterogeneous spatial data is a key technology in the development of geographic information systems. Multi-source heterogeneous spatial data refers to spatial data with different data sources and different data structures. With the rapid development of surveying and mapping technology, new surveying and mapping technologies continue to emerge, and multi-source heterogeneous spatial data is increasing.
[0081] At present, for the management of multi-source heterogeneous spatial data, spatial data of different sources and / or different structures are stored in different ways. Furthermore, since different sources and / or different structures are stored in different ways, it is necessary to store different sources and / or different structures separately and store them in different storage spaces.
[0082] However, with the current management method of multi-source heterogeneous spatial data, if multi-source heterogeneity is rendered, data needs to be obtained from different data storage spaces, resulting in low data acquisition efficiency. Furthermore, since the spatial data obtained from different data storage spaces have different sources and / or structures, different rendering strategies need to be adopted for spatial data with different sources and / or different structures, making the data rendering process more complicated and the rendering efficiency of spatial data low.
[0083] In view of the above-mentioned defects in the prior art, this exemplary embodiment first provides a spatial data processing system, which can be used to execute the spatial data processing method provided in this exemplary embodiment to improve the efficiency of spatial data acquisition and spatial data rendering. Figure 1 As shown in , the above-mentioned spatial data processing system 10 includes: a spatial data acquisition module 101, a spatial data storage module 102, a data table storage module 103, an identification information determination module 104 and a spatial data rendering module 105. Among them,
[0084] The spatial data acquisition module 101 is used to acquire different types of spatial data (e.g. Figure 1 The spatial data 1 to the spatial data N in the spatial data are converted into different types of spatial data, and data of the same preset format corresponding to the different types of spatial data are respectively generated;
[0085] The spatial data storage module 102 is used to poll the different types of spatial data, store the data of the preset format corresponding to each type of spatial data in the different types of spatial data into the corresponding first data table, and generate first identification information of the first data table;
[0086] The identification information storage module 103 is used to store the first data table in a database and store the first identification information in an index table;
[0087] An identification information determining module 104 is used to determine third identification information from the first identification information corresponding to the different types of spatial data in the index table, wherein the third identification information is identification information of the spatial data to be rendered determined according to a viewing frustum;
[0088] The spatial data rendering module 105 is used to obtain the spatial data to be rendered from a third data table determined in the first data table of the database, and render the spatial data to be rendered, wherein the third data table is a data table corresponding to the third identification information.
[0089] After introducing the spatial data processing system of the exemplary embodiment of the present invention, next, reference is made to Figures 2 to 5 , a spatial data processing method according to an exemplary embodiment of the present invention is described.
[0090] In an exemplary embodiment, Figure 2 As shown, the above-mentioned spatial data processing method includes:
[0091] S1. Acquire different types of spatial data, and convert the formats of the different types of spatial data to generate data of the same preset format corresponding to the different types of spatial data;
[0092] S2. Poll the different types of spatial data, store the data in the preset format corresponding to each type of spatial data in the different types of spatial data into a corresponding first data table, and generate first identification information of the first data table;
[0093] S3, storing the first data table in a database, and storing the first identification information in an index table;
[0094] S4, determining third identification information from the first identification information corresponding to the different types of spatial data in the index table, where the third identification information is identification information of the spatial data to be rendered determined according to a viewing frustum;
[0095] S5. Acquire the to-be-rendered spatial data from a third data table determined in the first data table in the database, and render the to-be-rendered spatial data, wherein the third data table is a data table corresponding to the third identification information.
[0096] In an exemplary embodiment of the present disclosure, different types of spatial data are spatial data of different sources and / or different structures, such as vector data, raster data, digital elevation data, and three-dimensional model data. The target spatial data can be any type of spatial data of different sources and / or different structures, such as vector data, raster data, digital elevation data, and three-dimensional model data. In addition, the preset format can be a binary character stream or a binary file stream, and can also be other formats, which are not specifically limited here.
[0097] The method provided by the present disclosure can store spatial data from different sources and / or different structures in the database in the same preset format. Therefore, when rendering spatial data, there is no need to obtain data from different sources and / or different structures from different storage spaces. All data can be obtained from the database, which improves data acquisition efficiency. Furthermore, the data obtained from the database are all in the same preset format, and the same rendering strategy can be used for spatial data from different sources and / or different structures, which simplifies the data rendering process and improves the rendering efficiency of spatial data.
[0098] Based on the above content, in an exemplary embodiment of the present disclosure, Figure 3 As shown, before storing the data of the preset format corresponding to each type of spatial data in the different types of spatial data into the corresponding first data table, the method further includes:
[0099] S61. For each type of spatial data, downsample the spatial data of the type with different precisions to generate downsampled data with different precisions;
[0100] S62, performing format conversion on the down-sampled data of different precisions respectively to generate down-sampled data of the preset format;
[0101] S63, storing the downsampled data in the preset format into corresponding second data tables respectively, and generating second identification information of the second data table according to a target geographic spatial range and the second spatial grid level, wherein the target geographic spatial range is a geographic spatial range corresponding to the spatial data of this type;
[0102] S64: Store the second data table in the database, and store the second identification information in the index table.
[0103] In an exemplary embodiment of the present disclosure, downsampling the spatial data of this type with different precisions includes:
[0104] Acquire a first data precision of the type of spatial data; determine a first spatial grid level corresponding to the first data precision; downsample the type of spatial data with different precisions according to the first spatial grid level to generate downsampled data with different precisions, wherein a second spatial grid level corresponding to the downsampled data with different precisions is smaller than the first spatial grid level.
[0105] In an exemplary embodiment of the present disclosure, the geographic space can be divided into different spatial grids of different levels. The sizes of spatial grids at the same level are consistent, and the higher the level of the spatial grid, the smaller the geographic space range contained in its single spatial grid, and the higher the accuracy of the spatial data. For example, the spatial grid levels range from L1 to Lmax, where max is an integer greater than 1. And the length and width of the spatial grid at level Ln-1 are respectively twice the length and width of the spatial grid at level Ln. Wherein n is an integer less than or equal to max. Accordingly, the accuracy of the spatial data corresponding to Ln is twice the accuracy of the spatial data corresponding to Ln-1.
[0106] Specifically, the acquired spatial data of this type includes the first data precision of the spatial data of this type. For example, when the spatial data of this type is three-dimensional model data M, the acquired three-dimensional model data M includes the data precision of M. In an exemplary embodiment of the present disclosure, M can be separated to determine the corresponding model geometry data G and texture data T1…Tm. Among them, m is an integer greater than 1. If the first spatial grid level corresponding to M is determined to be Ln according to the data precision of M, then M is downsampled with different precisions according to Ln to generate downsampled data with different precisions.
[0107] For example, the model geometry data G in the three-dimensional model data M can be kept unchanged, and the texture data T1…Tm can be downsampled with different precisions to generate downsampled data of three precision levels, namely, sub-clear data, sub-fuzzy data, and fuzzy data. Among them, the second spatial grid level corresponding to the sub-clear data is Ln-1 to Ln-i; the second spatial grid level corresponding to the sub-fuzzy data is Ln-i-1 to Ln-2i; the second spatial grid level corresponding to the fuzzy data is Ln-2i-1 to L1. i is a constant, and its value can be any integer from 1 to max / 4.
[0108] Furthermore, the sub-clear data, the sub-fuzzy data and the fuzzy data are format-converted to generate binary character stream data of the sub-clear data, the binary character stream data of the sub-fuzzy data and the binary character stream data of the fuzzy data, and then the binary character stream data of the sub-clear data, the binary character stream data of the sub-fuzzy data and the binary character stream data of the fuzzy data are stored in the corresponding second data table.
[0109] In an exemplary embodiment of the present disclosure, the target geographic space range corresponding to the three-dimensional model data can be determined according to the vertex coordinates in the model geometry data G of the three-dimensional model data M. Then, the second identification information of the second data table corresponding to the sub-clear level data is generated according to the target geographic space range and Ln-1 to Ln-i; the second identification information of the second data table corresponding to the sub-fuzzy level data is generated according to the target geographic space range and Ln-i-1 to Ln-2i; and the second identification information of the second data table corresponding to the fuzzy level data is generated according to the target geographic space range and Ln-2i-1 to L1.
[0110] In an exemplary embodiment of the present disclosure, the texture data T1…Tm can also be kept unchanged, and the model geometry data G can be downsampled with different precisions and the downsampled data of G can be stored. The downsampling process of the model geometry data G and other types of spatial data and the storage process of the downsampled data are similar to the downsampling process of the texture data T1…Tm and the storage process of the downsampled data, and will not be repeated here. In addition, it should be noted that the level of precision of the downsampled data and the correspondence between the downsampled data of different precisions and the spatial grid level are only exemplarily described here, and the present disclosure does not make specific restrictions on this.
[0111] Based on the above content, in an exemplary embodiment of the present disclosure, the above-mentioned storing the downsampled data in the preset format into the corresponding second data table respectively, and generating the second identification information of the second data table according to the target geographic space range and the second spatial grid level includes:
[0112] S631, determining a second number of second data tables to store the downsampled data in the preset format according to the data amount of the downsampled data in the preset format and the preset storage capacity of the data table;
[0113] S632, configuring the second data table according to the second quantity respectively and storing the down-sampled data in the preset format into the second data table;
[0114] S633: Configure the second identification information according to at least one of the type, the target geographic space range, and the second spatial grid level.
[0115] For example, the preset storage capacity of the data table is H. If the data volume of the model geometry data G is 3.3 times that of H, four second data tables G1 to G4 are configured to store the model geometry data G. It should be noted here that G4 only stores the geometry data of the remaining 0.3H in addition to the geometry data stored in G1 to G3 in the geometry data G, and the remaining 0.7H storage capacity in G4 no longer stores other data to ensure that only one type of data is stored in a data table, which is convenient for data management. The storage process of texture data T1...Tm and other types of spatial data is similar to that of the model geometry data G, and will not be repeated here.
[0116] Based on the above content, in an exemplary embodiment of the present disclosure, the above storing the data in the preset format corresponding to each type of spatial data in the different types of spatial data into the corresponding first data table, and generating the first identification information of the first data table includes:
[0117] S21. For each type of spatial data, determine a first number of first data tables to store the data in the preset format according to the data volume of the data in the preset format and a preset storage capacity;
[0118] S22, configuring the first data table according to the first quantity and storing the data in the preset format in the first data table;
[0119] S23. Configure the first identification information according to at least one of the type, the target geographic space range, and the first spatial grid level.
[0120] The storage process of the data in the preset format is similar to the storage process of the downsampled data in the preset format, and will not be described in detail here.
[0121] Based on the above content, in an exemplary embodiment of the present disclosure, Figure 4 As shown, the obtaining of the to-be-rendered spatial data from the third data table determined in the first data table in the database includes:
[0122] S51, acquiring the visual frustum and determining the geographic space range corresponding to the visual frustum;
[0123] S52: Determine the third identification information from the first identification information in the index table according to the geographic space range, and the third geographic space range corresponding to the third identification information is within the geographic space range;
[0124] S53, determining a third data table corresponding to the third identification information from the first data table in the database according to the third identification information, and acquiring third data in a preset format from the third data table;
[0125] S54: Convert the third data in the preset format to generate the spatial data to be rendered.
[0126] Specifically, the visual frustum is the visual frustum when the user views the map of the target geographical area. After obtaining the visual frustum, the geographic space range within the target geographical area corresponding to the visual frustum is determined. For example, the target geographical area may be Changping District, Beijing, and the target geographic space range may be Block A. If the third geographic space range corresponding to the three identification information, Community B, Street C, and Business District D, is within Block A, the third identification information is determined from the first identification information in the index table according to the geographic space range, and the third data table corresponding to the third identification information is determined from the first data table in the database, and then the third data of the binary character stream is obtained from the third data table. After obtaining the third data, the third data is formatted and the spatial data to be rendered is generated. The spatial data to be rendered is the spatial data of Community B, Community B, Street C, and Business District D.
[0127] Based on the above content, in an exemplary embodiment of the present disclosure, Figure 5 As shown, the above determination of the geographic space range corresponding to the visual frustum includes:
[0128] S511, acquiring a near section, a far section, and a first distance between the near section and the far section of the visual frustum;
[0129] S512, dividing the first distance to divide an intermediate section between the near section and the far section; wherein each intermediate section is parallel to the near section;
[0130] S513, determining the geographic space range corresponding to every two adjacent sections according to the near section, the far section and each of the intermediate sections.
[0131] In an exemplary embodiment of the present disclosure, the first distance L can be divided into three sections at equal distances to divide two intermediate sections between the near section and the far section. The distance between the near section and its adjacent intermediate section is 1 / 3L; the distance between the two intermediate sections is 1 / 3L; and the distance between the far section and its adjacent intermediate section is 1 / 3L.
[0132] In another exemplary embodiment of the present disclosure, the first distance L can be divided into three sections of different distances to divide two intermediate sections between the near section and the far section. The distance between the near section and its adjacent intermediate section is L / 6; the distance between the two intermediate sections is L / 3; and the distance between the far section and its adjacent intermediate section is L / 2.
[0133] Furthermore, after dividing the middle section, the geographic space range corresponding to each two adjacent sections is determined according to the near section, the far section and each of the middle sections. For example, the geographic space range corresponding to the near section and its adjacent middle section is the B community, the geographic space range corresponding to the two adjacent middle sections is the C street, and the geographic space range corresponding to the far section and its adjacent middle section is the D business district.
[0134] Based on the above content, in an exemplary embodiment of the present disclosure, determining the third identification information from the index table according to the geographic space range includes:
[0135] S521, determining the spatial grid levels corresponding to the geographic space ranges respectively according to the target spatial grid level; wherein the spatial grid level is less than or equal to the target spatial grid level, the target spatial grid level is the spatial grid level corresponding to the map scale, and the map scale is the scale of the map corresponding to the visual frustum;
[0136] S522. Determine the third identification information from the index table according to the geographic spatial range and the spatial grid level; wherein the third geographic spatial range corresponding to the third identification information is within the geographic spatial range, and the third spatial grid level corresponding to the third identification information is the spatial grid level.
[0137] In an exemplary embodiment of the present disclosure, determining the spatial grid levels respectively corresponding to the geographic space ranges according to the target spatial grid level includes:
[0138] A first geographic space range is determined according to the near section and an intermediate section adjacent to the near section, and the target spatial grid level is used as the spatial grid level corresponding to the first geographic space range; and according to a second distance between each geographic space range other than the first geographic space range and the first geographic space range, different levels of degradation are performed on the spatial grid level to obtain spatial grid levels corresponding to the other geographic space ranges.
[0139] Specifically, the first geographic space range is the geographic space range corresponding to the near section and the middle section adjacent to the near section, such as the B community. If the target spatial grid level corresponding to the map scale of the target geographic area viewed by the user is Ln-1 to Ln-i, Ln-1 to Ln-i will be used as the spatial grid level corresponding to the B community. If the second distance between C Street and B Community is smaller, the spatial grid level will be reduced by 1 level to Ln-i-1 to Ln-2i, and Ln-i-1 to Ln-2i will be used as the spatial grid level corresponding to C Street; if the second distance between D Business District and B Community is larger, the spatial grid level will be reduced by 2 levels to Ln-2i-1 to L1, and Ln-2i-1 to L1 will be used as the spatial grid level corresponding to D Business District.
[0140] Further, after determining that the spatial grid level corresponding to the B community is Ln-1 to Ln-i, the spatial grid level corresponding to the C street is Ln-i-1 to Ln-2i, and the spatial grid level corresponding to the D business district is Ln-2i-1 to L1, the third identification information of the third geographic space range in the B community and the third spatial grid level is Ln-1 to Ln-i, the third identification information of the third geographic space range in the C street and the third spatial grid level is Ln-i-1 to Ln-2i, and the third identification information of the third geographic space range in the D business district and the third spatial grid level is Ln-2i-1 to L1 is determined from the index table.
[0141] Based on the above content, in an exemplary embodiment of the present disclosure, the rendering of the to-be-rendered spatial data includes:
[0142] Determining different types of the to-be-rendered spatial data according to the third identification information;
[0143] The different types of spatial data to be rendered are rendered according to a first rendering order, and the rendered spatial data are displayed in the geographic space range.
[0144] Specifically, if it is determined according to the third identification information that the type of the spatial data to be rendered includes vector data, raster data, digital elevation data, and three-dimensional model data, and the first rendering order is the order of raster data-vector data-digital elevation data-three-dimensional model data, then the raster data in the spatial data to be rendered is rendered first, then the vector data in the spatial data to be rendered, then the digital elevation data in the spatial data to be rendered, and finally the three-dimensional model data in the spatial data to be rendered. After the spatial data to be rendered is rendered, the rendered spatial data is displayed in the geographic space range.
[0145] For example, the spatial data of B Community, C Street and B Business District all include vector data, raster data, digital elevation data and 3D model data. The raster data in the spatial data of B Community, C Street and B Business District are first rendered, then the vector data in the spatial data of B Community, C Street and B Business District are rendered, then the digital elevation data in the spatial data of B Community, C Street and B Business District are rendered, and finally the 3D model data in the spatial data of B Community, C Street and B Business District are rendered. After rendering the spatial data of B Community, C Street and B Business District, the rendered spatial data of B Community, C Street and D Business District are displayed in Block A, so that users can see the appearance of Block A.
[0146] Based on the above content, in an exemplary embodiment of the present disclosure, the above method further includes:
[0147] S55, for any type of spatial data to be rendered, dividing the spatial data to be rendered according to the number of threads, and determining the type of spatial data to be rendered corresponding to each thread;
[0148] S56 , respectively calling the threads to render the type of spatial data to be rendered.
[0149] For example, if the number of threads is 5, when rendering any type of spatial data to be rendered, the spatial data to be rendered of that type is divided into 5 parts. If the spatial data to be rendered of that type is the texture data T1...Tm of the three-dimensional model data, the texture data T1...Tm is divided into 5 parts, namely T1...Tm / 5, Tn / 5+1...T2m / 5, T2m / 5+1...T3m / 5, T3m / 5+1...T4m / 5 and T4m / 5+1...Tm. The first thread corresponds to T1...Tm / 5, the second thread corresponds to Tm / 5+1...T2m / 5, the third thread corresponds to T2m / 5+1...T3m / 5, the third thread corresponds to T3m / 5+1...T4m / 5, and the fifth thread corresponds to T4m / 5+1...Tm. Then call each thread separately to render the texture data T1...Tm of the three-dimensional model data. The first thread is used to render T1...Tm / 5, the second thread is used to render Tm / 5+1...T2m / 5, the third thread is used to render T2m / 5+1...T3m / 5, the fourth thread is used to render T3m / 5+1...T4m / 5, and the fifth thread is used to render T4m / 5+1...Tm. Using multiple threads to render spatial data can effectively improve the efficiency of spatial data rendering.
[0150] Based on the above content, in an exemplary embodiment of the present disclosure, the above method further includes:
[0151] S57, for any type of spatial data to be rendered, obtaining location information of the type of spatial data to be rendered;
[0152] S58, determining a second rendering order of the type of spatial data to be rendered according to the position information;
[0153] S59: Render the type of spatial data to be rendered according to the second rendering order to complete rendering of the type of spatial data to be rendered.
[0154] Specifically, if the type of spatial data to be rendered is texture data T1 ... Tm of three-dimensional model data, the rendering order of T1 ... Tm is determined to be D1 ... Dm according to the position information of the texture data T1 ... Tm, and the texture data T1 ... Tm is rendered according to the rendering order D1 ... Dm. For example, if the texture data is T1 to T5, and the rendering order D1 ... Dm is 1, 3, 2, 4, 5, then T1 is rendered, then T3, then T2, then T4, and finally T5.
[0155] It should be noted here that, for any type of spatial data to be rendered, the rendering strategy for this type of spatial data to be rendered can also be determined based on the number of threads and the location information of this type of spatial data to be rendered. For example, the texture data of the three-dimensional model data is T1...T4, the rendering order of T1...T4 is 2, 4, 3, 1, and the number of threads is 2. Thread 1 is used to render T3 and T4, and thread 1 renders T3 first and then T4. Thread 2 is used to render T1 and T2, and thread 2 renders T1 first and then T2. While using multi-threading to improve rendering efficiency, it can also ensure that the spatial data in the front rendering order is rendered first.
[0156] In summary, the spatial data processing method provided by the embodiment of the present disclosure can convert spatial data of different structures / different sources into data of a preset format and store them in a database, so that spatial data of different structures / different sources can be stored in the same database in the same storage method, without occupying different storage spaces to store different types of data, which greatly saves storage space. And when acquiring spatial data, all data can be acquired from the database only, without the need to acquire data from different storage spaces, thereby improving data acquisition efficiency. And the same rendering strategy is adopted for spatial data of different structures / different sources, which can render large-scale spatial data while improving the efficiency of spatial data rendering, thereby effectively supporting the visualization of spatial data in large scenes.
[0157] After introducing the spatial data processing method according to the exemplary embodiment of the present invention, Figure 6 A storage medium according to an exemplary embodiment of the present invention is described.
[0158] refer to Figure 6 As shown, a program product 600 for implementing the above method according to an embodiment of the present invention is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0159] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable 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.
[0160] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0161] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0162] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user computing device, partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0163] After introducing the storage medium of the exemplary embodiment of the present invention, next, reference is made to Figure 7 An electronic device according to an exemplary embodiment of the present invention is described.
[0164] Figure 7 The electronic device 70 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0165] like Figure 7 As shown, the electronic device 70 is in the form of a general computing device. The components of the electronic device 70 may include, but are not limited to: the at least one processing unit 710, the at least one storage unit 720, a bus 730 connecting different system components (including the storage unit 720 and the processing unit 710), and a display unit 740.
[0166] The storage unit stores program codes, which can be executed by the processing unit 710, so that the processing unit 710 performs the steps of various exemplary embodiments of the present invention described in the above "Exemplary Method" section of this specification. For example, the processing unit 910 can perform the following steps: Figure 2 Steps S1 to S5 shown in FIG.
[0167] The storage unit 720 may include a volatile storage unit, such as a random access storage unit (RAM) 7201 and / or a cache storage unit 7202, and may further include a read-only storage unit (ROM) 7203. The storage unit 720 may also include a program / utility 7204 having a set (at least one) of program modules 7205, such program modules 7205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination thereof may include the implementation of a network environment.
[0168] The bus 730 may include a data bus, an address bus, and a control bus.
[0169] The electronic device 70 may also communicate with one or more external devices 80 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), and such communication may be performed via an input / output (I / O) interface 750. The electronic device 70 also includes a display unit 740, which is connected to the input / output (I / O) interface 750 for display. In addition, the electronic device 700 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 760. As shown, the network adapter 760 communicates with other modules of the electronic device 70 via a bus 730. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 70, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0170] It should be noted that, although several modules or submodules of the spatial data processing system are mentioned in the above detailed description, such division is merely exemplary and not mandatory. In fact, according to an embodiment of the present invention, the features and functions of two or more units / modules described above may be embodied in one unit / module. Conversely, the features and functions of one unit / module described above may be further divided into multiple units / modules to be embodied.
[0171] In addition, although the operations of the method of the present invention are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.
[0172] Although the spirit and principle of the present invention have been described with reference to several specific embodiments, it should be understood that the present invention is not limited to the disclosed specific embodiments, and the division of various aspects does not mean that the features in these aspects cannot be combined to benefit, and such division is only for the convenience of expression. The present invention is intended to cover various modifications and equivalent arrangements included in the spirit and scope of the attached claims.
Claims
1. A spatial data processing method, characterized in that: include: Acquire different types of spatial data, and convert the formats of the different types of spatial data to respectively generate data of the same preset format corresponding to the different types of spatial data; the different types of spatial data include vector data, raster data, digital elevation data or three-dimensional model data; the preset format is a binary character stream or a binary file stream; Polling the different types of spatial data, storing the data in the preset format corresponding to each type of spatial data in the different types of spatial data into a corresponding first data table, and generating first identification information of the first data table; Storing the first data table in a database, and storing the first identification information in an index table; Determine third identification information from the first identification information corresponding to the different types of spatial data in the index table, where the third identification information is identification information of the spatial data to be rendered determined according to the viewing frustum; Acquire the to-be-rendered spatial data from a third data table determined in the first data table of the database, and render the to-be-rendered spatial data, wherein the third data table is a data table corresponding to the third identification information; The obtaining the to-be-rendered spatial data from a third data table determined from the first data table of the database comprises: Acquire the visual frustum and determine the geographic space range corresponding to the visual frustum; Determine the third identification information from the first identification information in the index table according to the geographic space range, and the third geographic space range corresponding to the third identification information is within the geographic space range; Determine, from the first data table in the database, a third data table corresponding to the third identification information according to the third identification information, and obtain third data in a preset format from the third data table; The third data in the preset format is format-converted to generate the spatial data to be rendered.
2. The method according to claim 1, characterized in that Before storing the data in the preset format corresponding to each type of spatial data in the different types of spatial data in the corresponding first data table, the method further includes: For each type of spatial data, downsample the spatial data of that type with different precisions to generate downsampled data with different precisions; Convert the downsampled data of different precisions into different formats respectively to generate downsampled data of the preset format; The downsampled data in the preset format are stored in the corresponding second data table respectively, and second identification information of the second data table is generated according to the target geographic spatial range and the second spatial grid level, wherein the target geographic spatial range is the geographic spatial range corresponding to the spatial data of this type; The second data table is stored in the database, and the second identification information is stored in the index table.
3. The method according to claim 2, characterized in that The downsampling of the spatial data of this type with different precisions includes: Obtain the first data precision of the spatial data of this type; Determining a first spatial grid level corresponding to the first data precision; Down-sampling of the spatial data of this type with different precisions is performed according to the first spatial grid level to generate down-sampled data with different precisions, and the second spatial grid level corresponding to the down-sampled data with different precisions is smaller than the first spatial grid level.
4. The method according to claim 3, characterized in that The storing of the downsampled data in the preset format into the corresponding second data table respectively and generating the second identification information of the second data table according to the target geographic space range and the second spatial grid level includes: Determining a second number of second data tables to store the downsampled data in the preset format according to the data amount of the downsampled data in the preset format and the preset storage capacity of the data table; respectively configuring the second data table according to the second quantity and storing the downsampled data in the preset format in the second data table; The second identification information is configured according to at least one of the type, the target geographic spatial range, and the second spatial grid level.
5. The method according to claim 3, characterized in that: The step of storing the data in the preset format corresponding to each type of spatial data in the different types of spatial data into the corresponding first data table and generating first identification information of the first data table includes: For each type of spatial data, determining a first number of first data tables to store the data in the preset format according to the data volume of the data in the preset format and a preset storage capacity; configuring the first data table according to the first quantity and storing the data in the preset format in the first data table; The first identification information is configured according to at least one of the type, the target geographic spatial range, and the first spatial grid level.
6. The method according to claim 1, characterized in that Determining the geographic space range corresponding to the visual frustum includes: Acquire a near section, a far section, and a first distance between the near section and the far section of the visual frustum; Dividing the first distance to divide an intermediate section between the near section and the far section; wherein each intermediate section is parallel to the near section; The geographic space range corresponding to every two adjacent sections is determined respectively according to the near section, the far section and each of the intermediate sections.
7. The method according to claim 6, characterized in that Determining the third identification information from the index table according to the geographic space range includes: Determining spatial grid levels corresponding to the geographic space ranges according to the target spatial grid level; wherein the spatial grid level is less than or equal to the target spatial grid level, the target spatial grid level is the spatial grid level corresponding to the map scale, and the map scale is the scale of the map corresponding to the visual frustum; The third identification information is determined from the index table according to the geographic spatial range and the spatial grid level; wherein the third geographic spatial range corresponding to the third identification information is within the geographic spatial range, and the third spatial grid level corresponding to the third identification information is the spatial grid level.
8. The method according to claim 7, characterized in that Determining the spatial grid levels corresponding to the geographic space ranges respectively according to the target spatial grid levels comprises: Determine a first geographic space range according to the near section and an intermediate section adjacent to the near section, and use the target spatial grid level as the spatial grid level corresponding to the first geographic space range; According to the second distance between each other geographic space range except the first geographic space range and the first geographic space range, the spatial grid level is downgraded at different levels to obtain the spatial grid levels corresponding to the other geographic space ranges.
9. The method according to claim 7, characterized in that: The rendering of the to-be-rendered spatial data comprises: Determining different types of the to-be-rendered spatial data according to the third identification information; The different types of spatial data to be rendered are rendered according to a first rendering order, and the rendered spatial data are displayed in the geographic space range.
10. The method according to claim 9, characterized in that The method further comprises: For any type of spatial data to be rendered, the spatial data to be rendered is divided according to the number of threads, and the spatial data to be rendered of the type corresponding to each of the threads is determined; The threads are called respectively to render the spatial data to be rendered of the type.
11. The method according to claim 9, characterized in that The method further comprises: For any type of spatial data to be rendered, obtain location information of the type of spatial data to be rendered; Determining a second rendering order of the type of spatial data to be rendered according to the position information; The type of spatial data to be rendered is rendered according to the second rendering order to complete the rendering of the type of spatial data to be rendered.
12. A spatial data processing system, characterized in that: include: A spatial data acquisition module, used to acquire different types of spatial data, and convert the formats of the different types of spatial data to respectively generate data of the same preset format corresponding to the different types of spatial data; the different types of spatial data include vector data, raster data, digital elevation data or three-dimensional model data; the preset format is a binary character stream or a binary file stream; A spatial data storage module, configured to poll the different types of spatial data, store the data in the preset format corresponding to each type of spatial data in the different types of spatial data into a corresponding first data table, and generate first identification information of the first data table; An identification information storage module, used for storing the first data table in a database, and storing the first identification information in an index table; an identification information determining module, configured to determine third identification information from the first identification information corresponding to the different types of spatial data in the index table, wherein the third identification information is identification information of the spatial data to be rendered determined according to the viewing frustum; a spatial data rendering module, configured to obtain the spatial data to be rendered from a third data table determined in the first data table of the database, and render the spatial data to be rendered, wherein the third data table is a data table corresponding to the third identification information; The spatial data rendering module is configured as follows: Acquire the visual frustum and determine the geographic space range corresponding to the visual frustum; Determine the third identification information from the first identification information in the index table according to the geographic space range, and the third geographic space range corresponding to the third identification information is within the geographic space range; Determine, from the first data table in the database, a third data table corresponding to the third identification information according to the third identification information, and obtain third data in a preset format from the third data table; The third data in the preset format is format-converted to generate the spatial data to be rendered.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.
14. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to perform the steps of the method according to any one of claims 1 to 11 by executing the executable instructions.
Citation Information
Patent Citations
Multi-source heterogeneous data integration processing method for urban rail transit engineering
CN114379608A
