Multi-Point deletion rules and implementation methods

Source: Internet
Author: User

The lite version of the alarm point has been released. Although the original idea is to delete the alarm point based on the intersection, the model is too perfect and is very suitable for cross intersections, it is not applicable to complex road conditions, such as the main road and auxiliary road, and there are cross paths nearby. This is too complicated. Which intersection is used as a reference, if all references are made, it is a problem that the intersections are too close. In addition, it is not easy to get the intersection. In the end, I gave up this idea.

After thinking a lot of ways, I finally thought that I would directly strip multiple alarm points to delete the nearest points and merge them into one point. It sounds very simple, that is, to take the average value of the alarm points close to a certain channel, but how to judge whether these points are close together is the key. First, any bit has a point close to it, which can be determined by the distance. For example, if it is kept within 80 meters, it is a closer point. Secondly, whether these closer points are actually close, or whether there are flying points (that is, there are a few close together and another one is far but within the distance, or whether there is a certain relationship between the number of points. First, take a certain bit as the reference point. Within the range of its radius of 80 meters, it belongs to its relatively close point. However, for these close points, not all of them are added and then averaged to get a coordinate position. In this way, the probability of accidental deletion is relatively large. When we first use 100 meters as the Radius Range to average the point, there is a phenomenon that the last point of the two intersections is averaged and then becomes the intermediate point of the two intersections. This is an error. Then you must add additional conditions. The general conditions are:

1. If the reference point is not close to a point within the 80-meter range, the point is an independent point and is retained;

2. There is a nearby point around the reference point. If the distance between the reference point and the nearby point is greater than 50 meters, give up the approaching point, I am worried that the two points exceeding 50 meters may be at two intersections. If the distance between the reference point and the neighboring point is less than 50 meters, the two points are added to the average, that is, the point in the middle of the two points is obtained as the final alarm point;

3. How to determine whether a point is the Flying Point in the previous paragraph? First, more than one nearby point is found within the 80-meter range around the reference point. At this time, the average value cannot be directly calculated, I have added a condition that if the distance between the reference point and the neighboring point exceeds twice the distance of the second largest, the maximum distance is discarded, remove and restore from near point to normal point. You only need to average the reference point and near point to get the alarm point. If there is no maximum distance more than twice the second distance, then the alarm points can be obtained by adding all the proximity points and reference points and obtaining the average value.

Based on this idea, I began to write functions, which were written in VB. This function cannot be broken away from traversal and is constantly traversing. to speed up the process, I first read all the points in the file into a very huge array, then traverse the array, starting from the first record point, assuming that the point is the reference point, traversing all the points starting from the second record, take all the points within 80 meters as close points, and then judge according to the above three conditions. In addition, to avoid repeated computing points, each point is marked with a judgment mark. If the mark is true, it indicates that the record has been processed and skipped without processing, for data that is not marked as real, it is attributed to the judgment point and continues to the next round of Multi-Point deletion.

Next let's take a look at the comparison of the two maps before and after processing. I will attach some instructions and comments. The two pictures below are the comparison of the data before and after processing in the vicinity of Jingan Park, it is obvious that the processed data is very consistent with the Multi-Point deletion standard, but it also finds some drawbacks.

All alarm point bitmap near Jingan Park:

The bitmap of the alarm points near Jingan park after processing:

 

 

As shown in, there are three questions. I have used numbers 1, 2, and 3 to mark them. We will analyze these questions in detail:

The first mark is because the two points are within the range of 80 meters, but they are not merged because they only have two points and are more than 50 meters away, and become two independent points, this situation meets the above two conditions, so the processing is correct. As shown in:

At the second mark, the third condition is met here, that is, the maximum distance is twice the second distance, 42> 18*2, as shown in:

 

The third mark is also a third condition, 55> 24*2, as shown in:

However, I personally think that the third condition still has some drawbacks, or the method has some drawbacks. For example, if the two marked points above use the intermediate point as the reference point, the other two close points belong to the average range, that is, the three points can be directly added and then the average value is obtained. Finally, a point is obtained, instead of two points. In order to improve this situation, because I use sequential traversal instead of out-of-order traversal, under such circumstances, which of the following cannot be selected as a reference point, however, if I add a distance condition, this can be improved. I added another judgment condition, that is, the maximum distance is less than 50 meters, even if it is longer than the second distance, but do not consider, directly use all the points as the sum to get the average value, after this condition is added, the second mark is removed from two points to one point, but the third mark is not processed as one point because the maximum distance is over 50 meters, finally, two points are processed. However, this condition does have an effect. As shown in, the four points are processed as two points before the condition is added. However, after the condition is added, the four points are processed as one point, in addition, I personally think that the effect of a single point is better than that of two points.

 

The effect after adding conditions can still be seen. Take Shanghai as an example. There are a total of 3237 alarm points. When no conditions are added, the processing result is 1790 records, after adding a condition, the post-processing result is 1770 records, of which 20 are records that are deleted due to the addition of a condition, which simplifies the data.

The final result of Multi-Point deletion:

The number of illegal alarm points has changed from 31915 to 18223, reducing by 43%
The number of red light warning points has changed from 24871 to 13121, reducing the number by 47%.
Alert point version with no distinction between violation and red light: changed from 56786 to 29985, reducing by 47%
(Because unclassified alarm points do not consider violation and red light, but are only handled as the same alarm point, so 29985 <18223 + 13121)

The final results show that the results are still very good, but I also believe that there are some drawbacks and situations that cannot be considered, for example, if there is no authentication in the text, we select two key numbers, 80 meters and 50 meters. For example, the third mark in the text fails to become a point, which is a disadvantage. In other words, not all situations meet the conditions. After all, Multi-Point deletion can be regarded as data sorting, either retaining or discarding data, and there are only two options for better conditions. I am personally satisfied with the result. If you have better methods or rules, you are welcome to discuss them.

This article is about the Garmin alarm point improvement plan and the lite version of the alarm point release (Garmin alarm point improvement plan continued ).ArticleI originally wanted to write the plain text, but the result was a technical article about the principle, so it may be a bit confusing to directly view this article. I suggest you check the above two articles first and then browse this article, there may be a better understanding.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.