CN114528305A - Vector data updating range determining method and device, electronic equipment and storage medium - Google Patents

Vector data updating range determining method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114528305A
CN114528305A CN202210166188.1A CN202210166188A CN114528305A CN 114528305 A CN114528305 A CN 114528305A CN 202210166188 A CN202210166188 A CN 202210166188A CN 114528305 A CN114528305 A CN 114528305A
Authority
CN
China
Prior art keywords
vector data
map
map vector
target
target map
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210166188.1A
Other languages
Chinese (zh)
Inventor
丁磊
张红平
唐德瑾
黄蔚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NATIONAL GEOMATICS CENTER OF CHINA
Original Assignee
NATIONAL GEOMATICS CENTER OF CHINA
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NATIONAL GEOMATICS CENTER OF CHINA filed Critical NATIONAL GEOMATICS CENTER OF CHINA
Priority to CN202210166188.1A priority Critical patent/CN114528305A/en
Publication of CN114528305A publication Critical patent/CN114528305A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A40/00Adaptation technologies in agriculture, forestry, livestock or agroalimentary production
    • Y02A40/10Adaptation technologies in agriculture, forestry, livestock or agroalimentary production in agriculture

Abstract

The application provides a method, a device, an electronic device and a storage medium for determining a vector data updating range, wherein the method comprises the following steps: acquiring a map updating data packet containing a target map; the target map comprises a plurality of first map vector data; clustering the first map vector data according to the preset distance and the distance between the first map vector data to obtain a plurality of map vector data sets; a target map vector data exists in the map vector data set, and the distance between the other first map vector data and the target map vector data is smaller than a preset distance; and determining the boundary of the map vector data set according to the position of each first map vector data in the map vector data set on the target map, and taking the area surrounded by the boundary as one of the updating ranges on the target map. The method is beneficial to improving the efficiency of determining the updating range and the accuracy of the updating range.

Description

Vector data updating range determining method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for determining an update range of vector data, an electronic device, and a storage medium.
Background
In recent years, with the rapid development of Information technology, spatial data, particularly vector data, has been increasingly enriched, and mapping techniques represented by a Geographic Information System (GIS) are widely used in various fields such as natural resource management, homeland space planning, smart cities, smart agriculture, and smart travel. The high-precision and large-coverage ultra-large amount of vector data is increased explosively. Vector data is an important data type, and point-like, line-like, and planar elements are expressed by three element types of points, lines, and polygons, so that high-definition display, infinite scaling, real-time rendering, and the like are supported.
When updating large-scale vector data, a long traversal process is needed if the data is deleted and inserted in a mode of traversing elements. Based on the spatial characteristics of vector data, in the face of the requirement of fast update of large-scale multi-batch vector data, updating the data according to range increment is a convenient and efficient vector data updating method, data deletion and data insertion according to the range can avoid complete traversal, and data updating efficiency is greatly improved.
In the prior art, the method for determining the updating range is mainly to determine through manual visual judgment and manually define the updating range, and the method is easy to cause low efficiency of defining the updating range and is not suitable for large-scale defining the updating range; moreover, manually defining the update range also easily results in data omission. Finally, if the division range is arbitrarily expanded by the staff according to the subjectivity in order to avoid data omission, the accuracy of the divided update range is low, and the update efficiency of the vector data is easily affected.
Disclosure of Invention
In view of the above, an object of the present application is to provide a method, an apparatus, an electronic device and a storage medium for determining an update range of vector data, so as to improve the efficiency of determining the update range and improve the accuracy of the update range.
In a first aspect, an embodiment of the present application provides a method for determining an update range of vector data, including:
acquiring a map updating data packet containing a target map; the target map comprises a plurality of first map vector data, and the first map vector data are respectively positioned at different positions on the target map;
clustering the first map vector data according to a preset distance and the distance between the first map vector data on the target map to obtain a plurality of map vector data sets; a target map vector data exists in the map vector data set, and the distance between other first map vector data in the map vector data set and the target map vector data is smaller than the preset distance;
and for each map vector data set, determining the boundary of the map vector data set according to the position of each first map vector data in the map vector data set on the target map, and taking the area surrounded by the boundary as one of the updating ranges on the target map.
With reference to the first aspect, an embodiment of the present application provides a first possible implementation manner of the first aspect, where the target map corresponds to a target map to be updated in a map to be updated, and the map update data packet is used to update the target map to be updated; after obtaining each of the update ranges on the target map, the method further includes:
deleting second map vector data in the target range on the target map to be updated from the map to be updated according to the position of the updating range on the target map; the position of the target range on the target map to be updated is the same as the position of the update range on the target map;
inserting the first map vector data in the updating range into the target range on the target map to be updated so as to update the target map to be updated.
With reference to the first aspect, an embodiment of the present application provides a second possible implementation manner of the first aspect, where the clustering the first map vector data according to a preset distance and a distance between the first map vector data on the target map includes:
the method comprises the following steps: determining the coordinates of the central point of each first map vector data on the target map;
step two: selecting one target map vector data from the first non-clustered map vector data, and calculating the distance between the center point of the target map vector data and the center points of the other non-clustered first map vector data according to the center point coordinates of each first map vector data;
step three: forming the target map vector data and the third map vector data into a map vector data set; the third map vector data is a part of the first map vector data in the first map vector data which are not clustered; the distance between the central point of the third map vector data and the central point of the target map vector data is smaller than the preset distance;
step four: and repeating the second step to the third step until the first map vector data are clustered.
With reference to the second possible implementation manner of the first aspect, an embodiment of the present application provides a third possible implementation manner of the first aspect, where the first map vector data includes one or more of point element data, line element data, and surface element data; a target coordinate system is pre-established on the target map; the center point coordinate of the first map vector data is located in the target coordinate system;
the determining the center point coordinates of each first map vector data on the target map includes:
when the first map vector data is the point element data, determining the position coordinates of the point element data as the coordinates of the center point of the first map vector data;
when the first map vector data is the line element data or the surface element data, determining a first outsourcing rectangular area of the first map vector data, and determining the coordinate of the center position of the first outsourcing rectangular area as the coordinate of the center point of the first map vector data; the horizontal direction and the vertical direction of the first outsourcing rectangular area are respectively the same as the horizontal direction and the vertical direction of the target coordinate system.
With reference to the third possible implementation manner of the first aspect, this application provides a fourth possible implementation manner of the first aspect, where, for each map vector data set, determining a boundary of the map vector data set according to a position of each first map vector data in the map vector data set on the target map, and taking an area surrounded by the boundary as one of the update ranges on the target map, the method includes:
for each map vector data set, determining a second outsourcing rectangular area of the map vector data set according to the position of the first outsourcing rectangular area of each first map vector data in the map vector data set on the target map; the horizontal direction and the vertical direction of the second outer rectangular area are respectively the same as the horizontal direction and the vertical direction of the target coordinate system;
and regarding each second outer rectangular area as one of the updating ranges on the target map.
In a second aspect, an embodiment of the present application further provides a vector data update range determining apparatus, including:
the acquisition module is used for acquiring a map updating data packet containing a target map; the target map comprises a plurality of first map vector data, and the first map vector data are respectively positioned at different positions on the target map;
the clustering module is used for clustering the first map vector data according to a preset distance and the distance between the first map vector data on the target map to obtain a plurality of map vector data sets; a target map vector data exists in the map vector data set, and the distance between other first map vector data in the map vector data set and the target map vector data is smaller than the preset distance;
and the determining module is used for determining the boundary of each map vector data set according to the position of each first map vector data in the map vector data set on the target map, and taking the area surrounded by the boundary as one of the updating ranges on the target map.
With reference to the second aspect, an embodiment of the present application provides a first possible implementation manner of the second aspect, where the target map corresponds to a target map to be updated in a map to be updated, and the map update data packet is used to update the target map to be updated; after the determining module is configured to obtain each of the update ranges on the target map, the apparatus further includes:
the deleting module is used for deleting the second map vector data in the target range on the target map to be updated from the map to be updated according to the position of the updating range on the target map; the position of the target range on the target map to be updated is the same as the position of the update range on the target map;
an inserting module, configured to insert the first map vector data in the update range into the target range on the target map to be updated, so as to update the target map to be updated.
With reference to the second aspect, an embodiment of the present application provides a second possible implementation manner of the second aspect, where the clustering module, when being configured to cluster the first map vector data according to a preset distance and a distance between the first map vector data on the target map, is specifically configured to:
determining the coordinates of the central point of each first map vector data on the target map;
selecting one target map vector data from the first non-clustered map vector data, and calculating the distance between the center point of the target map vector data and the center points of the other non-clustered first map vector data according to the center point coordinates of each first map vector data;
forming the target map vector data and the third map vector data into a map vector data set; the third map vector data is a part of the first map vector data in the first map vector data which are not clustered; the distance between the central point of the third map vector data and the central point of the target map vector data is smaller than the preset distance;
repeatedly executing the step of selecting one target map vector data from the first non-clustered map vector data, and calculating the distance between the center point of the target map vector data and the center points of the other non-clustered first map vector data according to the center point coordinates of each first map vector data; forming the target map vector data and the third map vector data into a map vector data set; the third map vector data is a part of the first map vector data in the first map vector data which are not clustered; and the distance between the central point of the third map vector data and the central point of the target map vector data is smaller than the preset distance until the first map vector data are clustered.
With reference to the second possible implementation manner of the second aspect, the present application provides a third possible implementation manner of the second aspect, where the first map vector data includes one or more of point element data, line element data, and surface element data; a target coordinate system is pre-established on the target map; the center point coordinate of the first map vector data is located in the target coordinate system;
when the clustering module is configured to determine the center point coordinates of each first map vector data on the target map, the clustering module is specifically configured to:
when the first map vector data is the point element data, determining the position coordinates of the point element data as the coordinates of the center point of the first map vector data;
when the first map vector data is the line element data or the surface element data, determining a first outsourcing rectangular area of the first map vector data, and determining the coordinate of the center position of the first outsourcing rectangular area as the coordinate of the center point of the first map vector data; the horizontal direction and the vertical direction of the first outsourcing rectangular area are respectively the same as the horizontal direction and the vertical direction of the target coordinate system.
With reference to the third possible implementation manner of the second aspect, an embodiment of the present application provides a fourth possible implementation manner of the second aspect, where the determining module, when configured to determine, for each map vector data set, a boundary of the map vector data set according to a position of each first map vector data in the map vector data set on the target map, and use an area surrounded by the boundary as one of the update ranges on the target map, is specifically configured to:
for each map vector data set, determining a second outsourcing rectangular area of the map vector data set according to the position of the first outsourcing rectangular area of each first map vector data in the map vector data set on the target map; the horizontal direction and the vertical direction of the second outer rectangular area are respectively the same as the horizontal direction and the vertical direction of the target coordinate system;
and regarding each second outer rectangular area as one of the updating ranges on the target map.
In a third aspect, an embodiment of the present application further provides an electronic device, including: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating via the bus when the electronic device is running, the machine-readable instructions being executable by the processor to perform the steps of any one of the possible implementations of the first aspect.
In a fourth aspect, this application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and the computer program is executed by a processor to perform the steps in any one of the possible implementation manners of the first aspect.
According to the method, the device, the electronic equipment and the storage medium for determining the update range of the vector data, the first map vector data are clustered according to the preset distance and the distance between the first map vector data on the target map, and all the first map vector data are clustered into a plurality of map vector data sets; the method comprises the steps that target map vector data exist in a map vector data set, and the distance between other first map vector data in the map vector data set and the target map vector data is smaller than a preset distance; then determining the boundary of the map vector data set according to the position of each first map vector data in the map vector data set on the target map; and taking the area surrounded by the boundary of the map vector data set as an updating range on the target map. Compared with the mode of manually defining the updating range in the prior art, the scheme can automatically process large-range multi-batch vector data, improves the efficiency of determining the updating range, and improves the accuracy of the determined updating range.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a flowchart illustrating a method for determining an update range of vector data according to an embodiment of the present application;
FIG. 2 is a schematic diagram illustrating first map vector data provided by an embodiment of the present application positioned on a target map;
FIG. 3 is a schematic diagram of a first outsourced rectangular area of line element data provided by an embodiment of the application;
fig. 4 is a schematic diagram illustrating a first outsourced rectangular area of the face element data provided by the embodiment of the application;
FIG. 5 is a schematic diagram illustrating a second bounding rectangular region of a set of map vector data provided by an embodiment of the present application;
fig. 6 is a schematic structural diagram illustrating a vector data update range determination apparatus according to an embodiment of the present application;
fig. 7 shows a schematic structural diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
In view of the problems of low efficiency of defining an update range and low precision of the defined update range in the prior art, embodiments of the present application provide a method, an apparatus, an electronic device, and a storage medium for determining an update range of vector data, which are described below by way of embodiments.
The first embodiment is as follows:
to facilitate understanding of the present embodiment, a detailed description will be given first of all of a vector data update range determination method disclosed in the embodiments of the present application. Fig. 1 shows a flowchart of a method for determining an update range of vector data according to an embodiment of the present application, and as shown in fig. 1, the method for determining an update range of vector data can be implemented by the following steps S101 to S103:
s101: acquiring a map updating data packet containing a target map; the target map comprises a plurality of first map vector data, and each first map vector data is respectively positioned at different positions on the target map.
For convenience of understanding of the present solution, first, an application scenario in the embodiment of the present application is described, and the map to be updated may be a provincial map, a national map, or a world map, which is not limited in the present application. The map to be updated comprises a plurality of second map vector data, the second map vector data are used for representing information of oceans, forests, roads, vehicles, buildings and the like, and the position of the second map vector data on the map to be updated is used for representing the actual position of the oceans, the forests, the roads, the vehicles, the buildings and the like on the earth. Due to urban development or natural disasters, some second map vector data on the earth may be changed (for example, the second map vector data is increased, decreased, changed in position and size, and the like). For example, due to city development, a building a is developed in city a, but the position information of the building a is not recorded before the map to be updated, and at this time, a map update data packet including the position information of the building a in city a needs to be acquired, and the map to be updated is updated by using the map update data packet, so as to add the map vector data of the building a to the map to be updated.
In an embodiment of the application, the map update data packet includes a target map, a plurality of first map vector data exist on the target map, and each first map vector data is respectively located at different positions on the target map. For example, when the map to be updated is a national map, the target map may be a new city map after a certain city is changed, and all first map vector data after the city is changed are recorded on the target map, as shown in fig. 2, fig. 2 shows a schematic diagram that the first map vector data provided in the embodiment of the present application is located on the target map, and as shown in fig. 2, the first map vector data includes one or more of point element data, line element data, and surface element data, where the point element data is, for example, street lamps, vehicles, buildings, and the like; the line element data can be roads, railways and the like; the surface element data can be forest, sea, lake, etc. The area size of the first map vector data on the target map is used for representing the actual floor area size of the first map vector data on the earth; the position relation of the first map vector data on the target map is used for representing the actual position relation of the first map vector data on the earth.
S102: clustering the first map vector data according to a preset distance and the distance between the first map vector data on the target map to obtain a plurality of map vector data sets; and a target map vector data exists in the map vector data set, and the distance between other first map vector data in the map vector data set and the target map vector data is less than a preset distance.
The map vector data set may include one first map vector data or may include a plurality of first map vector data. The types of the first map vector data included in the map vector data set may be the same or different, and for example, the map vector data set may include point element data, line element data, and plane element data at the same time, or may include only the same type of element data. In the embodiment of the application, the first map vector data with a shorter distance is divided into the same map vector data set.
S103: and for each map vector data set, determining the boundary of the map vector data set according to the position of each first map vector data in the map vector data set on the target map, and taking the area surrounded by the boundary as one of the updating ranges on the target map.
Each map vector data set corresponds to an updating range, and the boundary of the map vector data set in the target map is determined according to the position of each first map vector data in the map vector data set on the target map, wherein the boundary is used for enclosing all first map vector data in the map vector data set in the target map.
In one possible implementation mode, the target map corresponds to a target map to be updated in the map to be updated, and the map update data packet is used for updating the target map to be updated; after the step S103 is executed to obtain each update range on the target map, the method further includes:
s104: deleting the second map vector data in the target range on the target map to be updated from the map to be updated according to the position of the updating range on the target map; the position of the target range on the target map to be updated is the same as the position of the update range on the target map.
In a specific embodiment, the target map and the target map to be updated in the map to be updated both correspond to the same geographic area, for example, the map to be updated may be an old national map before the change of the city a, the target map may be a new city map after the change of the city a, and the target map to be updated is an old city map before the change of the city a.
The target map comprises at least one updating range, the position and the area of the updating range on the target map are the same as the position and the area of the target range on the target map to be updated, the map to be updated comprises a plurality of second map vector data, the second map vector data comprise one of point element data, line element data and surface element data, and the second map vector data in the target range on the target map to be updated are deleted from the map to be updated, namely the second map vector data before change are deleted from the map to be updated.
S105, inserting the first map vector data in the updating range into the target range on the target map to be updated so as to update the target map to be updated.
And inserting (or filling) the first map vector data in the updating range into the target range on the target map to be updated so as to update the target map to be updated. And when the target map to be updated is updated, the updating of the target map to be updated is finished equivalently.
In the embodiment of the present application, the update data packet is equivalent to a patch, and since the second map vector data in the target range on the map to be updated has been deleted, at this time, no map vector data is used in the target range on the map to be updated, and in the present application, all the first map vector data in the update range is directly inserted into the target range.
In a possible embodiment, when performing step S102 to cluster the first map vector data according to the preset distance and the distance between the first map vector data on the target map, the following steps S1021 to S1024 may be specifically performed:
s1021: and determining the coordinates of the central point of each first map vector data on the target map.
In one possible embodiment, the first map vector data includes one or more of point element data, line element data, and surface element data; a target coordinate system is pre-established on the target map; the center point coordinate of the first map vector data is positioned in a target coordinate system;
when the first map vector data is point element data, the position coordinates of the point element data on the target map are determined as center point coordinates of the first map vector data.
When the first map vector data is line element data or surface element data, determining a first outsourcing rectangular area of the first map vector data, and determining the coordinate of the center position of the first outsourcing rectangular area as the coordinate of the center point of the first map vector data; fig. 3 is a schematic diagram showing a first outsourced rectangular area of line element data provided by an embodiment of the present application, and fig. 4 is a schematic diagram showing a first outsourced rectangular area of plane element data provided by an embodiment of the present application, and as shown in fig. 3 and 4, the horizontal direction and the vertical direction of the first outsourced rectangular area are respectively the same as the horizontal direction and the vertical direction of the target coordinate system.
In this embodiment, as shown in fig. 3, the first outsourced rectangular region of the line element data is specifically a minimum outsourced rectangular region of the line element data, and as shown in fig. 4, the first outsourced rectangular region of the surface element data is specifically a minimum outsourced rectangular region of the surface element data, and the horizontal direction and the vertical direction of the first outsourced rectangular region are respectively the same as the horizontal direction (X-axis direction of the target coordinate system) and the vertical direction (Y-axis direction of the target coordinate system) of the target coordinate system.
After the first externally-wrapped rectangular area of the first map vector data is determined, when the coordinate of the center position of the first externally-wrapped rectangular area is calculated, the coordinate may be specifically calculated by the following formula:
Figure BDA0003516036010000131
Figure BDA0003516036010000132
wherein (X)i,Yi) Coordinates of the center position of the ith first outsourcing rectangular area, namely coordinates of the center point of the ith first map vector data; (X)imax,Yimax) The maximum coordinate of the ith first wrapping rectangular area is taken as the maximum coordinate of the ith first wrapping rectangular area; (X)imin,Yimin) Is the minimum coordinate of the ith first bounding rectangular area.
S1022: and selecting one target map vector data from the non-clustered first map vector data, and calculating the distance between the center point of the target map vector data and the center points of other non-clustered first map vector data according to the center point coordinates of each first map vector data.
The non-clustered first map vector data refers to first map vector data that has not been divided into a set of map vector data. In this embodiment, a density clustering algorithm (DBSCAN) may be used to cluster the first map vector elements, specifically, one first map vector data is randomly selected from all non-clustered first map vector data as a target map vector data, and an euclidean distance between a center point of the target map vector data and a center point of other non-clustered first map vector data is calculated according to a center point coordinate of each first map vector data, and specifically, the euclidean distance may be calculated according to the following formula:
Figure BDA0003516036010000133
wherein D ismRepresenting Euclidean distance between the center point of the target map vector data and the center point of the m-th other non-clustered first map vector data, (x, y) representing the center point coordinates of the target map vector data, (xm,ym) Representing the center point coordinates of the mth other non-clustered first map vector data.
S1023: forming a map vector data set by the target map vector data and the third map vector data; the third map vector data is a part of the first map vector data in other non-clustered first map vector data; the distance between the center point of the third map vector data and the center point of the target map vector data is smaller than a preset distance.
Determining third map vector data in the other non-clustered first map vector data according to the Euclidean distance between the central point of the target map vector data and the central point of the other non-clustered first map vector data, wherein the Euclidean distance between the central point of the third map vector data and the central point of the target map vector data is smaller than a preset distance; the number of the third map vector data may be plural, and may be 1 or 0. And forming a map vector data set by the target map vector data and the third map vector data. The number of the first map vector data (i.e., the third map vector data and the target map vector data) included in each map vector data set may be the same or different.
S1024: the steps S1022 to S1023 are repeatedly executed until the first map vector data are all clustered.
The first map vector data are clustered, that is, there is no first map vector data that are not clustered, and when there is no first map vector data that are not clustered, it indicates that the clustering is completed.
In a possible embodiment, when performing step S103, for each map vector data set, determining a boundary of the map vector data set according to a position of each first map vector data in the map vector data set on the target map, and taking an area surrounded by the boundary as one of the update ranges on the target map, the following steps S1031 to S1032 may be specifically performed:
s1031: for each map vector data set, determining a second outer rectangular area of the map vector data set according to the position of the first outer rectangular area of each first map vector data in the map vector data set on a target map; the horizontal direction and the vertical direction of the second bounding rectangle area are respectively the same as the horizontal direction and the vertical direction of the target coordinate system.
S1032: and regarding each second outsourcing rectangular area, taking the second outsourcing rectangular area as one of the updating ranges on the target map.
Fig. 5 is a schematic diagram illustrating a second outsourcing rectangular area of the map vector data set provided in the embodiment of the present application, where as shown in fig. 5, the second outsourcing rectangular area is specifically a minimum outsourcing rectangular area of the map vector data set, and a horizontal direction and a vertical direction of the second outsourcing rectangular area are respectively the same as a horizontal direction (X-axis direction) and a vertical direction (Y-axis direction) of the target coordinate system. After each map vector data set on the target map is determined, the minimum coordinates and the maximum coordinates of the first externally-wrapped rectangular area of each first map vector data included in the map vector data set are determined, and when n first map vector data are included in the map vector data set, the minimum coordinates and the maximum coordinates of the first externally-wrapped rectangular area of each first map vector data included in the map vector data set are n respectively. Selecting a target minimum coordinate from the n minimum coordinates, wherein the target minimum coordinate is the minimum coordinate in the n minimum coordinates; similarly, a target maximum coordinate is selected from the n maximum coordinates, the target maximum coordinate being the largest one of the n maximum coordinates. The specific calculation method is as follows:
xmin=min(x1min,x2min,……,xnmin)
ymin=min(y1min,y2min,……,ynmin)
wherein (x)min,ymin) (x) is the minimum coordinate of the second bounding rectangular region of the map vector data setnmin,ynmin) The minimum coordinate of the first outsourcing rectangular area of the nth first map vector data in the map vector data set.
xmax=max(x1max,x2max,……,xnmax)
ymax=max(y1max,y2max,……,ynmax)
(xmax,ymax) (x) is the maximum coordinate of the second bounding rectangular region of the map vector data setnmax,ynmax) The maximum coordinate of the first outsourcing rectangular area of the nth first map vector data in the map vector data set.
After the maximum coordinates and the minimum coordinates of the second bounding rectangular area of the map vector data set are obtained, the second bounding rectangular area of the map vector data set is determined according to the maximum coordinates and the minimum coordinates and the horizontal direction and the vertical direction of the target coordinate system.
Example two:
based on the same technical concept, an embodiment of the present application further provides a vector data update range determination apparatus, and fig. 6 shows a schematic structural diagram of the vector data update range determination apparatus provided in the embodiment of the present application, and as shown in fig. 6, the apparatus includes:
an obtaining module 601, configured to obtain a map update data packet including a target map; the target map comprises a plurality of first map vector data, and the first map vector data are respectively positioned at different positions on the target map;
the clustering module 602 is configured to cluster the first map vector data according to a preset distance and a distance between the first map vector data on the target map to obtain a plurality of map vector data sets; a target map vector data exists in the map vector data set, and the distance between other first map vector data in the map vector data set and the target map vector data is smaller than the preset distance;
a determining module 603, configured to determine, for each map vector data set, a boundary of the map vector data set according to a position of each first map vector data in the map vector data set on the target map, and use an area surrounded by the boundary as one of the update ranges on the target map.
Optionally, the target map corresponds to a target map to be updated in a map to be updated, and the map update data packet is used to update the target map to be updated; after the determining module 603 is configured to obtain each of the update ranges on the target map, the apparatus further includes:
the deleting module is used for deleting the second map vector data in the target range on the target map to be updated from the map to be updated according to the position of the updating range on the target map; the position of the target range on the target map to be updated is the same as the position of the update range on the target map;
an inserting module, configured to insert the first map vector data in the update range into the target range on the target map to be updated, so as to update the target map to be updated.
Optionally, the clustering module 602 is configured to, when clustering the first map vector data according to a preset distance and a distance between the first map vector data on the target map, specifically:
determining the coordinates of the central point of each first map vector data on the target map;
selecting one target map vector data from the first non-clustered map vector data, and calculating the distance between the center point of the target map vector data and the center points of the other non-clustered first map vector data according to the center point coordinates of each first map vector data;
forming the target map vector data and the third map vector data into a map vector data set; the third map vector data is a part of the first map vector data in the first map vector data which are not clustered; the distance between the central point of the third map vector data and the central point of the target map vector data is smaller than the preset distance;
repeatedly executing the step of selecting one target map vector data from the first non-clustered map vector data, and calculating the distance between the center point of the target map vector data and the center points of the other non-clustered first map vector data according to the center point coordinates of each first map vector data; forming the target map vector data and the third map vector data into a map vector data set; the third map vector data is a part of the first map vector data in the first map vector data which are not clustered; and the distance between the central point of the third map vector data and the central point of the target map vector data is smaller than the preset distance until the first map vector data are clustered.
Optionally, the first map vector data includes one or more of point element data, line element data, and surface element data; a target coordinate system is pre-established on the target map; the center point coordinate of the first map vector data is located in the target coordinate system; when the clustering module 602 is configured to determine the center point coordinates of each first map vector data on the target map, specifically:
when the first map vector data is the point element data, determining the position coordinates of the point element data as the coordinates of the center point of the first map vector data;
when the first map vector data is the line element data or the surface element data, determining a first outsourcing rectangular area of the first map vector data, and determining the coordinate of the center position of the first outsourcing rectangular area as the coordinate of the center point of the first map vector data; the horizontal direction and the vertical direction of the first outsourcing rectangular area are respectively the same as the horizontal direction and the vertical direction of the target coordinate system.
Optionally, the determining module 603 is configured to, for each map vector data set, determine a boundary of the map vector data set according to a position of each first map vector data in the map vector data set on the target map, and when an area surrounded by the boundary is taken as one of the update ranges on the target map, specifically configured to:
for each map vector data set, determining a second outsourcing rectangular area of the map vector data set according to the position of the first outsourcing rectangular area of each first map vector data in the map vector data set on the target map; the horizontal direction and the vertical direction of the second outer rectangular area are respectively the same as the horizontal direction and the vertical direction of the target coordinate system;
and regarding each second outer rectangular area as one of the updating ranges on the target map.
For the specific implementation steps and principles, reference is made to the description of the first embodiment, which is not repeated herein.
Example three:
based on the same technical concept, an embodiment of the present application further provides an electronic device, and fig. 7 shows a schematic structural diagram of the electronic device provided in the embodiment of the present application, and as shown in fig. 7, the electronic device 700 includes: a processor 701, a memory 702 and a bus 703, the memory storing machine-readable instructions executable by the processor, when the electronic device is operated, the processor 701 and the memory 702 communicate via the bus 703, and the processor 701 executes the machine-readable instructions to perform the method steps described in the first embodiment.
For the specific implementation steps and principles, reference is made to the description of the first embodiment, which is not repeated herein.
Example four:
based on the same technical concept, a computer-readable storage medium is further provided in a fourth embodiment of the present application, where a computer program is stored on the computer-readable storage medium, and the computer program is executed by a processor to perform the method steps in the first embodiment.
For the specific implementation steps and principles, reference is made to the description of the first embodiment, which is not repeated herein.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present application, and are used for illustrating the technical solutions of the present application, but not limiting the same, and the scope of the present application is not limited thereto, and although the present application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope disclosed in the present application; such modifications, changes or substitutions do not depart from the spirit and scope of the exemplary embodiments of the present application, and are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A vector data update range determination method, comprising:
acquiring a map updating data packet containing a target map; the target map comprises a plurality of first map vector data, and the first map vector data are respectively positioned at different positions on the target map;
clustering the first map vector data according to a preset distance and the distance between the first map vector data on the target map to obtain a plurality of map vector data sets; a target map vector data exists in the map vector data set, and the distance between other first map vector data in the map vector data set and the target map vector data is smaller than the preset distance;
and for each map vector data set, determining the boundary of the map vector data set according to the position of each first map vector data in the map vector data set on the target map, and taking the area surrounded by the boundary as one of the updating ranges on the target map.
2. The method according to claim 1, wherein the target map corresponds to a target map to be updated in a map to be updated, and the map update data packet is used for updating the target map to be updated; after obtaining each of the update ranges on the target map, the method further includes:
deleting second map vector data in the target range on the target map to be updated from the map to be updated according to the position of the updating range on the target map; the position of the target range on the target map to be updated is the same as the position of the update range on the target map;
inserting the first map vector data in the updating range into the target range on the target map to be updated so as to update the target map to be updated.
3. The method of claim 1, wherein clustering the first map vector data according to a preset distance and a distance between the first map vector data on the target map comprises:
the method comprises the following steps: determining the coordinates of the central point of each first map vector data on the target map;
step two: selecting one target map vector data from the first non-clustered map vector data, and calculating the distance between the center point of the target map vector data and the center points of the other non-clustered first map vector data according to the center point coordinates of each first map vector data;
step three: forming the target map vector data and the third map vector data into a map vector data set; the third map vector data is a part of the first map vector data in the first map vector data which are not clustered; the distance between the central point of the third map vector data and the central point of the target map vector data is smaller than the preset distance;
step four: and repeating the second step to the third step until the first map vector data are clustered.
4. The method of claim 3, wherein the first map vector data comprises one or more of point element data, line element data, and surface element data; a target coordinate system is pre-established on the target map; the center point coordinate of the first map vector data is located in the target coordinate system;
the determining the center point coordinates of each first map vector data on the target map includes:
when the first map vector data is the point element data, determining the position coordinates of the point element data as the coordinates of the center point of the first map vector data;
when the first map vector data is the line element data or the surface element data, determining a first outsourcing rectangular area of the first map vector data, and determining the coordinate of the center position of the first outsourcing rectangular area as the coordinate of the center point of the first map vector data; the horizontal direction and the vertical direction of the first outsourcing rectangular area are respectively the same as the horizontal direction and the vertical direction of the target coordinate system.
5. The method of claim 4, wherein for each map vector data set, determining a boundary of the map vector data set according to a position of each first map vector data in the map vector data set on the target map, and using an area surrounded by the boundary as one of the update ranges on the target map comprises:
for each map vector data set, determining a second outsourcing rectangular area of the map vector data set according to the position of the first outsourcing rectangular area of each first map vector data in the map vector data set on the target map; the horizontal direction and the vertical direction of the second outer rectangular area are respectively the same as the horizontal direction and the vertical direction of the target coordinate system;
and regarding each second outer rectangular area as one of the updating ranges on the target map.
6. A vector data update range determination apparatus, comprising:
the acquisition module is used for acquiring a map updating data packet containing a target map; the target map comprises a plurality of first map vector data, and the first map vector data are respectively positioned at different positions on the target map;
the clustering module is used for clustering the first map vector data according to a preset distance and the distance between the first map vector data on the target map to obtain a plurality of map vector data sets; a target map vector data exists in the map vector data set, and the distance between other first map vector data in the map vector data set and the target map vector data is smaller than the preset distance;
and the determining module is used for determining the boundary of each map vector data set according to the position of each first map vector data in the map vector data set on the target map, and taking the area surrounded by the boundary as one of the updating ranges on the target map.
7. The apparatus according to claim 6, wherein the target map corresponds to a target map to be updated in a map to be updated, and the map update data packet is used for updating the target map to be updated; after the determining module is configured to obtain each of the update ranges on the target map, the apparatus further includes:
the deleting module is used for deleting the second map vector data in the target range on the target map to be updated from the map to be updated according to the position of the updating range on the target map; the position of the target range on the target map to be updated is the same as the position of the update range on the target map;
and the inserting module is used for inserting the first map vector data in the updating range into the target range on the target map to be updated so as to update the target map to be updated.
8. The apparatus of claim 6, wherein the clustering module, when configured to cluster the first map vector data according to a preset distance and a distance between the first map vector data on the target map, is specifically configured to:
determining the coordinates of the central point of each first map vector data on the target map;
selecting one target map vector data from the first non-clustered map vector data, and calculating the distance between the center point of the target map vector data and the center points of other non-clustered first map vector data according to the center point coordinates of each first map vector data;
forming the target map vector data and the third map vector data into a map vector data set; the third map vector data is a part of the first map vector data in the first map vector data which are not clustered; the distance between the central point of the third map vector data and the central point of the target map vector data is smaller than the preset distance;
repeatedly executing the step of selecting one target map vector data from the first non-clustered map vector data, and calculating the distance between the center point of the target map vector data and the center points of the other non-clustered first map vector data according to the center point coordinates of each first map vector data; forming the target map vector data and the third map vector data into a map vector data set; the third map vector data is a part of the first map vector data in the first map vector data which are not clustered; and the distance between the central point of the third map vector data and the central point of the target map vector data is smaller than the preset distance until the first map vector data are clustered.
9. An electronic device, comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating over the bus when the electronic device is operating, the machine-readable instructions when executed by the processor performing the steps of the method of any of claims 1 to 5.
10. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, is adapted to carry out the steps of the method according to any one of claims 1 to 5.
CN202210166188.1A 2022-02-23 2022-02-23 Vector data updating range determining method and device, electronic equipment and storage medium Pending CN114528305A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210166188.1A CN114528305A (en) 2022-02-23 2022-02-23 Vector data updating range determining method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210166188.1A CN114528305A (en) 2022-02-23 2022-02-23 Vector data updating range determining method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114528305A true CN114528305A (en) 2022-05-24

Family

ID=81624321

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210166188.1A Pending CN114528305A (en) 2022-02-23 2022-02-23 Vector data updating range determining method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114528305A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117235089A (en) * 2023-11-09 2023-12-15 高德软件有限公司 Map checking method, map checking device, electronic equipment and readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117235089A (en) * 2023-11-09 2023-12-15 高德软件有限公司 Map checking method, map checking device, electronic equipment and readable storage medium
CN117235089B (en) * 2023-11-09 2024-02-23 高德软件有限公司 Map checking method, map checking device, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
US11875513B2 (en) Self-adaptive point cloud stripe division method
US8736599B2 (en) Method for unified visualisation of heterogeneous datasets
CN107564077B (en) method and device for drawing road network
CN108267154B (en) Map display method and device
US9959670B2 (en) Method for rendering terrain
CN112233240B (en) Three-dimensional vector data slicing method and device of three-dimensional vector map and electronic equipment
CN108225334B (en) Positioning method and device based on three-dimensional live-action data
TW200926060A (en) Geospatial modeling system providing user-selectable building shape options and related methods
CN112115534A (en) Method for converting three-dimensional house model into two-dimensional vector plane with height attribute
JP2012234533A (en) Database for navigation device, method of outputting three-dimensional representation of terrain and method of generating database
CN113724401B (en) Three-dimensional model cutting method and device, computer equipment and storage medium
CN102779165A (en) Building method of grid map picture base
CN110647596A (en) Map data processing method and device
CN114528305A (en) Vector data updating range determining method and device, electronic equipment and storage medium
CN115510175A (en) Method and device for converting geographical coordinates of dwg data, computer equipment and medium
CN116030218A (en) Tetrahedral mesh dividing method, device, system and storage medium
CN112215864B (en) Contour processing method and device of electronic map and electronic equipment
CN112184900B (en) Method, device and storage medium for determining elevation data
CN112598800A (en) Air quality mode forecast data acquisition method and device based on terrain
CN112687007A (en) LOD technology-based stereo grid map generation method
CN108627884B (en) Meteorological data processing method and device
CN105512312A (en) Accelerating method for two-dimensional map library
CN115588086A (en) Map dividing method, map dividing device, computer readable storage medium and processor
US20210004424A1 (en) Methods and Systems for Processing Geospatial Data
CN114186315A (en) Method and device for generating building simplified model, computer equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination