Summary of the invention
The present invention is a kind of obtains the service system of vehicle accurate geographic position and the object of acquisition methods is to provide a kind of MapInfo of utilization data, Oracle Spatial database in enterprise, to set up accurate vehicle geographic location information query service system and method thereof for above-mentioned weak point.Have efficiency higher, data are feature more accurately.
A kind of service system and acquisition methods thereof that obtains vehicle accurate geographic position takes following technical scheme to realize: a kind of service system of obtaining vehicle accurate geographic position comprises server and database server, operating system, MapInfo Geographic Information System module and Oracle 10g (comprising Oracle Spatial module) database is installed on server, Oracle Spatial module is installed on database server.
Described operating system is windows server 2003 operating systems.
The service of obtaining vehicle geographic position also can be described as against geocoding against geocoding process normally according to the geographic coordinate of appointment, from spatial database, inquire respectively city title, zone name, street name and near the terrestrial reference at this coordinate place, then become a sufficient address to describe these information combination.
A kind of service system of obtaining vehicle accurate geographic position is when operation, according to the geographic coordinate of appointment, from Oracle Spatial module spatial database, inquire respectively city title, zone name, street name and near the terrestrial reference at this coordinate place, then become a sufficient address to describe these information combination.Province, city and region's area information of loading text form, by calling Window api function, create province, city and region's map, and load atural object, road-map-data, then inquire about respectively on this basis the city title at place, administrative coding, nearest atural object title, nearest road name, then according to concrete query type, sufficient address of these result combinations is described and returned to user.
A kind of method of obtaining vehicle accurate geographic position of the present invention comprises the following steps:
1) first Oracle 10g is installed on database server, wherein comprises Oracle Spatial module; Then by MapInfo Geographic Information System module, pour map datum into, utilizing MapX(MapX is the ActiveX control product with map analysis function formidably that MapInfo company provides to user) the Oracle Spatial instrument that provides, map datum is poured in Oracle Spatial, with MapInfo, derive map datum and province, city and region's area information simultaneously, with text txt file form, preserve.
2) geographic coordinate that MapInfo Geographic Information System module is uploaded according to car-mounted terminal GPS, read national each province area data, call the polygon scope at Window api function cycle criterion GPS point place, and preserve be positioned at polygonal province name information;
3) province's name information that MapInfo Geographic Information System module obtains according to step 2 is called the polygon scope that Windows api function is searched GPS point place within the scope of this province, and preserves be positioned at polygonal city title;
4) within the scope of the name information ,Gai city, city obtaining according to step 3, call the polygon scope that Windows api function is searched GPS point place, and preserve institute and be positioned at polygonal district/county title, and the administration in district/county coding; If only need obtain GPS, order the administrative coding of the city title that is positioned at or district/county, stop inquiry and directly returning results to user, need else if to inquire about nearest atural object and forward step 5 to, if need to inquire about nearest road, forward step 6 to;
5) within the scope of administrative coding ,Gai district, the district obtaining according to step 4/county, by institute's distance a little within the scope of GPSDian Yugai district relatively, find from the nearest atural object of this GPS point, preserve atural object name information, and finish inquire about and return results to user;
6) the administrative coding in the district obtaining according to step 4/county, within the scope of Gai district, utilize the mode that compares the mode of distance or inquire about Oracle Spatial database to search from the nearest road of this GPS point, preserve road name or category of roads information, and finish inquiry and return results to user.
Can be according to user the MapInfo Geographic Information System module with in above-mentioned steps need to be become to DLL control and Http server module with function package.
Step 2) geographic coordinate described in is metric longitude and latitude data.
MapInfo Geographic Information System module provides 2 kinds of data reading manners, from txt file reading manner with from Oracle Spatial database, reads mode.
The present invention creates province, city and region's map by calling Window api function, and load atural object, road-map-data, then inquire about respectively on this basis the city title at place, administrative coding, nearest atural object title, nearest road name, then according to concrete query type, sufficient address of these result combinations is described and returned to user.Utilize nucleus module Oracle Spatial in database Oracle10g to carry out the map datum of store M apInfo form, and under Visual Studio 2005 development environments, utilize C# to realize contrary geocoding algorithm, and be packaged into DLL control, and Http server calls web API is for other routine call
Implementation.Call method real-time of the present invention is high, p.s. at least can respective request over 100 times, its extendability is also good than traditional scheme, outside decapacitation request vehicle province, city and region road relevant location information, can also ask the extend informations such as the administrative coding in area, category of roads; The map datum that this can within a short period of time can compatible other map companies of family provides.
Embodiment
With reference to accompanying drawing 1, a kind of service system of obtaining vehicle accurate geographic position comprises server and database server, operating system, MapInfo Geographic Information System module and Oracle 10g (comprising Oracle Spatial module) database is installed on server, Oracle Spatial module is installed on database server.
Described operating system is windows server 2003 operating systems.
A kind of method of obtaining vehicle accurate geographic position of the present invention comprises the following steps:
1) first Oracle 10g is installed on database server, wherein comprises Oracle Spatial module; Then by MapInfo Geographic Information System module, pour map datum into, utilizing MapX(MapX is the ActiveX control product with map analysis function formidably that MapInfo company provides to user) the Oracle Spatial instrument that provides, map datum is poured in Oracle Spatial, with MapInfo, derive map datum and province, city and region's area information simultaneously, with text txt file form, preserve.
2) geographic coordinate that MapInfo Geographic Information System module is uploaded according to car-mounted terminal GPS, read national each province area data, call the polygon scope at Window api function cycle criterion GPS point place, and preserve be positioned at polygonal province name information;
3) province's name information that MapInfo Geographic Information System module obtains according to step 2 is called the polygon scope that Windows api function is searched GPS point place within the scope of this province, and preserves be positioned at polygonal city title;
4) within the scope of the name information ,Gai city, city obtaining according to step 3, call the polygon scope that Windows api function is searched GPS point place, and preserve institute and be positioned at polygonal district/county title, and the administration in district/county coding; If only need obtain GPS, order the administrative coding of the city title that is positioned at or district/county, stop inquiry and directly returning results to user, need else if to inquire about nearest atural object and forward step 5 to, if need to inquire about nearest road, forward step 6 to;
5) within the scope of administrative coding ,Gai district, the district obtaining according to step 4/county, by institute's distance a little within the scope of GPSDian Yugai district relatively, find from the nearest atural object of this GPS point, preserve atural object name information, and finish inquire about and return results to user;
6) the administrative coding in the district obtaining according to step 4/county, within the scope of Gai district, utilize the mode that compares the mode of distance or inquire about Oracle Spatial database to search from the nearest road of this GPS point, preserve road name or category of roads information, and finish inquiry and return results to user.
Can be according to user the MapInfo Geographic Information System module package with in above-mentioned steps need to be become to DLL control and Http server module.
Step 2) geographic coordinate described in is metric longitude and latitude data.
MapInfo Geographic Information System module provides 2 kinds of data reading manners, from txt file reading manner with from Oracle Spatial database, reads mode.