CN107403020B - A method of retaining existing road net data and carries out Network extension using OSM data - Google Patents

A method of retaining existing road net data and carries out Network extension using OSM data Download PDF

Info

Publication number
CN107403020B
CN107403020B CN201710861141.6A CN201710861141A CN107403020B CN 107403020 B CN107403020 B CN 107403020B CN 201710861141 A CN201710861141 A CN 201710861141A CN 107403020 B CN107403020 B CN 107403020B
Authority
CN
China
Prior art keywords
point
coordinate
data
osm
latitude
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.)
Active
Application number
CN201710861141.6A
Other languages
Chinese (zh)
Other versions
CN107403020A (en
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.)
Southeast University
Original Assignee
Southeast University
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 Southeast University filed Critical Southeast University
Priority to CN201710861141.6A priority Critical patent/CN107403020B/en
Publication of CN107403020A publication Critical patent/CN107403020A/en
Application granted granted Critical
Publication of CN107403020B publication Critical patent/CN107403020B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • G06Q50/40
    • 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

Abstract

The invention discloses a kind of methods for retaining existing road net data and carrying out Network extension using OSM data, the road network region that this method can allow the customized needs of user to extend, and rapidly the road network range extended is needed to be connected in legacy network user, the data information for remaining former road network simultaneously, finally obtains the road net data file after being extended using OSM data.In actual operation, user can encounter the case where needs expand research range on the basis of existing road network, the present invention is customized by the user the road network range that selection needs to extend, automatically it is merged after extracting extension road network information in OSM data with existing road net data, remain the road network information that original user has safeguarded, the artificial manpower and time cost for adding section one by one and repeat to road network after extension check is saved, while improving the accuracy of extension road network.

Description

A method of retaining existing road net data and carries out Network extension using OSM data
Technical field
The present invention relates to Traffic Net computer abstract expression technical fields, retain existing road more particularly to a kind of Network data and the method for carrying out Network extension using OSM data.
Background technique
Since traffic system has the characteristics that complexity, can not be experimental, with the continuous development of computer science, traffic Emulation is increasingly becoming the integrated decision-makings such as traffic planning and design, governmental investment prediction, the consulting of construction scheme overall merit, traffic engineering Effective tool and means.Traffic simulation is carried out, premise and basis is exactly to establish the road network of survey region in a computer, And this work is also to spend time and the most step of manpower.
For the designing institute of field of traffic, research institute or colleges and universities, accumulated by the work of many years and project, they Have that many cities or local content be complete, computer road network data of reliable in quality, these data are to support him Carry out the key of local project.However, the scale of Chinese city is increasingly along with the process that Chinese Fast Urbanization develops Greatly, this makes the Space Scale and research range that many existing computer road network datas can not be new comprising city.Cause This, being extended to existing road network data is an important problem in traffic simulation.
The method of conventional Extension computer road network data needs user's control base map to be added to existing road network one by one In, it is not only time-consuming and laborious, a possibility that manual operation malfunctions is also added, to influence the progress and transportation network of entire project The accuracy of distribution;And if directly from the road network after expanding is imported in OSM data, and it can be by road that is perfect before, safeguarding Network data covering, needs to check former road network again, equally will increase the working time.
Summary of the invention
To solve the above problems, the present invention provide it is a kind of retain existing road net data and using OSM data into The method of row Network extension is customized by the user the road network range that selection needs to extend, and extracts extension road from OSM data automatically Merged after net information with existing road net data, user only need to manually add existing road network and extend road network boundary node and Section can complete computer network extension work, greatly reduce the manpower and time cost of extension road network, improve extension The accuracy of road network, for this purpose, the present invention provides and a kind of retain existing road net data and utilize the progress road network expansion of OSM data The method of exhibition, includes the following steps, it is characterised in that:
OSM map datum of step (1) downloading comprising needing to extend road network region, if in the OSM rectangle map area Minimum latitude value is minlat, maximum latitude value maxlat, minimum longitude minlon, maximum longitude maxlon, A point longitude and latitude It spends coordinate (minlon, minlat), B point latitude and longitude coordinates (minlon, maxlat), C point latitude and longitude coordinates (maxlon, Minlat), D point latitude and longitude coordinates (maxlon, maxlat), by the latitude and longitude coordinates of OSM data interior joint, A point, B point, C point UTM coordinate system coordinate is converted to the latitude and longitude coordinates of D point and the node coordinate of existing road net data;
Step (2) is set under UTM coordinate system, A point coordinate (xa, ya), B point coordinate (xb, yb), C point coordinate (xc, yc), D point is sat Mark (xd, yd);Using A point as origin, vector AB is y-axis, and vector AD is that x-axis establishes plane right-angle coordinate R, in this coordinate system A Point coordinate becomes (0,0), and B point coordinate becomes (0, yb-ya), C point coordinate becomes (xc-xa, 0), D point coordinate becomes (xd-xa,yd- ya);
The OSM rectangle map area picture of step (3) interception downloading is used as base map, and longitude is minimum in picture, latitude minimum Point be placed in the A point in coordinate system R, longitude is minimum in picture, the maximum point of latitude is placed in the B point in coordinate system R, passes through in picture Degree is maximum, the smallest point of latitude is placed in the C point in coordinate system R;User can in the coordinate system R for having base map customized polygon Region is as the region for needing to carry out Network extension, if the vertex set of this polygonal region is S, the number of vertices in S is i, S is empty set, i 1 under original state;
Step (4) user chooses i-th of the vertex Ti, Ti of customized polygonal region in the coordinate system R containing base map It has in the rectangular extent for being vertex with A, B, C and D, and can be on this square boundary;If coordinate of the Ti in R is (xi, yi), then coordinate of the Ti under UTM coordinate system is (xi+xa, yi+ya), by (xi+xa, yi+ya) be put into set S;In base map On be highlighted the position of point Ti;
Step (5) is if i is greater than 4 and Ti and is overlapped with T1, then it is assumed that user, which selectes polygon, to terminate, and enters step (6);It is no I+1 is then assigned to i, return step (4);
Step (6) forms the customized closed polygon P of user by the node of the coordinate representation in set S, in UTM coordinate Under system, the beginning and end in each section in OSM data is successively judged using ray method whether in polygon P, if risen Point and terminal then delete the section, otherwise retain the section not in P;
Step (7) sets the node serial number maximum value in existing road net data as NodeID_max, and section number maximum value is WayID_max, the minimum value for ultimately remaining in the node serial number in OSM data is NodeID_min, ultimately remains in OSM data In section number minimum value be WayID_min;If the number for i-th of node being retained in OSM data is NodeID_i, The node serial number becomes NodeID_i-NodeID_min+NodeID_max+1 after then carrying out Network extension;If being retained in OSM number The number in the j-th strip section in is WayID_j, then section number becomes WayID_i-WayID_ after carrying out Network extension min+WayID_max+1;
Step (8) imports the OSM data for modifying node and section number in existing road net data file, generates and retains Existing road net data and the road net data file being extended using OSM data;User manually adds according to road network actual conditions Existing road network and node and the section for extending road network boundary, the road net data file after forming final extension.
Further, in the step 1, using the universal transverse Mercator method in cartography by the warp of corresponding points Latitude coordinate is converted to UTM coordinate system coordinate.
Further, in the step 6, ray method judgement a little whether the process in some polygonal region are as follows: from Point to be judged calculates the number n of ray and polygon intersection to horizontal direction injection line, if n is even number or is 0 to Judgement point is outside polygon, if n is odd number, in polygon;Point in Polygonal Boundary can consider in polygon It is interior, it is also contemplated that outside polygon.
The invention discloses a kind of method for retaining existing road net data and carrying out Network extension using OSM data, and show There is technology to compare, the invention has the following advantages that
1, the road network information for needing to extend is imported directly from OSM data, and is merged with existing road network, is saved The manpower and time cost for manually adding section one by one, improve the speed and accuracy of Network extension;
2, while being extended to road network, the road network information that original user has safeguarded is remained, is saved pair Road network repeat the working time of check after extension.
Detailed description of the invention
Fig. 1 is that the present invention is retained existing road net data and carried out the flow chart of Network extension using OSM data;
Fig. 2 is the OSM map comprising needing to extend road network region of one embodiment of the invention downloading;
Fig. 3 is the road network schematic diagram that one embodiment of the invention has road net data;
Fig. 4, which is that one embodiment of the invention user is customized, needs the Polygon Paths web area extended in coordinate system R Schematic diagram;
Fig. 5 is the customized road network schematic diagram for needing to extend of one embodiment of the invention user;
Fig. 6 is that one embodiment of the invention is retained existing road net data and carried out the net after Network extension using OSM data Network schematic diagram.
Specific embodiment
Present invention is further described in detail with specific embodiment with reference to the accompanying drawing:
The present invention provides a kind of method for retaining existing road net data and carrying out Network extension using OSM data, by user Customized selection needs the road network range that extends, automatically after extracting extension road network information in OSM data with existing road net data It merges, user only needs to manually add existing road network and extend the node on road network boundary and section that computer network can be completed Work is extended, the manpower and time cost of extension road network are greatly reduced, improves the accuracy of extension road network.
A kind of method for retaining existing road net data and carrying out Network extension using OSM data of the present invention, process such as Fig. 1 It is shown.
OSM map datum of step (1) downloading comprising needing to extend road network region, if in the OSM rectangle map area Minimum latitude value is minlat, maximum latitude value maxlat, minimum longitude minlon, maximum longitude maxlon, A point longitude and latitude It spends coordinate (minlon, minlat), B point latitude and longitude coordinates (minlon, maxlat), C point latitude and longitude coordinates (maxlon, Minlat), D point latitude and longitude coordinates (maxlon, maxlat), by the latitude and longitude coordinates of OSM data interior joint, A point, B point, C point UTM coordinate system coordinate is converted to the latitude and longitude coordinates of D point and the node coordinate of existing road net data;
In the present embodiment, the OSM map comprising needing to extend road network region of downloading is as shown in Figure 2;Existing road net data Road network it is as shown in Figure 3;Minimum latitude value in OSM rectangle map area is 31.9944000, maximum latitude value 32.1166000, minimum longitude 118.7014000, maximum longitude 118.8577000, A point, B point, C point and D point longitude and latitude It spends coordinate and corresponding UTM coordinate system coordinate is as shown in table 1.
Table 1 A, B, the latitude and longitude coordinates of C and D node and corresponding UTM coordinate system coordinate
Node Longitude Latitude UTM ordinate UTM abscissa
A 118.7014000 31.9944000 3541079.600787386 660726.5297759229
B 118.7014000 32.1166000 3554627.2953361487 660512.949893132
C 118.8577000 31.9944000 3541322.6954402537 675493.9466581749
D 118.8577000 32.1166000 3554870.894885617 675260.7241398427
Step (2) is set under UTM coordinate system, A point coordinate (xa, ya), B point coordinate (xb, yb), C point coordinate (xc, yc), D point is sat Mark (xd, yd);Using A point as origin, vector AB is y-axis, and vector AD is that x-axis establishes plane right-angle coordinate R, in this coordinate system A Point coordinate becomes (0,0), and B point coordinate becomes (0, yb-ya), C point coordinate becomes (xc-xa, 0), D point coordinate becomes (xd-xa,yd- ya);
The OSM rectangle map area picture of step (3) interception downloading is used as base map, and longitude is minimum in picture, latitude minimum Point be placed in the A point in coordinate system R, longitude is minimum in picture, the maximum point of latitude is placed in the B point in coordinate system R, passes through in picture Degree is maximum, the smallest point of latitude is placed in the C point in coordinate system R;User can in the coordinate system R for having base map customized polygon Region is as the region for needing to carry out Network extension, if the vertex set of this polygonal region is S, the number of vertices in S is i, S is empty set, i 1 under original state;
Step (4) user chooses i-th of the vertex Ti, Ti of customized polygonal region in the coordinate system R containing base map It has in the rectangular extent for being vertex with A, B, C and D, and can be on this square boundary;If coordinate of the Ti in R is (xi, yi), then coordinate of the Ti under UTM coordinate system is (xi+xa, yi+ya), by (xi+xa, yi+ya) be put into set S;In base map On be highlighted the position of point Ti;
Step (5) is if i is greater than 4 and Ti and is overlapped with T1, then it is assumed that user, which selectes polygon, to terminate, and enters step (6);It is no I+1 is then assigned to i, return step (4);
It in the present embodiment, establishes coordinate system R and base map is added, user chooses polygon vertex one by one and puts apex coordinate Enter in set S, it is finally formed to need the polygonal region extended as shown in figure 4, number is that user establishes the suitable of vertex in figure Sequence.The region by Yangtze River main road, the street Ao Ti, the western line of inner ring, Han Zhonglu, East Zhongshan Road, Xi'an door tunnel, inner ring east line, The road Long Pan, Jianning road and Zheng He North Road surround, and the coordinate in final set S is as shown in table 2.
Apex coordinate in 2 set S of table
Step (6) forms the customized closed polygon P of user by the node of the coordinate representation in set S, in UTM coordinate Under system, the beginning and end in each section in OSM data is successively judged using ray method whether in polygon P, if risen Point and terminal then delete the section, otherwise retain the section not in P;
In the present embodiment, by the OSM data not in using set S coordinate as outside the polygon P on vertex node and road Net is deleted, and it is as shown in Figure 5 to obtain the customized road network for needing to extend of user.
Step (7) sets the node serial number maximum value in existing road net data as NodeID_max, and section number maximum value is WayID_max, the minimum value for ultimately remaining in the node serial number in OSM data is NodeID_min, ultimately remains in OSM data In section number minimum value be WayID_min;If the number for i-th of node being retained in OSM data is NodeID_i, The node serial number becomes NodeID_i-NodeID_min+NodeID_max+1 after then carrying out Network extension;If being retained in OSM number The number in the j-th strip section in is WayID_j, then section number becomes WayID_i-WayID_ after carrying out Network extension min+WayID_max+1;
In the present embodiment, having the node serial number maximum value NodeID_max in road net data is 468, and section number is maximum Value WayID_max is 917, and the minimum value NodeID_min for ultimately remaining in the node serial number in OSM data is 4, final to retain The minimum value WayID_min of section number in OSM data is 3;Then it is retained in the number of i-th of node in OSM data Become NodeID_i+465 after carrying out Network extension;The number in the j-th strip section in OSM data is retained in after Network extension Become WayID_i+915;
Step (8) imports the OSM data for modifying node and section number in existing road net data file, generates and retains Existing road net data and the road net data file being extended using OSM data;User manually adds according to road network actual conditions Existing road network and node and the section for extending road network boundary, the road net data file after forming final extension.
The above described is only a preferred embodiment of the present invention, being not the limit for making any other form to the present invention System, and made any modification or equivalent variations according to the technical essence of the invention, still fall within present invention model claimed It encloses.

Claims (3)

1. a kind of method for retaining existing road net data and carrying out Network extension using OSM data, includes the following steps, feature It is:
OSM map datum of step (1) downloading comprising needing to extend road network region, if the minimum in the OSM rectangle map area Latitude value is minlat, maximum latitude value maxlat, minimum longitude minlon, maximum longitude maxlon, and A point longitude and latitude is sat It marks (minlon, minlat), B point latitude and longitude coordinates (minlon, maxlat), C point latitude and longitude coordinates (maxlon, minlat), D Point latitude and longitude coordinates (maxlon, maxlat), by the latitude and longitude coordinates of OSM data interior joint, A point, B point, C point and D point warp Latitude coordinate and the node coordinate of existing road net data are converted to UTM coordinate system coordinate;
Step (2) is set under UTM coordinate system, A point coordinate (xa, ya), B point coordinate (xb, yb), C point coordinate (xc, yc), D point coordinate (xd, yd);Using A point as origin, vector AB is y-axis, and vector AD is that x-axis establishes plane right-angle coordinate R, in this coordinate system A point Coordinate becomes (0,0), and B point coordinate becomes (0, yb-ya), C point coordinate becomes (xc-xa, 0), D point coordinate becomes (xd-xa,yd- ya);
The OSM rectangle map area picture of step (3) interception downloading is used as base map, longitude minimum, the smallest point of latitude in picture The A point being placed in coordinate system R, longitude is minimum in picture, the maximum point of latitude is placed in the B point in coordinate system R, and longitude is most in picture Greatly, the smallest point of latitude is placed in the C point in coordinate system R;User can in the coordinate system R for having base map customized polygonal region As the region for needing to carry out Network extension, if the vertex set of this polygonal region is S, the number of vertices in S is i, initially S is empty set, i 1 under state;
Step (4) user chooses i-th of vertex T of customized polygonal region in the coordinate system R containing base mapi, TiIt has to In the rectangular extent for being vertex with A, B, C and D, and can be on this square boundary;If TiCoordinate in R is (xi, yi), Then TiCoordinate under UTM coordinate system is (xi+xa, yi+ya), by (xi+xa, yi+ya) be put into set S;It is highlighted on base map aobvious Show the position of point Ti;
Step (5) is if i is greater than 4 and TiWith T1It is overlapped, then it is assumed that user, which selectes polygon, to terminate, and enters step (6);Otherwise by i + 1 is assigned to i, return step (4);
Step (6) forms the customized closed polygon P of user by the node of the coordinate representation in set S, in UTM coordinate system Under, the beginning and end in each section in OSM data is successively judged using ray method whether in polygon P, if starting point With terminal not in P, then the section is deleted, the section is otherwise retained;
Step (7) sets the node serial number maximum value in existing road net data as NodeID_max, and section number maximum value is WayID_max, the minimum value for ultimately remaining in the node serial number in OSM data is NodeID_min, ultimately remains in OSM data In section number minimum value be WayID_min;If the number for i-th of node being retained in OSM data is NodeID_i, The node serial number becomes NodeID_i-NodeID_min+NodeID_max+1 after then carrying out Network extension;If being retained in OSM number The number in the j-th strip section in is WayID_j, then section number becomes WayID_i-WayID_ after carrying out Network extension min+WayID_max+1;
Step (8) imports the OSM data for modifying node and section number in existing road net data file, and it is existing to generate reservation Road net data and the road net data file being extended using OSM data;User manually adds existing according to road network actual conditions The node and section on road network and extension road network boundary, the road net data file after forming final extension.
2. a kind of method for retaining existing road net data and carrying out Network extension using OSM data according to claim 1, It is characterized by: in the step (1), using the universal transverse Mercator method in cartography by the longitude and latitude of corresponding points Degree coordinate is converted to UTM coordinate system coordinate.
3. a kind of method for retaining existing road net data and carrying out Network extension using OSM data according to claim 1, It is characterized by: in the step (6), ray method judgement a little whether the process in some polygonal region are as follows: to The point of judgement calculates the number n of ray and polygon intersection to horizontal direction injection line, wait sentence if n is even number or is 0 Breakpoint is outside polygon, if n is odd number, in polygon;Point in Polygonal Boundary can consider in polygon, It is also contemplated that outside polygon.
CN201710861141.6A 2017-09-21 2017-09-21 A method of retaining existing road net data and carries out Network extension using OSM data Active CN107403020B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710861141.6A CN107403020B (en) 2017-09-21 2017-09-21 A method of retaining existing road net data and carries out Network extension using OSM data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710861141.6A CN107403020B (en) 2017-09-21 2017-09-21 A method of retaining existing road net data and carries out Network extension using OSM data

Publications (2)

Publication Number Publication Date
CN107403020A CN107403020A (en) 2017-11-28
CN107403020B true CN107403020B (en) 2019-10-01

Family

ID=60388812

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710861141.6A Active CN107403020B (en) 2017-09-21 2017-09-21 A method of retaining existing road net data and carries out Network extension using OSM data

Country Status (1)

Country Link
CN (1) CN107403020B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114413913B (en) * 2021-12-13 2023-10-13 武汉中海庭数据技术有限公司 High-precision map zoning compiling method and system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105489006A (en) * 2015-12-15 2016-04-13 浙江工业大学 Multi-scale road flow visual analysis method based on taxi GPS data
CN105893703A (en) * 2016-04-27 2016-08-24 中国地质大学(武汉) Polygon-based main road selection method of urban road network

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100298050A1 (en) * 2009-05-06 2010-11-25 Crabdish Inc., Dba Umapper.Com Map-authoring applications and geogames

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105489006A (en) * 2015-12-15 2016-04-13 浙江工业大学 Multi-scale road flow visual analysis method based on taxi GPS data
CN105893703A (en) * 2016-04-27 2016-08-24 中国地质大学(武汉) Polygon-based main road selection method of urban road network

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Polygon-based approach for extracting multilane roads from OpenStreetMap urban road networks;Fan H.等;《International Journal of Geographical Information Science》;20141231;第2200-2219页 *
基于树状结构的高速公路路网扩展及收费清分实现;杜海宁等;《公路交通科技》;20020630;第102-105页 *
面向OSM数据的多模式路径规划方法;李雪琼等;《地理空间信息》;20151031;第41-44页 *

Also Published As

Publication number Publication date
CN107403020A (en) 2017-11-28

Similar Documents

Publication Publication Date Title
CN107066750B (en) Method for solving electromechanical comprehensive pipeline arrangement
CN109359351B (en) Three-dimensional modeling method for pipeline and pipeline design method
CN105893544B (en) A method of city space big data map is generated based on POI industry situation data
CN103309944B (en) A kind of cultural symbol method realizing map library management
CN107480306B (en) In rapidly extracting OSM data in customized polygonal region road network method
US20230074265A1 (en) Virtual scenario generation method and apparatus, computer device and storage medium
KR102120680B1 (en) 3D BIM object modeling server and 3D BIM object modeling system comprising it
CN107192393A (en) The maintenance system and method for a kind of road-map-data
CN103955566A (en) Electric transmission line three-dimensional design method based on Google Earth and electric transmission line three-dimensional design system based on Google Earth
CN105117573A (en) Automatic hydraulic model establishment method based on CAD drainage network drawing information
CN105719219A (en) GIS space analysis based dividing method for cultural heritage protection divisions
CN107153744B (en) Underground three-dimensional pipeline decision making system
CN107481195A (en) Method and device based on more sight spot region intelligence sectional drawings generation electronic map
CN114077764A (en) Method for establishing temporary model based on three-dimensional GIS and BIM integration and application
CN106294484B (en) A kind of method and device updating electronic map data
CN107403020B (en) A method of retaining existing road net data and carries out Network extension using OSM data
Ibragimov et al. Introduction to GIS Application in the Land Cadastre
CN107169080A (en) A kind of geospatial analysis system being combined based on GIS and spatial database
CN107729511B (en) Customizable geographic information data rectangular framing method
CN104091367A (en) Three-dimensional scene storage method and device based on OGRE
CN111985014B (en) Modeling method and system based on standard atlas
Beirão et al. Structuring a generative model for urban design: linking GIS to shape grammars
CN113096251A (en) Model processing method, device and equipment based on CIM and storage medium
CN106997416A (en) Utilize the multistage model stepped mixing loading method of BIM technology
CN108470363A (en) A kind of hand-drawing map location method based on geographic reference point and triangulation

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
GR01 Patent grant
GR01 Patent grant