Spatial data processing method and apparatus, electronic device, and medium
By parsing, transforming, topologically checking, and fusing spatial data from different sources, the problem of data silos in geospatial data systems has been solved, achieving efficient data storage and unified publishing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HAINA CLOUD IOT TECH CO LTD
- Filing Date
- 2022-11-30
- Publication Date
- 2026-05-19
AI Technical Summary
Existing geospatial data systems suffer from significant differences in data access standards and complex data interface forms due to variations in data application areas and collection methods. This makes it difficult to achieve data integration and service publishing between systems, resulting in data silos and an inability to form an effective unified data service capability.
By parsing, transforming, topologically checking, and fusing spatial data from different sources, unified target spatial data is obtained and stored in a relational database. The data is then automatically published according to preset interfaces and user requirements.
It enables unified management and efficient storage of spatial data from different sources, simplifies the data publishing process, and ensures the uniqueness and standardization of the data.
Smart Images

Figure CN115905441B_ABST
Abstract
Description
Technical Field
[0001] This application relates to computer information technology, and more particularly to a spatial data processing method, apparatus, electronic device, and medium. Background Technology
[0002] With the continuous development of Earth observation and remote sensing technologies, a vast amount of geospatial data of various types has been accumulated, mainly including spatiotemporal reference data, geodetic data, remote sensing image data, and location-related spatial media data.
[0003] Geospatial data is vast, diverse in data type, and complex in application scenarios. Some geospatial data systems have established service standards and sharing mechanisms to achieve data sharing and ensure data access. Most mature geospatial data systems have strict internal data usage and access standards, which effectively regulate application integration operations. However, due to differences in data application areas and acquisition methods, data access standards often vary significantly, and data interface forms are complex and diverse. This presents numerous challenges to data integration and service publishing between systems, resulting in data silos between different domains and applications.
[0004] With the continuous increase in the volume and types of spatial data, coupled with the cumbersome service storage and publishing processes, it is difficult to form an effective and unified data service capability, thus hindering the formation of data synergy. Therefore, proposing a standardized and efficient method for building and publishing data services has become crucial. Summary of the Invention
[0005] This application provides a spatial data processing method, apparatus, electronic device, and medium to provide a standardized and efficient method for spatial data storage and distribution.
[0006] On the one hand, this application provides a spatial data processing method, which includes:
[0007] Spatial data from different sources are parsed to obtain parsing results for each source. The parsing results include metadata and location data, where the metadata indicates the original coordinate system and the location data indicates the position in the original coordinate system.
[0008] Different parsing results are transformed to obtain unified spatial data. The unified spatial data includes unified metadata and unified location data. The unified metadata is used to indicate a preset coordinate system. The unified location data is obtained by transforming the location data according to the transformation relationship between the preset coordinate system and the original coordinate system, as well as the preset coordinate format.
[0009] Based on the topology check results of unified spatial data from different sources, the unified spatial data and its corresponding similar unified spatial data are fused to ensure that each building plan corresponds to a target spatial data; the topology check results are used to indicate the unified spatial data and its corresponding similar unified spatial data.
[0010] The target spatial data is stored in a relational database, and the target spatial data in the relational database is published through a preset interface and user requirements; the user requirements are used to instruct the target publishing service, which includes network map service, network map tile service, tile map service and network element service.
[0011] In another possible implementation, the parsing process of spatial data from different sources to obtain the parsing results for each source includes:
[0012] For spatial data in raster data format, call the raster data driver of the spatial data conversion library to obtain the spatial data in the raster data format;
[0013] For spatial data in vector data format, the vector data driver of the spatial data conversion library is invoked to obtain the spatial data in the vector data format.
[0014] The spatial data in the raster data format and the spatial data in the vector data format are used as the parsing results.
[0015] In another possible implementation, the transformation process of different parsing results to obtain unified spatial data includes:
[0016] If the original coordinate system is inconsistent with the preset coordinate system, the original coordinate system is converted into the preset coordinate system according to the ellipsoidal datum of the original coordinate system, the preset ellipsoidal datum, and the seven-parameter Bursa model.
[0017] The unified position data is obtained based on the original coordinate system and the preset coordinate system;
[0018] For unified position data used to represent multiple geometries, the multiple geometries are converted into multiple single geometries through flattening processing so that the unified position data meets the preset coordinate format.
[0019] In another possible implementation, before performing the fusion processing on the unified spatial data and its corresponding similar unified spatial data based on the topology check results of unified spatial data from different sources, the method further includes:
[0020] For each unified location data, calculate the similarity between the unified location data and similar unified location data within a preset range adjacent to the unified location data;
[0021] If the similarity is less than the preset similarity, then it is determined that the unified spatial data corresponding to the unified location data and the similar unified spatial data corresponding to the similar unified location data correspond to the same building plane.
[0022] The topology check result is obtained based on the unified spatial data and the similar unified spatial data corresponding to the same building plane.
[0023] In another possible implementation, the unified location data includes vertex data of the building plan, the target spatial data includes target location data, and the fusion processing of the unified spatial data and its corresponding similar unified spatial data includes:
[0024] Based on the unified spatial data and the similar unified spatial data, the target vertex data of each vertex of the building plane is determined, and the target vertex data of the building plane satisfies the condition that the area of the building plane is maximized.
[0025] The target vertex data is used as the vertex data of the target position data, and the target spatial data corresponding to the building plane is determined based on the target position data.
[0026] In another possible implementation, the unified spatial data further includes target attribute information, and the method further includes:
[0027] The target attribute information with the highest content richness is used as the target attribute information of the target spatial data corresponding to the building plane.
[0028] In another possible implementation, after storing the target spatial data in a relational database, the method further includes:
[0029] Invoke the index command to create a hash index and a spatial index for the target spatial data in the relational database.
[0030] On the other hand, this application provides a spatial data processing apparatus, which includes:
[0031] The parsing module is used to parse spatial data from different sources to obtain parsing results for each source of spatial data. The parsing results include metadata and location data, wherein the metadata is used to indicate the original coordinate system and the location data is used to indicate the position in the original coordinate system.
[0032] The conversion module is used to convert different parsing results to obtain unified spatial data. The unified spatial data includes unified metadata and unified location data. The unified metadata is used to indicate a preset coordinate system. The unified location data is obtained by converting the location data according to the conversion relationship between the preset coordinate system and the original coordinate system, as well as the preset coordinate format.
[0033] The fusion module is used to perform fusion processing on the unified spatial data and its corresponding similar unified spatial data based on the topology check results of unified spatial data from different sources, so that each building plane corresponds to a target spatial data; the topology check results are used to indicate the unified spatial data and its corresponding similar unified spatial data.
[0034] The storage and publishing module is used to store the target spatial data in a relational database and publish the target spatial data in the relational database through a preset interface and user requirements; the user requirements are used to instruct the target publishing service, which includes network map service, network map tile service, tile map service and network element service.
[0035] In another possible implementation, the parsing module is specifically used for:
[0036] For spatial data in raster data format, call the raster data driver of the spatial data conversion library to obtain the spatial data in the raster data format;
[0037] For spatial data in vector data format, the vector data driver of the spatial data conversion library is invoked to obtain the spatial data in the vector data format.
[0038] The spatial data in the raster data format and the spatial data in the vector data format are used as the parsing results.
[0039] In another possible implementation, the conversion module is specifically used for:
[0040] If the original coordinate system is inconsistent with the preset coordinate system, the original coordinate system is converted into the preset coordinate system according to the ellipsoidal datum of the original coordinate system, the preset ellipsoidal datum, and the seven-parameter Bursa model.
[0041] The unified position data is obtained based on the original coordinate system and the preset coordinate system;
[0042] For unified position data used to represent multiple geometries, the multiple geometries are converted into multiple single geometries through flattening processing so that the unified position data meets the preset coordinate format.
[0043] In another possible implementation, the fusion module is also used for:
[0044] For each unified location data, calculate the similarity between the unified location data and similar unified location data within a preset range adjacent to the unified location data;
[0045] If the similarity is less than the preset similarity, then it is determined that the unified spatial data corresponding to the unified location data and the similar unified spatial data corresponding to the similar unified location data correspond to the same building plane.
[0046] The topology check result is obtained based on the unified spatial data and the similar unified spatial data corresponding to the same building plane.
[0047] In another possible implementation, the fusion module is specifically used for:
[0048] Based on the unified spatial data and the similar unified spatial data, the target vertex data of each vertex of the building plane is determined, and the target vertex data of the building plane satisfies the condition that the area of the building plane is maximized.
[0049] The target vertex data is used as the vertex data of the target position data, and the target spatial data corresponding to the building plane is determined based on the target position data.
[0050] In another possible implementation, the fusion module is specifically used for:
[0051] The target attribute information with the highest content richness is used as the target attribute information of the target spatial data corresponding to the building plane.
[0052] In another possible implementation, the storage publishing module is also used for:
[0053] Invoke the index command to create a hash index and a spatial index for the target spatial data in the relational database.
[0054] Thirdly, the present invention provides an electronic device, comprising:
[0055] At least one processor and memory;
[0056] The memory stores computer-executed instructions;
[0057] The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the spatial data processing method as described in any of the first aspects above.
[0058] Fourthly, the present invention provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the spatial data processing method described in any of the first aspects above.
[0059] This application provides a spatial data processing method, apparatus, electronic device, and medium. The electronic device can acquire spatial data from different sources. Upon acquiring this spatial data, it sequentially performs unified transformation, topology checking, and fusion processing to ensure that the target spatial data ultimately stored in the relational database shares the same reference coordinate system and coordinate format. Furthermore, it ensures that only one set of target spatial data corresponds to one building plan, guaranteeing data uniqueness. This facilitates efficient data storage and unified management. In addition, when storing the target spatial data in the relational database, it automatically publishes the target spatial data according to preset interfaces and user requirements, saving time spent on manual publishing. Attached Figure Description
[0060] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0061] Figure 1 A schematic flowchart illustrating a spatial data processing method provided in an embodiment of this application;
[0062] Figure 2 A flowchart illustrating a multi-source spatial data parsing and conversion method provided in an embodiment of this application;
[0063] Figure 3 A flowchart illustrating a multi-source spatial data fusion method provided in this application embodiment;
[0064] Figure 4 This is a schematic diagram of the structure of a spatial data processing device provided in an embodiment of this application;
[0065] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0066] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0067] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0068] Spatial data is the lifeblood of Geographic Information Systems (GIS) and the foundation for digital and intelligent construction. In a GIS, a set of spatial data represents a building plan. Specifically, a set of spatial data mainly includes metadata, attribute information, and location data. Metadata typically includes projection information, the number of rows and columns, and resolution. Attribute information typically includes the building plan's name and feature type. Location data generally includes the building plan's vertex data.
[0069] With the rapid development of Earth observation and remote sensing technologies, the quality of spatial data has continuously improved, its data types have become extremely rich, and its volume has exploded. Some geographic information systems (GIS) have established service standards and sharing mechanisms to achieve data sharing and ensure data access. Most mature geospatial data systems have strict internal data usage and access standards, which effectively regulate application integration operations. However, due to differences in data application areas and acquisition methods, data access standards often vary significantly, and data interface forms are complex and diverse. This presents numerous challenges to data integration and service publishing between systems, resulting in data silos between different fields and applications.
[0070] The increasing volume and types of spatial data, coupled with cumbersome service deployment processes, make it difficult to establish effective and unified data service capabilities, thus hindering the formation of data synergy. Therefore, proposing a standardized and efficient method for data processing, storage, and deployment is crucial.
[0071] This application provides a spatial data processing method, apparatus, electronic device, and medium. When spatial data from different sources is acquired, it sequentially performs unified conversion, topology checking, and fusion processing on the spatial data from these different sources to obtain standardized target spatial data for efficient storage. After obtaining the standardized target spatial data, it is stored in a relational database, and the target spatial data is automatically published through preset interfaces and user requirements.
[0072] Figure 1 This is a flowchart illustrating a spatial data processing method provided in an embodiment of this application. The following is in conjunction with... Figure 1 The specific implementation process of the embodiments of this application will be described in detail. For example... Figure 1As shown, the method includes the following:
[0073] S101, analyze and process spatial data from different sources to obtain the analysis results for each source of spatial data.
[0074] The parsing results include metadata and location data. The metadata indicates the original coordinate system, and the location data indicates the position in the original coordinate system.
[0075] Specifically, metadata includes projection information of the location data to indicate the original coordinate system in which the location data is located. The location data characterizes the location and shape of the building plan represented by the spatial data.
[0076] In this embodiment, the parsing result also includes attribute information, which is used to indicate information such as the name and features of the building's floor plan.
[0077] S102, converts different analytical results to obtain unified spatial data.
[0078] The unified spatial data includes unified metadata and unified location data. The unified metadata is used to indicate the preset coordinate system, and the unified location data is obtained by transforming the location data according to the transformation relationship between the preset coordinate system and the original coordinate system, as well as the preset coordinate format.
[0079] Specifically, the electronic device performs conversion processing on the analysis results from different sources to obtain standardized and unified spatial data. In this embodiment, the conversion processing is mainly used to unify the coordinate system and coordinate format. In this embodiment, the reference coordinate system of spatial data from different sources is converted to the National Geodetic Coordinate System CGCS2000, and the data used to represent the position of multiple geometric objects is uniformly converted into the format of multiple single geometric objects.
[0080] Optionally, during the unified conversion process, the electronic device also uses a serpentine naming convention to uniformly name the attribute information to obtain the target attribute information. For example, the attribute field representing the floor plan name of a building is named province_name.
[0081] S103. Based on the topology check results of unified spatial data from different sources, perform fusion processing on the unified spatial data and its corresponding similar unified spatial data so that each building plane corresponds to a target spatial data.
[0082] The topology check result is used to indicate unified spatial data and its corresponding similar unified spatial data, that is, to indicate at least two sets of spatial data representing the same building plane. In this embodiment, the spatial data corresponding to each building plane obtained after performing topology check and fusion processing on the unified spatial data are used as target spatial data. The target spatial data includes target metadata, target attribute information, and target location data.
[0083] S104 stores the target spatial data in a relational database and publishes the target spatial data in the relational database through a preset interface and user requirements.
[0084] Among them, user requirements are used to indicate target publishing services, which include network map services, network map tile services, tile map services, and network element services.
[0085] Specifically, when storing target spatial data in a relational database, the electronic device obtains user requirements and publishes the target spatial data according to a preset interface and user requirements. The preset interface is a Representational State Transfer (REST) interface provided by an open-source map server.
[0086] In this embodiment, before storing the target spatial data in a relational database, the electronic device first establishes a connection with the relational database. Specifically, the relational database is a PostgreSQL database, and the electronic device connects to the PostgreSQL database by installing the PostGIS extension.
[0087] Specifically, the electronic device first creates an empty data table for each target space data. When storing data, the empty data table name is assigned to the corresponding name attribute field, and the target space data corresponding to the name attribute field is stored in the data table until the storage of all target space data is completed.
[0088] Optionally, after storing the target spatial data into a relational database, the electronic device calls an index command to create hash indexes and spatial indexes for each data table.
[0089] In this embodiment, when the electronic device stores the target space data in the relational database, it triggers a release command to automatically release the target space data through a preset interface and user requirements.
[0090] Optionally, the target attribute information also includes information such as bounding box size, geometry type, and feature type. When publishing the above target spatial data, the electronic device automatically configures the layer parameters based on the target attribute information of each set of target spatial data.
[0091] The method provided in this embodiment can parse spatial data from different sources to obtain parsing results from different sources, even if the electronic device acquires spatial data in different formats. When acquiring spatial data in different formats, a unified conversion process is performed to ensure that the spatial data in different formats has a unified reference coordinate system and coordinate format, resulting in unified spatial data. Next, the electronic device performs topology checking and fusion processing on the unified spatial data to obtain the target spatial data. Finally, the target spatial data is stored in a relational database and automatically published according to preset interfaces and user requirements.
[0092] In the aforementioned process, the electronic device can acquire spatial data from different sources and sequentially perform transformation, topology checking, and fusion processing on the spatial data from different sources, making the final target spatial data standardized and uniform, thus facilitating its efficient storage in a relational database. Simultaneously, when storing the target spatial data in the relational database, the electronic device automatically publishes it through a preset interface, thereby simplifying the cumbersome process of manually publishing spatial data in known technologies.
[0093] Figure 2 This is a flowchart illustrating a method for parsing and converting multi-source spatial data, provided as an embodiment of this application. Specifically, based on the above embodiments, this embodiment focuses on providing a detailed description of a method for electronic devices to parse and uniformly convert multi-source spatial data. Figure 2 As shown, the method provided in this embodiment includes:
[0094] S201, For spatial data in raster data format, call the raster data driver of the spatial data conversion library to obtain spatial data in raster data format.
[0095] S202, For spatial data in vector data format, call the vector data driver of the spatial data conversion library to obtain spatial data in vector data format.
[0096] S203 uses spatial data in raster and vector formats as parsing results.
[0097] In this embodiment, the electronic device uses the open-source Geospatial Data Abstraction Library (GDAL) under the X / MIT license to parse spatial data from different sources. The GDAL library includes a raster data driver and a vector data driver; the raster data driver is used to parse spatial data in raster format, and the vector data driver is used to parse spatial data in vector format.
[0098] Specifically, for raster data formats such as GTiff, JPEG, LAN, ENVI, and GPKG, electronic devices call the raster data driver of the GDAL library to parse the data and obtain the parsing results of the spatial data in the raster data format.
[0099] In this embodiment, the vector data formats supported by the electronic device include JSON (e.g., GeoJSON, TopoJSON, ESRIJSON), XML (e.g., GML, KML), CAD (e.g., DWG, DXF), database (FileGDB, PostgreSQL, SQLite) and other (e.g., GPKG, GPX, MVT, ESRI Shapefile) data formats.
[0100] For example, spatial data in ESRI Shapefile format typically consists of shp files (geometric information), shx files (geometric-to-attribute index information), dbf files (attribute information), prj files (projection information), etc. Among them, geometric information is used to indicate the position data of the building plane corresponding to the spatial data, and the position data includes vertex data, which is the coordinate data of each vertex of the building plane. Projection information is used to indicate the original coordinate system.
[0101] When parsing spatial data in the above format, the electronic device first obtains the geometric information in the shp file through the EPSGShapefile vector driver of the GDAL library, then traverses all geometric features to obtain the attribute information stored in the geometric features, and finally combines the projection information stored in the prj file as the final parsing result.
[0102] For spatial data in DWG format, electronic devices use the DWG vector data driver in the GDAL library to obtain geometric, attribute, and projection information from the DWG file and use it as the final parsing result.
[0103] Alternatively, GeoJSON data is in plain text format. When electronic devices parse it, they can also use FastJSON, a JSON parsing library, to obtain the final parsing result.
[0104] S204. When obtaining the analytical results, if the original coordinate system is inconsistent with the preset coordinate system, the original coordinate system is converted into the preset coordinate system based on the ellipsoidal datum of the original coordinate system, the preset ellipsoidal datum, and the seven-parameter Bursa model.
[0105] S205. Based on the original coordinate system and the preset coordinate system, obtain unified position data.
[0106] In this embodiment, the preset coordinate system is the National Geodetic Coordinate System (CGCS2000). The electronic device determines whether the original coordinate system of the spatial data is CGCS2000 based on the projection information of the spatial data. If the original coordinate system is not CGCS2000, the electronic device needs to convert the original coordinate system during the unified conversion.
[0107] Specifically, the electronic device first sets the coordinate data of each vertex in the spatial data as spatial rectangular coordinate data, then converts the spatial rectangular coordinate data into spatial rectangular coordinates corresponding to the preset ellipsoid reference through the seven-parameter Bursa model, and finally converts it into target coordinate data in the preset coordinate system through the preset ellipsoid reference.
[0108] Optionally, if the electronic device determines that the original coordinate system is consistent with the preset coordinate system based on the projection information, then the original coordinate system of the spatial data is directly determined to be the preset coordinate system, and the position data is uniform position data.
[0109] S206, For unified position data used to represent multiple geometries, the multiple geometries are converted into multiple single geometries through flattening processing so that the unified position data meets the preset coordinate format.
[0110] Specifically, the unified location data includes not only vertex data but also line data and surface data. For two-dimensional vertex data representing multiple points, the electronic device performs flattening processing to reduce its dimensionality, resulting in multiple one-dimensional vertex data. For three-dimensional line data representing multiple lines, the electronic device performs flattening processing to reduce its dimensionality, resulting in multiple two-dimensional line data. For four-dimensional surface data representing multiple faces, the electronic device performs flattening processing to reduce its dimensionality, resulting in multiple three-dimensional surface data.
[0111] The method provided in this embodiment allows electronic devices to parse spatial data from different sources using the GDAL library to obtain parsing results. By performing a unified transformation on the parsing results, unified spatial data with a standardized coordinate format is obtained, which facilitates the efficient management and storage of the final spatial data.
[0112] Figure 3 This is a flowchart illustrating a multi-source spatial data fusion method provided in this application embodiment. Specifically, this embodiment, based on the foregoing embodiments, describes in detail the method for obtaining target spatial data. Figure 3 As shown, the method provided in this embodiment includes the following:
[0113] S301, when acquiring unified spatial data, for each unified location data, calculate the similarity between the unified location data and similar unified location data within a preset range adjacent to the unified location data.
[0114] S302, if the similarity is less than the preset similarity, then the unified spatial data corresponding to the unified location data and the similar unified spatial data corresponding to the similar unified location data are determined to correspond to the same building plane.
[0115] The preset similarity and preset range are manually input into the electronic device beforehand. The similarity is used to indicate the probability that at least two sets of unified spatial data can represent the same building plane, and is determined by the distance between the corresponding vertices of the at least two sets of unified spatial data. The preset range is determined based on the vertex data.
[0116] In this embodiment, when the electronic device obtains unified spatial data, it first determines the shape of the building plan represented by the corresponding unified spatial data based on each unified location data and unified location data within its corresponding preset range. For unified spatial data used to represent building plans of the same shape, the electronic device calculates the distance between each vertex and its corresponding similar vertex using its unified location data to determine the similar unified spatial data of the corresponding unified spatial data.
[0117] For example, one set of unified spatial data has unified positional data as (1,1), (2,1), (2,2), (1,2), and another set has unified positional data as (1,0.99), (2,0.99), (2,2.01), (1,2.01). Here, (1,1) and (1,0.99) are the corresponding vertices. If the preset range of the input electronic device is a circle with each vertex as its center and a radius of 0.5, and the preset similarity is that the distance between corresponding vertices is less than 0.2, then it can be determined that the above two sets of unified spatial data satisfy the preset similarity.
[0118] S303. Based on the unified spatial data and similar unified spatial data corresponding to the same building plane, the topology check results are obtained.
[0119] Specifically, the electronic device records each uniform spatial data and its similar uniform spatial data, and uses the recording results as the topology check results.
[0120] S304. Based on unified spatial data and similar unified spatial data, determine the target vertex data for each vertex of the building plane. The target vertex data of the building plane satisfies the condition that the area of the building plane is maximized.
[0121] S305, the target attribute information with the highest content richness is taken as the target attribute information of the target spatial data corresponding to the building plan.
[0122] In this embodiment, for unified spatial data and similar unified spatial data used to represent the same building plane, the electronic device performs fusion processing so that a building plane corresponds to only one set of unified spatial data.
[0123] Specifically, the fusion process includes the fusion of unified location data and the fusion of unified attribute information.
[0124] In the process of fusing unified location data, the vertex data of each vertex that maximizes the floor area of the building is used as the target vertex data, and the target vertex data is used as the target location data of the target spatial data obtained after fusion processing. For example, for the two sets of spatial data mentioned in S302, the target vertex data are (1,1), (2,1), (2,2.01), and (1,2.01).
[0125] When fusing target attribute information, the electronic device uses the one with the highest content richness as the target attribute information of the target spatial data obtained after fusion processing.
[0126] The method provided in this embodiment involves an electronic device fusing unified spatial data representing the same building plan, ensuring that each building plan corresponds to only one set of target spatial data, thus guaranteeing data uniqueness. Furthermore, during data fusion, vertex data that maximizes the building area and target attribute data with the highest content richness are retained, thereby improving data completeness and accuracy.
[0127] The above embodiments introduce a spatial data processing method from the perspective of process flow. The following embodiments introduce a spatial data processing device from the perspective of virtual module or virtual unit. For details, please refer to the following embodiments.
[0128] This application provides a spatial data processing device, such as... Figure 4 As shown, the device includes:
[0129] The parsing module 41 is used to parse and process spatial data from different sources to obtain parsing results for each source of spatial data. The parsing results include metadata and location data. The metadata is used to indicate the original coordinate system, and the location data is used to indicate the position in the original coordinate system.
[0130] The conversion module 42 is used to convert different parsing results to obtain unified spatial data. The unified spatial data includes unified metadata and unified location data. The unified metadata is used to indicate the preset coordinate system. The unified location data is obtained by converting the location data according to the conversion relationship between the preset coordinate system and the original coordinate system, as well as the preset coordinate format.
[0131] The fusion module 43 is used to perform fusion processing on the unified spatial data and its corresponding similar unified spatial data based on the topology check results of the unified spatial data from different sources, so that each building plane corresponds to a target spatial data; the topology check results are used to indicate the unified spatial data and its corresponding similar unified spatial data.
[0132] The storage and publishing module 44 is used to store target spatial data in a relational database and publish the target spatial data in the relational database through a preset interface and user requirements. User requirements are used to indicate target publishing services, which include network map services, network map tile services, tile map services and network element services.
[0133] In another possible implementation of this application embodiment, the parsing module 41 is specifically used for:
[0134] For spatial data in raster format, call the raster data driver in the spatial data conversion library to obtain spatial data in raster format;
[0135] For spatial data in vector data format, call the vector data driver of the spatial data conversion library to obtain spatial data in vector data format;
[0136] Spatial data in raster and vector formats are used as parsing results.
[0137] In another possible implementation of this application embodiment, the conversion module 42 is specifically used for:
[0138] If the original coordinate system is inconsistent with the preset coordinate system, the original coordinate system will be converted into the preset coordinate system based on the ellipsoidal datum of the original coordinate system, the preset ellipsoidal datum, and the seven-parameter Bursa model.
[0139] Based on the original coordinate system and the preset coordinate system, unified position data is obtained;
[0140] For unified position data used to represent multiple geometries, flattening is used to convert the multiple geometries into multiple single geometries so that the unified position data meets the preset coordinate format.
[0141] In another possible implementation of this application embodiment, the fusion module 43 is further used for:
[0142] For each unified location data, calculate the similarity between the unified location data and similar unified location data within a preset range that are adjacent to the unified location data.
[0143] If the similarity is less than the preset similarity, then the unified spatial data corresponding to the unified location data and the similar unified spatial data corresponding to the similar unified location data are determined to correspond to the same building plane;
[0144] The topology check results are obtained based on the unified spatial data and similar unified spatial data corresponding to the same building plane.
[0145] In another possible implementation of this application embodiment, the fusion module 43 is specifically used for:
[0146] Based on unified spatial data and similar unified spatial data, the target vertex data of each vertex of the building plane is determined, and the target vertex data of the building plane satisfies the condition of maximizing the area of the building plane;
[0147] The target vertex data is used as the vertex data of the target position data, and the target spatial data corresponding to the building plane is determined based on the target position data.
[0148] In another possible implementation of this application embodiment, the fusion module 43 is specifically used for:
[0149] The target attribute information with the highest content richness is used as the target attribute information of the target spatial data corresponding to the building plan.
[0150] In another possible implementation of this application embodiment, the storage and publishing module 44 is further used for:
[0151] Use the index command to create hash indexes and spatial indexes on the target spatial data in the relational database.
[0152] The spatial data processing apparatus provided in this application is applicable to the above method embodiments, and will not be described again here.
[0153] This application provides an electronic device, such as... Figure 5 As shown, Figure 5 The illustrated electronic device includes a processor 51 and a memory 52. The processor 51 and the memory 52 are connected, for example, via a bus 53. Optionally, the electronic device may also include a transceiver 54. It should be noted that in practical applications, the transceiver 54 is not limited to one type, and the structure of this electronic device does not constitute a limitation on the embodiments of this application.
[0154] The processor 51 may be a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor 51 may also be a combination that implements computational functions, such as a combination of one or more microprocessors 51, a combination of a DSP and a microprocessor 51, etc.
[0155] Bus 53 may include a pathway for transmitting information between the aforementioned components. Bus 53 may be a Peripheral Component Interconnect (PCI) bus 53 or an Extended Industry Standard Architecture (EISA) bus 53, etc. Bus 53 can be divided into address bus 53, data bus 53, control bus 53, etc. For ease of representation, Figure 5 The bus 53 is represented by a single thick line, but this does not mean that there is only one bus 53 or only one type of bus 53.
[0156] The memory 52 may be a read-only memory 52 (ROM) or other type of static storage device capable of storing static information and instructions, a random access memory 52 (RAM) or other type of dynamic storage device capable of storing information and instructions, or an electrically erasable programmable read-only memory 52 (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto.
[0157] The memory 52 is used to store application code that executes the solution of this application, and its execution is controlled by the processor 51. The processor 51 is used to execute the application code stored in the memory 52 to implement the content shown in the foregoing method embodiments.
[0158] Electronic devices include, but are not limited to: mobile terminals such as mobile phones, laptops, digital radio receivers, personal digital assistants (PDAs), tablet computers (PADs), portable multimedia players (PMPs), and in-vehicle terminals (such as in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Servers can also be included. Figure 5 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0159] This application provides a computer-readable storage medium storing a computer program that, when run on a computer, enables the computer to execute the corresponding content in the aforementioned method embodiments.
[0160] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the claims.
[0161] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A spatial data processing method, characterized in that, include: Spatial data from different sources are parsed and processed to obtain the parsing results for each source. The parsing result includes metadata and location data. The metadata is used to indicate the original coordinate system, and the location data is used to indicate the position in the original coordinate system. Different parsing results are transformed to obtain unified spatial data. The unified spatial data includes unified metadata, unified location data, and unified attribute information. The unified metadata is used to indicate a preset coordinate system. The unified location data is obtained by transforming the location data according to the transformation relationship between the preset coordinate system and the original coordinate system, as well as the preset coordinate format. The attribute information includes the name of the building plan and the type of land feature. For each unified location data, calculate the similarity between the unified location data and similar unified location data within a preset range adjacent to the unified location data; If the similarity is less than the preset similarity, then it is determined that the unified spatial data corresponding to the unified location data and the similar unified spatial data corresponding to the similar unified location data correspond to the same building plane. Based on the unified spatial data and similar unified spatial data corresponding to the same building plane, the topology check results are obtained; Based on the topology check results of unified spatial data from different sources, the unified spatial data and its corresponding similar unified spatial data are fused to ensure that each building plane corresponds to a target spatial data. The topology check results are used to indicate the unified spatial data and its corresponding similar unified spatial data; The target spatial data is stored in a relational database, and the target spatial data in the relational database is published through a preset interface and user requirements; The user requirements are used to indicate the target publishing service, which includes network map service, network map tile service, tile map service and network element service; The unified location data includes vertex data of the building plan, the target spatial data includes target location data, and the fusion processing of the unified spatial data and its corresponding similar unified spatial data includes: Based on the unified spatial data and the similar unified spatial data, the target vertex data of each vertex of the building plane is determined, and the target vertex data of the building plane satisfies the condition that the area of the building plane is maximized. The target vertex data is used as the vertex data of the target position data, and the target spatial data corresponding to the building plane is determined based on the target position data; The target spatial data includes target attribute information, and the method further includes: The unified attribute information with the highest content richness is used as the target attribute information of the target spatial data corresponding to the building plane.
2. The method according to claim 1, characterized in that, The parsing and processing of spatial data from different sources to obtain the parsing results for each source includes: For spatial data in raster data format, call the raster data driver of the spatial data conversion library to obtain the spatial data in the raster data format; For spatial data in vector data format, the vector data driver of the spatial data conversion library is invoked to obtain the spatial data in the vector data format. The spatial data in the raster data format and the spatial data in the vector data format are used as the parsing results.
3. The method according to claim 1, characterized in that, The process of converting different analytical results to obtain unified spatial data includes: If the original coordinate system is inconsistent with the preset coordinate system, the original coordinate system is converted into the preset coordinate system according to the ellipsoidal datum of the original coordinate system, the preset ellipsoidal datum, and the seven-parameter Bursa model. The unified position data is obtained based on the original coordinate system and the preset coordinate system; For unified position data used to represent multiple geometries, the multiple geometries are converted into multiple single geometries through flattening processing so that the unified position data meets the preset coordinate format.
4. The method according to claim 1, characterized in that, After storing the target spatial data in a relational database, the method further includes: Invoke the index command to create a hash index and a spatial index for the target spatial data in the relational database.
5. A spatial data processing device, characterized in that, include: The parsing module is used to parse and process spatial data from different sources to obtain the parsing results for each source of spatial data; The parsing result includes metadata and location data. The metadata is used to indicate the original coordinate system, and the location data is used to indicate the position in the original coordinate system. The conversion module is used to convert different parsing results to obtain unified spatial data. The unified spatial data includes unified metadata, unified location data, and unified attribute information. The unified metadata is used to indicate a preset coordinate system. The unified location data is obtained by converting the location data according to the conversion relationship between the preset coordinate system and the original coordinate system, as well as the preset coordinate format. The attribute information includes the name of the building plan and the type of land feature. The fusion module is used to: for each unified location data, calculate the similarity between the unified location data and similar unified location data within a preset range adjacent to the unified location data; If the similarity is less than the preset similarity, then it is determined that the unified spatial data corresponding to the unified location data and the similar unified spatial data corresponding to the similar unified location data correspond to the same building plane. Based on the unified spatial data and similar unified spatial data corresponding to the same building plane, the topology check results are obtained; The fusion module is also used to perform fusion processing on the unified spatial data and its corresponding similar unified spatial data based on the topology check results of unified spatial data from different sources, so that each building plane corresponds to a target spatial data. The topology check results are used to indicate the unified spatial data and its corresponding similar unified spatial data; The storage and publishing module is used to store the target space data in a relational database and publish the target space data in the relational database through a preset interface and user requirements. The user requirements are used to indicate the target publishing service, which includes network map service, network map tile service, tile map service and network element service; The unified location data includes vertex data of the building plan, the target spatial data includes target location data, and the fusion module is used to perform fusion processing on the unified spatial data and its corresponding similar unified spatial data, specifically for: Based on the unified spatial data and the similar unified spatial data, the target vertex data of each vertex of the building plane is determined, and the target vertex data of the building plane satisfies the condition that the area of the building plane is maximized. The target vertex data is used as the vertex data of the target position data, and the target spatial data corresponding to the building plane is determined based on the target position data; The target spatial data includes target attribute information, and the fusion module is further used for: The unified attribute information with the highest content richness is used as the target attribute information of the target spatial data corresponding to the building plane.
6. An electronic device, characterized in that, include: At least one processor and memory; The memory stores computer-executed instructions; The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the spatial data processing method as described in any one of claims 1-4.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the spatial data processing method as described in any one of claims 1-4.