A statistical method for the area of various types of land in traffic communities based on AOI data and GeoHash algorithm
By combining AOI data and the GeoHash algorithm, the land area of various types of traffic communities can be quickly counted, which solves the problems of low efficiency and poor accuracy in the existing technology, realizes automated and rapid statistics of land area of traffic communities, and is suitable for traffic demand forecasting and Traffic simulation and other fields.
Patent Information
- Application Number
- CN202210216829.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-07
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2042-03-07
AI Technical Summary
The existing technology has low efficiency and poor accuracy when counting various types of land areas in traffic communities, making it difficult to quickly obtain accurate land use conditions.
Using a method based on AOI data and GeoHash algorithm, by reading the traffic community and AOI data, performing preprocessing and GeoHash encoding processing, the AOI data in the nine-square grid area around the traffic community is determined, and the intersection area between the traffic community and the AOI is calculated to achieve automation. , Quick land area statistics.
It improves the efficiency and accuracy of land area statistics, can more accurately describe the situation of various types of land in traffic communities, is suitable for big data application scenarios, and has high promotion and application value.
Smart Images

Figure CN114706930B
Abstract
Description
Technical Field
[0001] The present invention relates to a method for counting the areas of various types of land in a traffic community based on AOI data and a GeoHash algorithm, and belongs to the engineering technology field of technical fields such as traffic simulation and traffic big data. Background Art
[0002] The discipline of transportation engineering is a comprehensive discipline that integrates natural science and social science. With the development of modern science and technology, the field of transportation is also moving towards intelligence. Traffic planning, as an important part of the discipline of transportation engineering, has also begun to widely use new technologies such as big data and artificial intelligence in its methods and technologies. For example, in the study of traffic demand, traditional methods of obtaining traffic demand are mostly manual surveys, which are costly and have poor accuracy. With the emergence of new technologies, new traffic demand forecasting methods based on big data are developing rapidly. By obtaining data such as population and land use, the occurrence and attraction of traffic demand in traffic communities can be predicted, making the acquisition of traffic demand more convenient and scientific.
[0003] The full name of AOI is Area Of Interest, which can be translated into interest area by analogy with the meaning of POI (Point Of Interest), and is used to represent regional geographic entities in map data. The point location information obtained by searching for keywords in map engines such as Baidu or AutoNavi is POI data, and the surface area result obtained is AOI data. AOI data can intuitively and vividly describe the distribution of various land use types in space. AOI data uses multi-level labels to represent the land use type to which the corresponding geographic entity belongs, and gradually refines the description of the land use type to which the geographic entity belongs from the first level to the multi-level. With the rapid development of major domestic map service companies, the quantity, quality, coverage and update frequency of AOI data have been greatly improved. Therefore, the rich AOI data makes it possible to accurately count the area of various types of land in the traffic community.
[0004] GeoHash is a nearby spatial target search algorithm. The basic principle is to understand the earth as a two-dimensional plane, recursively decompose the plane into smaller sub-blocks, and each sub-block has the same code within a certain latitude and longitude range; it can map the two-dimensional coordinates of a point to a string code, each code represents a specific rectangular area, and the coordinates of all points in the rectangular area share this code. The longer the string code, the higher the accuracy, and the smaller the corresponding rectangular area. Using AOI data to study the land use of traffic communities, it was previously necessary to traverse the entire AOI data to search for AOIs that intersect with traffic communities. The Geohash algorithm can quickly determine the AOI data around traffic communities, improve the algorithm's search efficiency, and more quickly calculate the area of each type of land in traffic communities. Summary of the invention
[0005] Purpose of the invention: The present invention processes traffic zone data and AOI data and uses the GeoHash algorithm to efficiently calculate the land use situation of traffic zones. The goal is to propose a method for calculating the area of various types of land in traffic zones based on AOI data and the GeoHash algorithm.
[0006] Technical solution: A statistical method for the area of various types of land in traffic communities based on AOI data and GeoHash algorithm, the method comprising the following steps:
[0007] (1) Read traffic area data and AOI data, including the following data:
[0008] (11) The traffic zone data consists of two parts: one is the traffic zone boundary data, including the traffic zone number and its corresponding boundary topological point number sequence; the other is the topological point coordinate data, including the topological point number, the topological point x coordinate, and the topological point y coordinate;
[0009] (12) The attributes of AOI data include AOI number, AOI name, AOI type label, longitude and latitude of the POI corresponding to the AOI, area of the AOI, and AOI boundary topological point number sequence;
[0010] (2) Preprocess the traffic zone data and AOI data. The specific steps are as follows:
[0011] (21) By preprocessing the traffic zone data in step (1), the character string description of the traffic zone number, geometric center point and geometric polygon is output. The specific steps are: using the topological point number as the key and the set of topological point x and y coordinates as the value, the coordinate set is converted into UTM plane coordinates and then loaded into the initialized hash table; according to the boundary topological point number sequence of each traffic zone, the corresponding topological point coordinate sequence is determined through the hash table; this topological point coordinate sequence is converted into a polygon object in spatial geometry, and the geometric center point object of the polygon object is generated at the same time; using WKT (a text markup language used to represent vector geometric objects such as points, lines, polygons, etc.) to output the center point object and the polygon object in the string format;
[0012] (22) By preprocessing the AOI data in step (1), the character string description of the AOI number, type code, geometric center point and geometric polygon is output. The specific steps are: clarify the scope of the land use type to be studied, specify the type code corresponding to each land use type within the scope, and determine the mapping relationship between the AOI original type label and the land use type to be studied; based on this, the first-level label in the AOI original type label is extracted, mapped and converted into a custom type code; first, the coordinates in the AOI boundary topological point number sequence are converted into UTM plane coordinates, and then converted into polygon objects in spatial geometry, and the geometric center point object of the polygon object is generated at the same time; finally, the center point object and the polygon object are output as a character string format using WKT;
[0013] (3) Perform GeoHash encoding on the spatial coordinate points: Determine the corresponding GeoHash encoding accuracy according to the accuracy level of the study, that is, the length of the GeoHash string code expected to be output; the GeoHash encoding principle of the traffic zone data is the same as that of the AOI data. Based on the data in step (2), read the WKT of the geometric center point of each data, extract the coordinate information of the geometric center point, convert it into longitude and latitude coordinates, and input it into the GeoHash algorithm together with the determined encoding accuracy to output a string code; add a new column in the traffic zone data and AOI data to store the GeoHash string code corresponding to each data;
[0014] (4) Determine the GeoHash codes of the eight neighborhoods around the traffic zone. The specific steps are as follows:
[0015] (41) In step (3), the GeoHash encoding accuracy has been determined. According to the GeoHash algorithm, the length and width of the smallest rectangle under study can be obtained, and the longitude lonUnit and latitude unit latUnit of the smallest rectangle's horizontal and vertical span can be further determined;
[0016] (42) The longitude and latitude coordinates of the geometric center point of the traffic zone are known to be (lon, lat). The following eight deduced points are respectively located in the eight neighborhoods around this center point: (lon, lat+latUnit), (lon, lat-latUnit), (lon+lonUnit, lat), (lon-lonUnit, lat), (lon-lonUnit, lat-latUnit), (lon-lonUnit, lat+latUnit), (lon+lonUnit, lat-latUnit), (lon+lonUnit, lat+latUnit);
[0017] (43) According to the GeoHash algorithm, the longitude and latitude coordinates of eight deduced points around the geometric center of the traffic zone are input, and the GeoHash codes of the eight neighborhood points around the traffic zone can be obtained;
[0018] (5) Search for the AOI geometric center point within the nine-square grid area according to the GeoHash code. The specific steps are as follows:
[0019] (51) Based on the AOI data in step (3), the GeoHash code of the AOI geometric center point is used as the key. Since a single GeoHash code may correspond to multiple AOIs, a hash subtable consisting of the AOI number, type code, and WKT of the geometric polygon is used as the value to load the AOI data into the hash table;
[0020] (52) For each traffic zone, the GeoHash codes of itself and the eight surrounding neighborhoods are traversed in turn, and the corresponding value is determined in the hash table of AOI data using the GeoHash code of the area as the key. After traversing the nine areas, the geometric center points of all AOIs within the neighborhood of this traffic zone can be determined;
[0021] (6) Calculate the intersection area between the traffic zone and each AOI: For each traffic zone, the AOI geometric center point within its neighborhood can be determined by step (5), and the corresponding AOI geometric polygon object can be further determined. By intersecting the traffic zone geometric polygon object with the AOI geometric polygon object in space, the area of the intersection can be further obtained. The intersection area of each AOI type corresponding to the traffic zone is stored in a hash table with the AOI type code as the key and the intersection area as the value. In the case where there are multiple AOIs of the same type in a traffic zone, the keys of the corresponding hash tables are the same, and the values are added up and summed and stored in the hash table.
[0022] (7) Storing and outputting the calculation results: Using the traffic zone number as the key and the hash table result calculated in step (6) as the value, a hash table is created to store the area of each land use type in each traffic zone. Finally, the final calculation result is output and stored in a medium in the form of a two-dimensional table, wherein each row of the two-dimensional table represents the area of each land use type in a single traffic zone, and the columns of the two-dimensional table represent the traffic zone number and the area of each type of land use, respectively.
[0023] Beneficial effects: Compared with the prior art, the technical solution of the present invention has the following beneficial technical effects:
[0024] The present invention innovatively proposes a statistical method for the area of various types of land in transportation communities based on AOI data and GeoHash algorithm. The use of AOI data can more accurately describe the situation of the area of various types of land in transportation communities, and AOI data has the characteristics of easy acquisition, wide coverage, high data quality and high update frequency. The present invention applies the GeoHash algorithm to the AOI near the search for transportation communities, and uses the nine-square grid area of the transportation community instead of a single area of the transportation community, so the search efficiency and accuracy are improved, and it can be suitable for big data application scenarios. Under the background of the rapid development of new technologies such as big data, the GeoHash algorithm is used based on AOI data to realize the automatic and rapid statistics of the area of various types of land in transportation communities, which has a high promotion and application value in the fields of traffic demand prediction and traffic simulation. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 It is a flow chart of the method for counting the area of various types of land in traffic communities based on AOI and GeoHash of the present invention;
[0026] Figure 2 A schematic diagram of the traffic subdivision division of the research area in the example of the present invention;
[0027] Figure 3 Schematic diagram of AOI data distribution in an example of the present invention;
[0028] Figure 4 A schematic diagram of searching for a neighborhood AOI of a traffic cell in an example of the present invention;
[0029] Figure 5 It is a schematic diagram of calculating the intersection area between the traffic zone and the AOI in an example of the present invention. DETAILED DESCRIPTION
[0030] The present invention introduces a method for calculating the area of various types of land in a traffic zone based on AOI data and GeoHash algorithm. The technical solution of the present invention is further described in detail below with reference to examples and drawings.
[0031] This example uses part of the central urban area of Nanjing as the research object, and according to the data processing steps in the technical solution, the area statistics of 7 types of land use in 165 traffic communities in the research area are realized. See the attached method flow chart Figure 1 , including the following 7 steps:
[0032] (1) Read traffic zone data and AOI data: This example uses part of the central urban area of Nanjing as the research area. The division of traffic zones is shown in the attached figure. Figure 2The traffic zone data in the example are read, including the traffic zone boundary data and topological point coordinate data, wherein the traffic zone boundary data includes the traffic zone number and its corresponding boundary topological point number sequence, as shown in Table 1; the topological point coordinate data includes the topological point number, the topological point x coordinate, and the topological point y coordinate, as shown in Table 2. Figure 3 As shown in Table 3, the AOI data in the example is read, including the AOI number, AOI name, AOI type label, the longitude and latitude of the POI corresponding to the AOI, the area of the AOI, and the AOI boundary topological point number sequence.
[0033] Table 1. Traffic zone boundary data table
[0034] serial number Boundary topological point numbering sequence 1 91933 91934 91935 91936 91937 91938 91939 91940 91941 91942 91943… 2 92062 92063 92064 92065 92066 92067 92068 92069 92070 92071 92072… … … 165 101481 101482 101483 101484 101485 101486 101487 101488 101489…
[0035] Table 2. Topological point coordinate data table
[0036]
[0037]
[0038] Table 3. AOI data sheet
[0039]
[0040] (2) Preprocessing the traffic zone data and AOI data. By preprocessing the traffic zone data in step (1), the number, geometric center point and character string description of the traffic zone are output, as shown in Table 4. By preprocessing the AOI data in step (1), combined with the mapping relationship between the AOI original type label and the studied land use type as shown in Table 5, the number, type code, geometric center point and character string description of the AOI are output, as shown in Table 6.
[0041] Table 4. Traffic zone preprocessed data table
[0042]
[0043] Table 5. Land use type mapping table
[0044]
[0045]
[0046] Table 6. AOI pre-processing data table
[0047]
[0048] (3) Perform GeoHash encoding on the spatial coordinate points: Determine the GeoHash encoding accuracy based on the size of the study area. In this example, the GeoHash string encoding length is set to 6, and the corresponding minimum rectangular area width is 1.2km and the height is 0.6km. The total area of the nine-square grid area is approximately 6.48 square kilometers. Based on the traffic zone and AOI data in step (2), read the WKT of the geometric center point of each data, extract the coordinate information of the geometric center point, convert it into longitude and latitude coordinates, and input it into the GeoHash algorithm together with the determined encoding accuracy to output a string code; add a new column in the traffic zone data and AOI data to store the GeoHash string code corresponding to each data;
[0049] (4) Determine the GeoHash codes of the eight neighborhoods around the traffic zone: For example, the GeoHash code corresponding to the geometric center point of the traffic zone numbered 1 is wtsmyd. Given the coordinates of the center point of the traffic zone and the size of the rectangle in which it is located, the longitude and latitude coordinates of the eight deduced points around it can be calculated. Then, according to the GeoHash algorithm, the GeoHadh codes of the eight neighborhoods around it can be further obtained: wtsmy6, wtsmyf, wtsmy9, wtsmy3, wtsmyc, wtsmye, wtsmy7, wtsmyg. Figure 4 As shown in the left picture.
[0050] (5) Searching for the AOI geometric center point in the nine-square grid area according to the GeoHash code: Based on the AOI data in step (3), the GeoHash code of the AOI geometric center point is used as the key. Since a single GeoHash code may correspond to multiple AOIs, a hash subtable consisting of the AOI number, type code, and WKT of the geometric polygon is used as the value to construct a list, and the AOI data is loaded into the hash table. The content of the hash table is shown in Table 7; the GeoHash code of the nine-square grid area of the traffic zone is traversed, and the GeoHash code of the area is used as the key to determine the corresponding value in the hash table of the AOI data. After traversing the nine areas, all the AOI geometric center points within the neighborhood of this traffic zone can be determined. For example, the AOI geometric center point in the nine-square grid area of traffic zone No. 1 is as shown in FIG. Figure 4 Shown as black circle in the middle figure.
[0051] Table 7. Hash table for loading AOI data
[0052]
[0053] (6) Calculate the intersection area between the traffic zone and each AOI: By determining the AOI geometric center point within its neighborhood range in step (5), the corresponding AOI geometric polygon object can be further determined, such as Figure 4 As shown in the right figure; by intersecting the traffic zone geometry polygon object and the AOI geometry polygon object in space, the area of the intersection can be obtained, such as Figure 5 As shown in the figure, the polygon with black slashes represents the intersection of the traffic zone and the AOI. The intersection area of each AOI type corresponding to the traffic zone is stored in the hash table with the AOI type code as the key and the intersection area as the value. In the case where there are multiple AOIs of the same type in a traffic zone, the keys of the corresponding hash tables are the same, and the values are added up and stored in the hash table.
[0054] (7) Storing and outputting the calculation results: Using the traffic zone number as the key and the hash table result calculated in step (6) as the value, a hash table is created to store the area of each land use type in each traffic zone. Finally, the final calculation result is output to a TXT file in the form of a two-dimensional table, where each row of the two-dimensional table represents the area of each land use type in a single traffic zone, and the columns of the two-dimensional table represent the traffic zone number and the area of each type of land use, respectively.
[0055] Table 8. Statistics of the area of each land use type in the transportation zone
[0056]
[0057]
Claims
1. A statistical method for the area of various types of land in traffic communities based on AOI data and GeoHash algorithm. It is characterized in that The following steps are involved: (1) Read traffic area data and AOI data; (2) Preprocess the traffic zone data and AOI data, extract the character string description of the traffic zone geometric center point and geometric polygon object, map the custom research land type code with the AOI land type label, and extract the character string description of the AOI geometric center point and geometric polygon object; (3) Perform GeoHash encoding on the coordinates of the geometric center points in the traffic zone data and AOI data: Determine the corresponding GeoHash encoding accuracy according to the accuracy level of the study, that is, the length of the GeoHash string code expected to be output; the GeoHash encoding principle of the traffic zone data and the AOI data is the same. Based on the data in step (2), for each piece of data in the preprocessed traffic zone data and AOI data, read the WKT of its geometric center point, extract the coordinate information of the geometric center point, convert it into longitude and latitude coordinates, and input it into the GeoHash algorithm together with the determined encoding accuracy to output a string code; add a new column in the traffic zone data and AOI data to store the GeoHash string code corresponding to each piece of data; (4) Based on the determined GeoHash coding accuracy, eight deduced points in the vertical, horizontal, and vertical locations of the traffic cell are calculated using the coordinates of the geometric center point of the traffic cell and the minimum rectangle longitude and latitude span, thereby further determining the GeoHash codes of the eight neighborhoods around the traffic cell; (5) Load the AOI data into a hash table, and search the hash table of the AOI data for AOI data whose geometric center point is within the traffic cell itself and its eight surrounding neighborhoods according to the GeoHash code of the traffic cell itself and its eight surrounding neighborhoods. The traffic cell itself and its eight surrounding neighborhoods form a nine-square grid with three rows and three columns; (6) Calculate the intersection area between the traffic zone and each AOI by performing an intersection operation on the spatial position of the geometric polygon objects corresponding to the traffic zone and the AOI: for each traffic zone, determine the AOI geometric center point within its neighborhood range by step (5), that is, further determine the corresponding AOI geometric polygon object, perform an intersection operation on the traffic zone geometric polygon object and the AOI geometric polygon object in spatial position, that is, further obtain the area of the intersection part, and store the intersection areas of each AOI type corresponding to the traffic zone in a hash table with the AOI type code as the key and the intersection area as the value. In the case where there are multiple AOIs of the same type in a traffic zone, the keys of the corresponding hash tables are the same, and the area values of the intersection of multiple AOIs of the same type with the traffic zone are added and summed up and stored in the hash table; (7) The calculated area results of each land use type in each traffic zone are stored and outputted: using the traffic zone number as the key and the hash table result calculated in step (6) as the value, a hash table is created to store the area of each land use type in each traffic zone, and finally the calculated results are outputted to the medium.
2. According to claim 1, a method for calculating the area of various types of land in a traffic zone based on AOI data and GeoHash algorithm, It is characterized in that The method of step (1) is as follows: (11) The traffic zone data consists of two parts: one is the traffic zone boundary data, including the traffic zone number and its corresponding boundary topological point number sequence; the other is the topological point coordinate data, including the topological point number, the topological point x coordinate, and the topological point y coordinate; (12) The fields of AOI data include AOI number, AOI name, land use type label corresponding to AOI, POI coordinates corresponding to AOI, area of AOI and coordinate sequence of AOI boundary topological points. The land use type label corresponding to AOI is generated by connecting three levels of land use type sub-labels through separators. Each level of land use type sub-label describes the land use type of AOI. From the first level to the third level of land use type sub-label, as the level of land use type sub-label increases, the description of AOI land use type is gradually refined.
3. According to claim 2, a method for calculating the area of various types of land in traffic communities based on AOI data and GeoHash algorithm, It is characterized in that The method of step (2) is as follows: (21) By preprocessing the traffic zone data in step (1), the number, geometric center point and character string description of the traffic zone are output. The specific steps are: using the topological point number as the key of the hash table, converting the set of topological point x and y coordinates into UTM coordinates as the value of the hash table, and loading all topological point data into the initialized hash table; according to the boundary topological point number sequence of each traffic zone, determining the corresponding topological point coordinate sequence through the hash table; converting the topological point coordinate sequence into a polygon object in spatial geometry, and generating the geometric center point object of the polygon object; using WKT to output the center point object and polygon object in the format of a character string; (22) By preprocessing the AOI data in step (1), the AOI number, custom land type code, geometric center point and geometric polygon character string description are output. The specific steps are: determine the range of land use types under study, the type code corresponding to each land type within the custom range, and determine the mapping relationship between the AOI land type label and the land use type under study; based on this, extract, map and convert the first-level land type sub-label in the AOI land type label into the custom land type code; first convert the coordinates in the AOI boundary topological point numbering sequence into UTM plane coordinates, and then convert them into polygon objects in spatial geometry, and generate the geometric center point object of the polygon object; finally, use WKT to output the center point object and polygon object in the string format.
4. According to claim 3, a method for calculating the area of various types of land in a traffic zone based on AOI data and GeoHash algorithm, It is characterized in that The specific method of step (4) is as follows: (41) The GeoHash algorithm unfolds the earth's spherical surface into a plane according to certain rules, and continuously divides the plane into two parts. The GeoHash coding accuracy corresponds to the number of divisions. Given the length and width of the earth's plane and the number of divisions, the length and width of the minimum rectangle after the division are determined. The GeoHash coding accuracy has been determined in step (3). The length and width of the minimum rectangle under study are obtained according to the GeoHash algorithm, and the longitude lonUnit and latitude unit latUnit of the minimum rectangle's horizontal and vertical span are further determined. (42) The longitude and latitude coordinates of the geometric center point of the traffic zone are known to be (lon, lat). The following eight deduced points are respectively located in the eight neighborhoods around this center point: (lon, lat+latUnit), (lon, lat-latUnit), (lon+lonUnit, lat), (lon-lonUnit, lat), (lon-lonUnit, lat-latUnit), (lon-lonUnit, lat+latUnit), (lon+lonUnit, lat-latUnit), (lon+lonUnit, lat+latUnit); (43) According to the GeoHash algorithm, based on the known length and width of the earth plane and the determined GeoHash coding accuracy, the longitude and latitude coordinates of eight deduced points around the geometric center point of the traffic zone are input, and the GeoHash codes of the eight neighborhood points around the traffic zone are obtained.
5. According to claim 4, a method for calculating the area of various types of land in a traffic zone based on AOI data and GeoHash algorithm, It is characterized in that The specific method of step (5) is as follows: (51) Based on the AOI data in step (3), the GeoHash code of the AOI geometric center point is used as the key. Since a single GeoHash code may correspond to multiple AOIs, a hash subtable consisting of the AOI number, type code, and WKT of the geometric polygon is used as the value to load the AOI data into the hash table; (52) For each traffic zone, the GeoHash codes of itself and the eight surrounding neighborhoods are traversed in turn, and the corresponding value is determined in the hash table of the AOI data using this GeoHash code as the key. After traversing the nine areas, the geometric center points of all AOIs within the neighborhood of this traffic zone can be determined.
Citation Information
Patent Citations
Traffic zone various types of land areas statistical method based on image processing
CN110097595A
Method for establishing full-space-oriented data model
CN111367913A
