Method and device for acquiring landform data, electronic equipment and storage medium
By acquiring and processing the position data of the landform polygons and elevation polygons, triangulation and landform value assignment, the problem that the existing technology cannot render three-dimensional terrain and landform landforms is solved, and the conversion from two-dimensional data to three-dimensional data is realized.
Patent Information
- Application Number
- CN202411232551.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-03
- Publication Date
- 2025-02-14
AI Technical Summary
The prior art cannot directly obtain elevation data of three-dimensional topographic landforms from two-dimensional landform location data, resulting in the inability to render three-dimensional topographic landforms.
By obtaining the position data of the elevation polygon and the geomorphic polygon of the target area, determining the elevation position data of the intersection point, and triangulation is performed to obtain the vertex elevation position data of the triangle area, thereby assigning the triangular region landform value of the geomorphic polygon to generate three-dimensional geomorphic data .
It realizes the acquisition of elevation data of three-dimensional topographic landforms from two-dimensional landform location data, and can directly render the three-dimensional topographic landforms and accurately restore the topographic landforms of the target area.
Smart Images

Figure CN119444947A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of map technology, and in particular to a method, device, electronic device and storage medium for acquiring landform data. Background Art
[0002] Landforms can be understood as the undulating shapes of the earth's surface, such as mountains, plains, river valleys, and sand dunes on land, continental shelves, continental slopes, deep-sea plains, and submarine mountains on the seabed. At present, the location data of landforms only have longitude and latitude but no elevation, that is, the location data of landforms is two-dimensional. Therefore, it is impossible to directly render three-dimensional landforms based on the location data of landforms.
[0003] Therefore, it is necessary to provide a solution that can generate elevation position data of landforms to support the rendering of three-dimensional terrain and landforms. Summary of the invention
[0004] The embodiments of the present disclosure provide a method, device, electronic device and storage medium for acquiring landform data.
[0005] In a first aspect, an embodiment of the present disclosure provides a method for acquiring landform data, comprising: Obtaining elevation position data of elevation polygons of target areas and geomorphic position data of geomorphic polygons; Determine the elevation position data of the intersection of the elevation polygon and the landform polygon based on the elevation position data of the elevation polygon and the landform position data of the landform polygon; Perform triangulation based on the elevation position data of the intersection point and the elevation position data of the elevation polygon to obtain the elevation position data of the vertices of the triangular area; Determine the triangular area included in the topographic polygon based on the topographic position data of the topographic polygon and the elevation position data of the vertices of the triangular area; Based on the topographic value of the topographic polygon, the triangular area included in the topographic polygon is assigned a topographic value to obtain three-dimensional topographic data of the topographic polygon formed by the triangular area.
[0006] In a second aspect, an embodiment of the present invention provides a device for acquiring landform data, which includes: An acquisition module is configured to acquire elevation position data of an elevation polygon of a target area and landform position data of a landform polygon; A first determination module is configured to determine the elevation position data of the intersection of the elevation polygon and the landform polygon based on the elevation position data of the elevation polygon and the landform position data of the landform polygon; A first obtaining module is configured to perform triangulation based on the elevation position data of the intersection point and the elevation position data of the elevation polygon to obtain the elevation position data of the vertices of the triangular area; A second determination module is configured to determine the triangular area included in the topographic polygon based on the topographic position data of the topographic polygon and the elevation position data of the vertices of the triangular area; The second acquisition module is configured to assign a topography value to a triangular area included in the topography polygon based on the topography value of the topography polygon, so as to obtain three-dimensional topography data of the topography polygon formed by the triangular area.
[0007] The functions can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the functions.
[0008] In one possible design, the structure of the above-mentioned device includes a memory and a processor, the memory is used to store one or more computer instructions that support the above-mentioned device to execute the above-mentioned corresponding method, and the processor is configured to execute the computer instructions stored in the memory. The above-mentioned device may also include a communication interface for the above-mentioned device to communicate with other devices or communication networks.
[0009] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the method described in any one of the above aspects.
[0010] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium for storing computer instructions used by any of the above-mentioned devices, and when the computer instructions are executed by a processor, they are used to implement the method described in any of the above-mentioned aspects.
[0011] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, which includes computer instructions, and when the computer instructions are executed by a processor, they are used to implement the method described in any of the above aspects.
[0012] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects: In this implementation, the elevation position data of the elevation polygon of the target area and the landform position data of the landform polygon are obtained, and the elevation position data of the intersection of the elevation polygon and the landform polygon are determined based on the elevation position data of the elevation polygon and the landform polygon. Triangulation is performed based on the elevation position data of the intersection and the elevation position data of the elevation polygon to obtain the elevation position data of the vertices of the triangular area, and then the triangular area included in the landform polygon is determined based on the landform position data of the landform polygon and the elevation position data of the vertices of the triangular area, and the landform value is assigned to the triangular area included in the landform polygon based on the landform value of the landform polygon. Through this technical solution, three-dimensional landform data of the triangular area constituting the landform polygon can be obtained. Since the three-dimensional landform data includes longitude and latitude data, elevation, and landform value of the landform, three-dimensional terrain and landforms can be directly rendered based on the three-dimensional landform data.
[0013] 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
[0014] Other features, objectives and advantages of the present disclosure will become more apparent through the following detailed description of non-limiting embodiments in conjunction with the accompanying drawings. In the accompanying drawings:
[0015] Figure 1 A flow chart showing a method for acquiring geomorphic data according to an embodiment of the present disclosure.
[0016] Figure 2 A schematic diagram showing the rendering effect of a three-dimensional landform according to an embodiment of the present disclosure.
[0017] Figure 3 A structural block diagram of a device for acquiring landform data according to an embodiment of the present disclosure is shown.
[0018] Figure 4 A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown.
[0019] Figure 5 It is a structural schematic diagram of a computer system suitable for implementing a method for acquiring landform data according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0020] Hereinafter, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily implement them. In addition, for the sake of clarity, parts not related to the description of the exemplary embodiments are omitted in the accompanying drawings.
[0021] In the present disclosure, it should be understood that terms such as "include" or "have" are intended to indicate the presence of features, numbers, steps, behaviors, components, parts, or a combination thereof disclosed in the specification, and do not exclude the possibility that one or more other features, numbers, steps, behaviors, components, parts, or a combination thereof exist or are added.
[0022] It should also be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0023] The user information (including but not limited to user device information such as location information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0024] The details of the embodiments of the present disclosure are described in detail below through specific examples.
[0025] Figure 1 A flow chart of a method for acquiring geomorphic data according to an embodiment of the present disclosure is shown. Figure 1 As shown, the method for obtaining the landform data includes the following steps:
[0026] In step S101, the elevation position data of the elevation polygon and the landform position data of the landform polygon of the target area are obtained; Among them, the target area can be any geographical area, and the scope of the geographical area can be set according to countries, provinces, cities, mountainous areas, sea areas, etc., and this disclosure does not impose any restrictions.
[0027] The elevation position data disclosed herein may be data measured in advance in a target area, and the elevation position data includes latitude and longitude coordinates and elevation.
[0028] The geomorphic location data disclosed in the present invention at least includes the longitude and latitude coordinates of the vertices of the geomorphic polygon. The geomorphic location data is also data that has been collected in advance. The target area may have only one geomorphic polygon or more than two geomorphic polygons. The specific number of geomorphic polygons is related to the geomorphic conditions of the actual geographical area corresponding to the target area. At the same time, in order to reflect the geomorphic conditions of the actual geographical area, the geomorphic polygons have corresponding geomorphic values. The geomorphic values of the geomorphic polygons of the same target area may be the same or different, depending on whether the geomorphic values corresponding to different geomorphic polygons in the actual geographical area are the same. Geomorphic values are used to represent geomorphology. Geomorphology can refer to various forms of the earth's surface, including but not limited to mountains, plains, basins, hills and other geomorphic forms. Geomorphic values can reflect the undulation of the terrain and are used to measure the height differences of the terrain within the region. Different geomorphic values correspond to different landforms. The specific geomorphic values corresponding to different landforms can be set according to actual needs.
[0029] In step S102, based on the elevation position data of the elevation polygon and the landform position data of the landform polygon, the elevation position data of the intersection of the elevation polygon and the landform polygon is determined; The intersection of the elevation polygon and the landform polygon refers to the intersection of the edge of the elevation polygon and the edge of the landform polygon.
[0030] As mentioned above, the elevation position data includes: longitude and latitude coordinates and elevation. Further, in the embodiment of the present disclosure, the landform position data at least includes: longitude and latitude coordinates. Step S102, i.e., the step of determining the elevation position data of the intersection of the elevation polygon and the landform polygon based on the elevation position data of the elevation polygon and the landform position data of the landform polygon, can be implemented as follows: Based on the longitude and latitude coordinates of the vertices of the elevation polygon and the longitude and latitude coordinates of the vertices of the landform polygon, determine the longitude and latitude coordinates of the intersection of the elevation polygon and the landform polygon on a longitude and latitude coordinate plane; The elevation of the intersection is determined based on the longitude and latitude coordinates of the intersection and the elevation position data of the vertices of the elevation polygon, and the longitude and latitude coordinates and the elevation of the intersection constitute the elevation position data of the intersection.
[0031] It can be understood that when it comes to coordinate calculation, the coordinate system needs to be unified. The disclosed solution assumes that the coordinate system of the longitude and latitude coordinates of the elevation polygon and the longitude and latitude coordinates of the landform polygon are the same. If in a specific implementation, there are differences in the coordinate systems of the elevation polygon and the landform polygon, in order to ensure the accuracy of the calculation, the coordinates need to be converted to the same coordinate system before calculation. The specific coordinate conversion method is selected by the technician based on the actual situation. The existing technology will not be repeated here.
[0032] Since the longitude and latitude coordinates of the vertices of the elevation polygon and the vertices of the landform polygon are known, the longitude and latitude coordinates of the intersection of the edge of the elevation polygon and the edge of the landform polygon can be obtained in the longitude and latitude coordinate plane, and the elevation of the intersection can be determined in the following manner through the longitude and latitude coordinates of the intersection and the elevation position data of the vertices of the elevation polygon. That is, based on the longitude and latitude coordinates of the intersection and the elevation position data of the vertices of the elevation polygon, the step of determining the elevation of the intersection can be implemented in the following manner: If the longitude and latitude coordinates of the intersection coincide with the longitude and latitude coordinates of the vertex of the elevation polygon, the elevation of the vertex is determined as the elevation of the intersection; that is, if the longitude and latitude coordinates of the vertex of the elevation polygon are the same as the longitude and latitude coordinates of the intersection, the elevation of the vertex is determined as the elevation of the intersection, that is, the elevation of the intersection can be directly obtained from the elevation position data; If the longitude and latitude coordinates of the intersection point do not coincide with the longitude and latitude coordinates of the vertices of the elevation polygon, the elevation of the intersection point is determined based on the elevations of the vertices of the elevation polygon surrounding the intersection point.
[0033] For example, there are three vertices around the intersection, and these three vertices may belong to the same elevation polygon or different elevation polygons. The elevation of the intersection may be the average or weighted average of the elevations of the three vertices. In some embodiments, the vertices around the intersection may be understood as vertices whose distances from the intersection meet a set condition. The set condition may be arranged from small to large in distance, and the vertices corresponding to the first N distances may be arranged, where N is a natural number, or may be vertices whose distances from the intersection are within a set distance range.
[0034] In step S103, triangulation is performed based on the elevation position data of the intersection point and the elevation position data of the elevation polygon to obtain the elevation position data of the vertices of the triangular area; In this step, the intersection points and the vertices of the elevation polygon are used as position points in the target area for triangulation to obtain triangular areas, that is, to obtain the three vertices constituting each triangular area, and the elevation position data of each vertex has been obtained.
[0035] In some embodiments, the triangular regions obtained by triangulation may be further optimized as follows, so as to remove some unreasonable triangular regions. That is, the method may further include the following steps:
[0036] Determine the distance between the vertices of the triangular area, and if the distance is less than or equal to a set distance, delete one of the two vertices, and / or delete the vertices of the triangular area that meet a preset narrow and long triangle condition; Triangulate the retained triangle region based on its vertices to obtain a new triangle region.
[0037] Among them, whether the triangular area meets the preset narrow and long triangle condition can be determined in the following way: The ratio of the side length and area of the triangular area is calculated. If the ratio corresponding to one or two sides of the triangular area is greater than the set value, it can be considered that the triangular area meets the preset narrow triangle condition, and the three vertices of the triangular area can be deleted.
[0038] After the above optimization, since the vertices of some triangular regions are deleted, some of the vertices of the retained vertices cannot form a triangular region. Therefore, the vertices of all the retained triangular regions can be triangulated again to obtain new triangular regions, that is, to obtain the vertices that constitute the new triangular regions. If there are no unreasonable triangular regions in the new triangular regions, the new triangular regions are taken as the object of step S104. If there are still unreasonable triangular regions, the above optimization steps can be repeated until all the triangular regions obtained by triangulation are reasonable, and then step S104 is entered. If the triangular regions obtained in step S103 are all reasonable, step S104 can be directly entered.
[0039] In step S104, based on the topographic position data of the topographic polygon and the elevation position data of the vertices of the triangular area, the triangular area included in the topographic polygon is determined; In some embodiments, step S104, i.e., the step of determining the triangular area included in the topographic polygon based on the topographic position data of the topographic polygon and the elevation position data of the vertices of the triangular area, can be implemented as follows: If the longitude and latitude coordinates of the three vertices of the triangular area fall within the coordinate range formed by the longitude and latitude coordinates of the vertices of the same landform polygon, the triangular area is regarded as the triangular area included in the landform polygon; If the longitude and latitude coordinates of the three vertices of the triangular area fall within the coordinate range formed by the longitude and latitude coordinates of the vertices of more than two landform polygons, the area covered by the triangular area of the corresponding landform polygon is determined, and the triangular area is taken as the triangular area included in the landform polygon with the largest coverage area.
[0040] Among them, the longitude and latitude coordinates of the three vertices of the triangular area fall within the coordinate range formed by the longitude and latitude coordinates of the vertices of the same landform polygon, which can be understood as the vertices of the triangular area are within the coordinate range formed by the longitude and latitude coordinates of the vertices of the landform polygon, or fall on the edge formed by any two adjacent vertices of the landform polygon.
[0041] It should be noted that if the aforementioned steps of optimizing the triangular area and eliminating some unreasonable triangular areas are not performed, when all the landform polygons fully cover the target area, the longitude and latitude coordinates of the three vertices of each triangular area will usually fall within the coordinate range formed by the longitude and latitude coordinates of the vertices of the same landform polygon. At this time, the triangular area can be regarded as the triangular area included in the landform polygon in which it falls. After the optimization as described above, if the vertices of the eliminated narrow triangular area are the intersections of the elevation polygon and the landform polygon, it will cause the new triangular area obtained by triangulation based on the retained vertices to not completely fall into the same landform polygon. That is, the longitude and latitude coordinates of the three vertices of the same triangular area may fall into the coordinate range formed by the longitude and latitude coordinates of the vertices of different landform polygons. For this case, as mentioned above, it is necessary to determine the area of the corresponding landform polygon covered by the triangular area, and take the triangular area as the triangular area included in the landform polygon with the largest coverage area. For example, if the vertices of a triangular area fall into two landform polygons respectively, it is necessary to calculate the area covered by the triangular area and the two landform polygons, that is, the area of the intersection of the triangular area and the two landform polygons respectively, and take the landform polygon with the larger area as the landform polygon containing the triangular area.
[0042] In step S105, based on the landform value of the landform polygon, a landform value is assigned to the triangular area included in the landform polygon to obtain three-dimensional landform data of the landform polygon formed by the triangular area.
[0043] Among them, the geomorphic values of all position points within the same geomorphic polygon are the same, and the geomorphic value is a known quantity in the geomorphic position data. Therefore, the triangular area included in the geomorphic polygon can be assigned the geomorphic value corresponding to the geomorphic polygon. It should be noted that in order to improve the calculation efficiency, if the geomorphic values of adjacent geomorphic polygons are the same, then before executing step S104 or step S105, the adjacent geomorphic polygons with the same geomorphic values can be merged into one geomorphic polygon to improve the efficiency of determining the triangular area included in the geomorphic polygon or the assignment of geomorphic values.
[0044] The above is the method for acquiring landform data proposed in the present disclosure, which acquires the elevation position data of the elevation polygon of the target area and the landform position data of the landform polygon, determines the elevation position data of the intersection of the elevation polygon and the landform polygon based on the elevation position data of the elevation polygon and the landform polygon, performs triangulation based on the elevation position data of the intersection and the elevation position data of the elevation polygon, obtains the elevation position data of the vertices of the triangular area, and then determines the triangular area included in the landform polygon based on the landform position data of the landform polygon and the elevation position data of the vertices of the triangular area, and assigns a landform value to the triangular area included in the landform polygon based on the landform value of the landform polygon. Through this technical solution, three-dimensional landform data of the triangular area constituting the target area can be obtained. Since the three-dimensional landform data includes longitude and latitude data, elevation and landform values, the three-dimensional topography of the target area can be directly rendered based on the three-dimensional landform data. Figure 2 As shown, it is a schematic diagram of rendering three-dimensional terrain based on the three-dimensional terrain data of the triangular area generated by the present invention. When rendering, the triangular area can be rendered into a color corresponding to the terrain value based on the terrain value of the triangular area. For example, if the terrain value indicates that the triangular area is a mountain, the color of the triangular area can be rendered into a color that allows the user to see that the area is a mountain. Moreover, since the longitude and latitude data and the elevation of the triangular area are known, the undulating shape of the corresponding area can be rendered in combination with the elevation when rendering the terrain, thereby obtaining a display effect of the three-dimensional terrain, so that the terrain seen by the user is closer to the actual situation of the corresponding area in the real world.
[0045] In addition, since the triangular area of the target area in this scheme is obtained by triangulating the intersection points between the edges of the elevation polygon and the landform polygon and the vertices of the elevation polygon as triangle vertices, when the landform polygon covers the entire target area, the triangular area is either covered by the same landform polygon, or the triangular area belongs to a landform polygon with the largest intersection area. This ensures that the landform value based on the existing landform polygon can give the triangular area a more accurate landform value, so that the three-dimensional landform data of the triangular area can accurately restore the topography of the target area.
[0046] The above is an embodiment of a method for acquiring landform data provided by an embodiment of the present disclosure. In the above embodiment, the elevation polygon is obtained in advance based on original data processing, and the original data may be the elevation position data of the collection point of the target area. In another embodiment of the present disclosure, if the data of the target area is original data provided according to the elevation position data of the collection point, then when the elevation polygon is an elevation triangle, the above method further includes: Obtain the elevation position data of the collection points in the target area. One collection point corresponds to one elevation position data, and one elevation position data includes latitude and longitude coordinates and elevation; Triangulation is performed based on the elevation position data of the acquisition points to obtain three-dimensional position data of vertices of the elevation triangle of the target area.
[0047] Among them, the elevation position data of the collection points in the target area can be collected and produced by a known data collection method, or can be obtained from existing data. In this optional implementation, the target area can be triangulated by taking the above-mentioned collection points as the vertices of the triangular area, thereby obtaining the collection points as the vertices of the elevation triangle, and the elevation position data of the three collection points that constitute the same elevation triangle are saved as the elevation position data of the elevation triangle. Similarly, the landform polygon disclosed in the present invention can also be a landform triangle, and the landform triangle can also be obtained in advance based on the landform original data processing, the landform original data includes the landform position data of each landform sampling point in the target area, and the landform position data includes: longitude and latitude data and landform values.
[0048] The above are method embodiments provided by the present disclosure, and the following are device embodiments of the present disclosure, which can be used to execute the method embodiments of the present disclosure.
[0049] Figure 3 The structure block diagram of the device for acquiring landform data according to one embodiment of the present disclosure is shown. The device can be implemented as part or all of an electronic device through software, hardware, or a combination of both. Figure 3 As shown, the device for acquiring the landform data includes:
[0050] An acquisition module 301 is configured to acquire elevation position data of an elevation polygon of a target area and landform position data of a landform polygon; Among them, the target area can be any geographical area, and the scope of the geographical area can be set according to countries, provinces, cities, mountainous areas, sea areas, etc., and this disclosure does not impose any restrictions.
[0051] The elevation position data disclosed herein may be data measured in advance in a target area, and the elevation position data includes latitude and longitude coordinates and elevation.
[0052] The geomorphic location data disclosed in the present invention at least includes the longitude and latitude coordinates of the vertices of the geomorphic polygon. The geomorphic location data is also data that has been collected in advance. The target area may have only one geomorphic polygon or more than two geomorphic polygons. The specific number of geomorphic polygons is related to the geomorphic conditions of the actual geographical area corresponding to the target area. At the same time, in order to reflect the geomorphic conditions of the actual geographical area, the geomorphic polygons have corresponding geomorphic values. The geomorphic values of the geomorphic polygons of the same target area may be the same or different, depending on whether the geomorphic values corresponding to different geomorphic polygons in the actual geographical area are the same. Geomorphic values are used to represent geomorphology. Geomorphology can refer to various forms of the earth's surface, including but not limited to mountains, plains, basins, hills and other geomorphic forms. Geomorphic values can reflect the undulation of the terrain and are used to measure the height differences of the terrain within the region. Different geomorphic values correspond to different landforms. The specific geomorphic values corresponding to different landforms can be set according to actual needs.
[0053] A first determination module 302 is configured to determine the elevation position data of the intersection of the elevation polygon and the landform polygon based on the elevation position data of the elevation polygon and the landform position data of the landform polygon; The intersection of the elevation polygon and the landform polygon refers to the intersection of the edge of the elevation polygon and the edge of the landform polygon.
[0054] As mentioned above, the elevation position data includes: longitude and latitude coordinates and elevation. Further, in the embodiment of the present disclosure, the landform position data at least includes: longitude and latitude coordinates. The first determination module can be implemented as follows: Based on the longitude and latitude coordinates of the vertices of the elevation polygon and the longitude and latitude coordinates of the vertices of the landform polygon, determine the longitude and latitude coordinates of the intersection of the elevation polygon and the landform polygon on a longitude and latitude coordinate plane; The elevation of the intersection is determined based on the longitude and latitude coordinates of the intersection and the elevation position data of the vertices of the elevation polygon, and the longitude and latitude coordinates and the elevation of the intersection constitute the elevation position data of the intersection.
[0055] It can be understood that when it comes to coordinate calculation, the coordinate system needs to be unified. The disclosed solution assumes that the coordinate system of the longitude and latitude coordinates of the elevation polygon and the longitude and latitude coordinates of the landform polygon are the same. If in a specific implementation, there are differences in the coordinate systems of the elevation polygon and the landform polygon, in order to ensure the accuracy of the calculation, the coordinates need to be converted to the same coordinate system before calculation. The specific coordinate conversion method is selected by the technician based on the actual situation. The existing technology will not be repeated here.
[0056] Since the longitude and latitude coordinates of the vertices of the elevation polygon and the vertices of the landform polygon are known, the longitude and latitude coordinates of the intersection of the edge of the elevation polygon and the edge of the landform polygon can be obtained in the longitude and latitude coordinate plane, and the elevation of the intersection can be determined by the longitude and latitude coordinates of the intersection and the elevation position data of the vertices of the elevation polygon in the following manner, that is, based on the longitude and latitude coordinates of the intersection and the elevation position data of the vertices of the elevation polygon, the elevation of the intersection can be determined in the following manner: If the longitude and latitude coordinates of the intersection coincide with the longitude and latitude coordinates of the vertex of the elevation polygon, the elevation of the vertex is determined as the elevation of the intersection; that is, if the longitude and latitude coordinates of the vertex of the elevation polygon are the same as the longitude and latitude coordinates of the intersection, the elevation of the vertex is determined as the elevation of the intersection, that is, the elevation of the intersection can be directly obtained from the elevation position data; If the longitude and latitude coordinates of the intersection point do not coincide with the longitude and latitude coordinates of the vertices of the elevation polygon, the elevation of the intersection point is determined based on the elevations of the vertices of the elevation polygon surrounding the intersection point.
[0057] For example, there are three vertices around the intersection, and these three vertices may belong to the same elevation polygon or different elevation polygons. The elevation of the intersection may be the average or weighted average of the elevations of the three vertices. In some embodiments, the vertices around the intersection may be understood as vertices whose distances from the intersection meet a set condition. The set condition may be arranged from small to large in distance, and the vertices corresponding to the first N distances may be arranged, where N is a natural number, or may be vertices whose distances from the intersection are within a set distance range.
[0058] A first obtaining module is configured to perform triangulation based on the elevation position data of the intersection point and the elevation position data of the elevation polygon to obtain the elevation position data of the vertices of the triangular area; In the first acquisition module, the intersection points and the vertices of the elevation polygon are used as position points in the target area for triangulation to obtain triangular areas, that is, to obtain the three vertices constituting each triangular area, and the elevation position data of each vertex has been obtained.
[0059] In some embodiments, the triangular regions obtained by triangulation may be further optimized as follows to eliminate some unreasonable triangular regions. That is, the device may also include:
[0060] A culling module is configured to determine the distance between the vertices of the triangular area, and if the distance is less than or equal to a set distance, delete one of the two vertices, and / or delete the vertices of the triangular area that meet a preset narrow and long triangle condition; The first triangulation module is configured to perform triangulation based on the vertices of the retained triangular region to obtain a new triangular region.
[0061] Among them, whether the triangular area meets the preset narrow and long triangle condition can be determined in the following way: The ratio of the side length and area of the triangular area is calculated. If the ratio corresponding to one or two sides of the triangular area is greater than the set value, it can be considered that the triangular area meets the preset narrow triangle condition, and the three vertices of the triangular area can be deleted.
[0062] After the above optimization, since some vertices of the triangular area are deleted, some of the vertices of the retained vertices cannot form a triangular area. Therefore, all the vertices of the retained triangular area can be triangulated again to obtain a new triangular area, that is, to obtain the vertices that constitute the new triangular area. If there is no unreasonable triangular area in the new triangular area, the new triangular area will be used as the object to be processed by the second determination module. If there is still an unreasonable triangular area, the above optimization process can be repeated until all the triangular areas obtained by triangulation are reasonable, and then enter the second determination module. If the triangular areas obtained by the first acquisition module are all reasonable, the second determination module can be directly entered.
[0063] A second determination module is configured to determine the triangular area included in the topographic polygon based on the topographic position data of the topographic polygon and the elevation position data of the vertices of the triangular area; In some embodiments, the second determination module may be implemented as follows: If the longitude and latitude coordinates of the three vertices of the triangular area fall within the coordinate range formed by the longitude and latitude coordinates of the vertices of the same landform polygon, the triangular area is regarded as the triangular area included in the landform polygon; If the longitude and latitude coordinates of the three vertices of the triangular area fall within the coordinate range formed by the longitude and latitude coordinates of the vertices of more than two landform polygons, the area covered by the triangular area of the corresponding landform polygon is determined, and the triangular area is taken as the triangular area included in the landform polygon with the largest coverage area.
[0064] Among them, the longitude and latitude coordinates of the three vertices of the triangular area fall within the coordinate range formed by the longitude and latitude coordinates of the vertices of the same landform polygon, which can be understood as the vertices of the triangular area are within the coordinate range formed by the longitude and latitude coordinates of the vertices of the landform polygon, or fall on the edge formed by any two adjacent vertices of the landform polygon.
[0065] It should be noted that if the aforementioned process of optimizing the triangular area and eliminating some unreasonable triangular areas is not performed, when all the landform polygons fully cover the target area, the longitude and latitude coordinates of the three vertices of each triangular area will usually fall within the coordinate range formed by the longitude and latitude coordinates of the vertices of the same landform polygon. At this time, the triangular area can be regarded as the triangular area included in the landform polygon it falls into.
[0066] After the optimization as described above, if the vertices of the eliminated narrow and long triangular areas are the intersections of the elevation polygon and the landform polygon, it will cause the new triangular areas obtained by triangulation based on the retained vertices to not completely fall into the same landform polygon, that is, the longitude and latitude coordinates of the three vertices of the same triangular area may fall into the coordinate range formed by the longitude and latitude coordinates of the vertices of different landform polygons. For this case, as mentioned above, it is necessary to determine the area of the corresponding landform polygon covered by the triangular area, and take the triangular area as the triangular area included in the landform polygon with the largest coverage area. For example, if the vertices of a triangular area fall into two landform polygons respectively, it is necessary to calculate the area of the triangular area covering the two landform polygons, that is, the area of the intersection of the triangular area and the two landform polygons, and take the landform polygon with the larger area as the landform polygon containing the triangular area.
[0067] The second acquisition module is configured to assign a topography value to a triangular area included in the topography polygon based on the topography value of the topography polygon, so as to obtain three-dimensional topography data of the topography polygon formed by the triangular area.
[0068] Among them, the geomorphic values of all position points within the same geomorphic polygon are the same, and the geomorphic value is a known quantity in the geomorphic position data. Therefore, the triangular area included in the geomorphic polygon can be assigned the geomorphic value corresponding to the geomorphic polygon. It should be noted that in order to improve the calculation efficiency, if the geomorphic values of adjacent geomorphic polygons are the same, the adjacent geomorphic polygons with the same geomorphic values can be merged into one geomorphic polygon, and then the second determination module or the second acquisition module is triggered to execute the corresponding steps to improve the efficiency of determining the triangular area included in the geomorphic polygon or the assignment of geomorphic values.
[0069] The above is the device for acquiring topographic data proposed in the present disclosure, which acquires the elevation position data of the elevation polygon of the target area and the topographic position data of the topographic polygon, determines the elevation position data of the intersection of the elevation polygon and the topographic polygon based on the elevation position data of the elevation polygon and the topographic position data of the topographic polygon, performs triangulation based on the elevation position data of the intersection and the elevation position data of the elevation polygon, obtains the elevation position data of the vertices of the triangular area, and then determines the triangular area included in the topographic polygon based on the topographic position data of the topographic polygon and the elevation position data of the vertices of the triangular area, and assigns a topographic value to the triangular area included in the topographic polygon based on the topographic value of the topographic polygon. Through this device, the three-dimensional topographic data of the triangular area constituting the target area can be obtained. Since the three-dimensional topographic data includes longitude and latitude data, elevation and topographic values, the three-dimensional topography of the target area can be directly rendered based on the three-dimensional topographic data. Figure 2 As shown, it is a schematic diagram of rendering three-dimensional terrain based on the three-dimensional terrain data of the triangular area generated by the present invention. When rendering, the triangular area can be rendered into a color corresponding to the terrain value based on the terrain value of the triangular area. For example, if the terrain value indicates that the triangular area is a mountain, the color of the triangular area can be rendered into a color that allows the user to see that the area is a mountain. Moreover, since the longitude and latitude data and the elevation of the triangular area are known, the undulating shape of the corresponding area can be rendered in combination with the elevation when rendering the terrain, thereby obtaining a display effect of the three-dimensional terrain, so that the terrain seen by the user is closer to the actual situation of the corresponding area in the real world.
[0070] In addition, since the triangular area of the target area in this scheme is obtained by triangulating the intersection points between the edges of the elevation polygon and the landform polygon and the vertices of the elevation polygon as triangle vertices, when the landform polygon covers the entire target area, the triangular area is either covered by the same landform polygon, or the triangular area belongs to a landform polygon with the largest intersection area. This ensures that the landform value based on the existing landform polygon can give the triangular area a more accurate landform value, so that the three-dimensional landform data of the triangular area can accurately restore the topography of the target area.
[0071] The above is an embodiment of the device for acquiring landform data provided by the embodiment of the present disclosure. In the above embodiment, the elevation polygon is obtained in advance based on the original data processing, and the original data is the elevation position data of the collection point of the target area. In another embodiment of the present disclosure, if the target area is the original data provided according to the elevation position data of the collection point, then when the elevation polygon is an elevation triangle, the above device further includes: A data acquisition module is configured to acquire elevation position data of a collection point in a target area, wherein one collection point corresponds to one elevation position data, and one elevation position data includes latitude and longitude coordinates and elevation; The second triangulation module is configured to perform triangulation based on the elevation position data of the acquisition point to obtain three-dimensional position data of vertices of the elevation triangle of the target area.
[0072] Among them, the elevation position data of the collection points in the target area can be collected and produced by a known data collection method, or can be obtained from existing data. In this optional implementation, the target area can be triangulated by taking the above-mentioned collection points as the vertices of the triangular area, thereby obtaining the collection points as the vertices of the elevation triangle, and the elevation position data of the three collection points that constitute the same elevation triangle are saved as the elevation position data of the elevation triangle. Similarly, the landform polygon disclosed in the present invention can also be a landform triangle, and the landform triangle can also be obtained in advance based on the landform original data processing, the landform original data includes the landform position data of each landform sampling point in the target area, and the landform position data includes: longitude and latitude data and landform values.
[0073] The present disclosure also discloses an electronic device, Figure 4 A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown. Figure 4 As shown, the electronic device 400 includes a memory 401 and a processor 402; wherein, The memory 401 is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor 402 to implement the above method steps.
[0074] Figure 5 It is a structural schematic diagram of a computer system suitable for implementing a method for acquiring landform data according to an embodiment of the present disclosure.
[0075] like Figure 5 As shown, the computer system 500 includes a processing unit 501, which can be implemented as a processing unit such as a CPU, a GPU, an FPGA, and an NPU. The processing unit 501 can perform various processes in the embodiments of any of the above methods of the present disclosure according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage part 508 to a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the computer system 500 are also stored. The processing unit 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0076] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that a computer program read therefrom is installed into the storage section 508 as needed.
[0077] In particular, according to an embodiment of the present disclosure, any method in the above referenced embodiment of the present disclosure may be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program tangibly contained on a machine-readable medium, and the computer program includes a program code for executing any method in the embodiment of the present disclosure. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 509, and / or installed from a removable medium 511.
[0078] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0079] The units or modules involved in the embodiments described in the present disclosure may be implemented by software or hardware. The units or modules described may also be set in a processor, and the names of these units or modules do not constitute limitations on the units or modules themselves in some cases.
[0080] As another aspect, the present disclosure further provides a computer-readable storage medium, which may be a computer-readable storage medium included in the device described in the above embodiment; or a computer-readable storage medium that exists independently and is not assembled into the device. The computer-readable storage medium stores one or more programs, and the programs are used by one or more processors to execute the method described in the present disclosure.
[0081] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present disclosure is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the inventive concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other.
Claims
1. A method for acquiring landform data, wherein: include: Obtaining elevation position data of elevation polygons of target areas and geomorphic position data of geomorphic polygons; Determine the elevation position data of the intersection of the elevation polygon and the landform polygon based on the elevation position data of the elevation polygon and the landform position data of the landform polygon; Perform triangulation based on the elevation position data of the intersection point and the elevation position data of the elevation polygon to obtain the elevation position data of the vertices of the triangular area; Determine the triangular area included in the topographic polygon based on the topographic position data of the topographic polygon and the elevation position data of the vertices of the triangular area; Based on the topographic value of the topographic polygon, the triangular area included in the topographic polygon is assigned a topographic value to obtain three-dimensional topographic data of the topographic polygon formed by the triangular area.
2. The method according to claim 1, wherein: The elevation position data includes: longitude and latitude coordinates and elevation, the landform position data includes at least: longitude and latitude coordinates, and the elevation position data of the intersection of the elevation polygon and the landform polygon is determined based on the elevation position data of the elevation polygon and the landform position data of the landform polygon, including: Based on the longitude and latitude coordinates of the vertices of the elevation polygon and the longitude and latitude coordinates of the vertices of the landform polygon, determine the longitude and latitude coordinates of the intersection of the elevation polygon and the landform polygon on a longitude and latitude coordinate plane; The elevation of the intersection is determined based on the longitude and latitude coordinates of the intersection and the elevation position data of the vertices of the elevation polygon, and the longitude and latitude coordinates and the elevation of the intersection constitute the elevation position data of the intersection.
3. The method according to claim 2, wherein: Determining the elevation of the intersection based on the latitude and longitude coordinates of the intersection and the elevation position data of the vertices of the elevation polygon includes: If the longitude and latitude coordinates of the intersection coincide with the longitude and latitude coordinates of the vertex of the elevation polygon, the elevation of the vertex is determined as the elevation of the intersection; If the longitude and latitude coordinates of the intersection point do not coincide with the longitude and latitude coordinates of the vertices of the elevation polygon, the elevation of the intersection point is determined based on the elevations of the vertices of the elevation polygon surrounding the intersection point.
4. The method according to any one of claims 1 to 3, wherein: Before determining the triangular area included in the landform polygon, the method further includes: Determine the distance between the vertices of the triangular area, and if the distance is less than or equal to a set distance, delete one of the two vertices, and / or delete the vertices of the triangular area that meet a preset narrow and long triangle condition; Triangulate the retained triangle region based on its vertices to obtain a new triangle region.
5. The method according to claim 4, wherein: Determining the triangular area included in the topographic polygon based on the topographic position data of the topographic polygon and the elevation position data of the vertices of the triangular area comprises: If the longitude and latitude coordinates of the three vertices of the triangular area fall within the coordinate range formed by the longitude and latitude coordinates of the vertices of the same landform polygon, the triangular area is regarded as the triangular area included in the landform polygon; If the longitude and latitude coordinates of the three vertices of the triangular area fall within the coordinate range formed by the longitude and latitude coordinates of the vertices of more than two landform polygons, the area covered by the triangular area of the corresponding landform polygon is determined, and the triangular area is taken as the triangular area included in the landform polygon with the largest coverage area.
6. The method according to any one of claims 1 to 3, wherein: The elevation polygon is an elevation triangle, the method further comprises: Obtain the elevation position data of the collection points in the target area. One collection point corresponds to one elevation position data, and one elevation position data includes latitude and longitude coordinates and elevation; Triangulation is performed based on the elevation position data of the acquisition points to obtain three-dimensional position data of vertices of the elevation triangle of the target area.
7. A device for acquiring landform data, wherein: include: An acquisition module is configured to acquire elevation position data of an elevation polygon of a target area and landform position data of a landform polygon; A first determination module is configured to determine the elevation position data of the intersection of the elevation polygon and the landform polygon based on the elevation position data of the elevation polygon and the landform position data of the landform polygon; A first obtaining module is configured to perform triangulation based on the elevation position data of the intersection point and the elevation position data of the elevation polygon to obtain the elevation position data of the vertices of the triangular area; A second determination module is configured to determine the triangular area included in the topographic polygon based on the topographic position data of the topographic polygon and the elevation position data of the vertices of the triangular area; The second acquisition module is configured to assign a topography value to a triangular area included in the topography polygon based on the topography value of the topography polygon, so as to obtain three-dimensional topography data of the topography polygon formed by the triangular area.
8. The device according to claim 7, wherein: The elevation position data includes: longitude and latitude coordinates and elevation, the landform position data at least includes: longitude and latitude coordinates, and the first determination module is implemented as follows: Based on the longitude and latitude coordinates of the vertices of the elevation polygon and the longitude and latitude coordinates of the vertices of the landform polygon, determine the longitude and latitude coordinates of the intersection of the elevation polygon and the landform polygon on a longitude and latitude coordinate plane; The elevation of the intersection is determined based on the longitude and latitude coordinates of the intersection and the elevation position data of the vertices of the elevation polygon, and the longitude and latitude coordinates and the elevation of the intersection constitute the elevation position data of the intersection.
9. An electronic device, wherein: The method comprises a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the method according to any one of claims 1 to 6.
10. A computer-readable storage medium having computer instructions stored thereon, wherein: When the computer instructions are executed by a processor, the method according to any one of claims 1 to 6 is implemented.