CN106454743A - Geographic position asynchronous obtaining method - Google Patents

Geographic position asynchronous obtaining method Download PDF

Info

Publication number
CN106454743A
CN106454743A CN201611078316.8A CN201611078316A CN106454743A CN 106454743 A CN106454743 A CN 106454743A CN 201611078316 A CN201611078316 A CN 201611078316A CN 106454743 A CN106454743 A CN 106454743A
Authority
CN
China
Prior art keywords
address information
geographic location
location address
geographical position
information
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.)
Granted
Application number
CN201611078316.8A
Other languages
Chinese (zh)
Other versions
CN106454743B (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.)
Beijing Rice World Technology Co Ltd
Original Assignee
Beijing Rice World Technology Co Ltd
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 Beijing Rice World Technology Co Ltd filed Critical Beijing Rice World Technology Co Ltd
Priority to CN201611078316.8A priority Critical patent/CN106454743B/en
Publication of CN106454743A publication Critical patent/CN106454743A/en
Application granted granted Critical
Publication of CN106454743B publication Critical patent/CN106454743B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/025Services making use of location information using location based information parameters

Abstract

The invention discloses a geographic position asynchronous obtaining method. Multiple geographic inverse coding interfaces are set, geographic position address information is obtained through utilization of locally stored geographic position coordinate points, and a success rate and the accuracy of obtaining the information are improved. The method has the advantages that the geographic position information is obtained asynchronously; the geographic position information is obtained in the geographic coding and geographic inverse coding threads; the main thread time is not occupied; the speed is fast; the delay is removed; the obtained geographic positions are locally stored (namely cached); the latest geographic position information is locally stored (cached) each time; the information can be reused; and the positioning speed and accuracy are improved.

Description

The asynchronous acquisition methods in geographical position
Technical field
The present invention relates to geographical location information acquiring technology field, specifically, is a kind of asynchronous acquisition side in geographical position Method.
Background technology
Geographical position is to connect various information in human survival and social activity, is formed in continuous distribution on room and time Integrated information basis.Geographical position coordinates point is represented by current location place longitude and latitude, and particular geographic location ground The information that location information is only used in people's daily life with reference to and needs.
At present, developing rapidly with development of Mobile Internet technology, the application that installs in terminal is more and more, wherein, very heavy The part application that wants is the application of location Based service (Location Based Service, LBS).This kind of application is permissible According to the geographical position of terminal, some information of client push for the application that installs in terminal, point of interest such as near terminal, Point of interest and the distance between terminal information etc., such that it is able to realize the geographical position according to terminal, provide a user with various each The service of sample.
However, the geographical position of application based on LBS according to terminal, during to client push information, if by positioning Operation, it is impossible to obtain the geographical location information of terminal, it is impossible to realize obtaining and to the information required for client push user. Therefore, in prior art, be completely dependent on positioning action obtain geographical location information mode reliability and obtain efficiency all than Relatively low.
Content of the invention
The purpose of the present invention is for deficiency of the prior art, provides a kind of geographical position asynchronous acquisition methods.
For achieving the above object, the present invention is adopted the technical scheme that:A kind of asynchronous acquisition methods in geographical position, including such as Lower step:
Step 01:Obtain locally stored geographical position coordinates point;
Step 02:The corresponding geographic location address information of the coordinate points is obtained by geographical Gray code;
Step 03:If successfully geographic location address information is obtained, whether acquired geographic location address information is judged Effectively, effectively then memory cache is carried out to the corresponding geographic location address information of the geographical position coordinates point, while to local The geographic location address information of storage is updated, invalid then starting step 04;
Step 04:If obtaining the failure of geographic location address information or acquired geographic location address information being invalid, Then switch the interface of geographical Gray code at once, restart step 2.
Further, whether effectively acquired geographic location address information is judged described in step 02, including acquired Geographic location address information meets priority and is followed successively by city, and -- -- road -- province -- country, then be judged as effectively secondary provincial unit It is otherwise invalid.
Further, the acquisition geographic location address information unsuccessfully includes, acquired geographic location address information is Empty.
Further, the service that obtains of geographic location address information is that the renewal for following geographical position coordinates point is carried out in real time , after updating to locally stored geographical position coordinates point every time, the acquisition service of geographic location address information will be started.
The invention has the advantages that:
The inventive method is obtained in the thread of geocoding and geographical Gray code by asynchronous acquisition geographical location information Geographical location information, is not take up the main thread time, speed faster, not interim card;Localization storage is realized (i.e. in the geographical position of acquisition Caching), the locally stored each time geographical location information for having cached the last time, can be multiplexed, improve locating speed and standard Exactness.
Description of the drawings
For becoming apparent from understanding the purpose of the present invention, feature and advantage, below with reference to preferable reality of the accompanying drawing to the present invention Apply example to be described in detail, wherein:
Fig. 1 is the flow chart of the inventive method.
Specific embodiment
Below in conjunction with accompanying drawing, the method for the present invention is further illustrated.
As shown in Figure 1, a kind of asynchronous acquisition methods in geographical position of the present invention, comprise the steps:
Step 01:Obtain locally stored geographical position coordinates point;After getting geographical position coordinates point, start immediately and obtain Take geographic location address information programme, i.e. starting step 2.
Step 02:The corresponding geographic location address information of the coordinate points is obtained by geographical Gray code;
Step 03:If geographic location address information is successfully obtained, judge that acquired geographic location address information is No effective;In the present embodiment, it is preferable that using the geographical position coordinates point of above-mentioned acquisition, first provided using androidSDK Android.location.GeoCoder class obtains information mistake obtaining the corresponding geographic location address information of above-mentioned coordinate points Cheng Zhong, the priority in geographical position is followed successively by city, and -- -- road -- province -- country, successfully obtains and returns secondary provincial unit The language used by geographic location address information follows the language used at present by user terminal system.If now, the ground of return Reason location address information is sky, then this time obtain the failure of geographic location address information, then switch geographical Gray code interface, using replacing Benefit scheme continues to obtain geographic location address information.If now, the geographic location address information of return is not then obtained into for sky Work(, is next then to judge whether acquired information is effective information, that is, judges that acquired geographic location address information is No meet priority and be followed successively by city that -- -- road -- province -- country, if the field for meeting and returning is for even for secondary provincial unit Continuous legal readable field, then be effective information.After success obtains effective geographic location address information, to the geographical position The corresponding geographic location address information of coordinate points carries out memory cache, while carrying out more to locally stored geographical position coordinates point Newly, if obtain geographical location information invalid if starting step 4;The acquisition service of geographic location address information is to follow geographical position Put what coordinate points renewal was carried out, after updating to locally stored geographical position coordinates point every time, geographic location address will be started The acquisition service of information.
Step 04:If obtaining the failure of geographic location address information or acquired geographic location address information being invalid, Then switch the interface of geographical Gray code at once, the corresponding geographic location address information of coordinate points is reacquired, that is, restarts step Rapid 2;In the present embodiment, it is preferable that when first scheme obtains the failure of geographic location address information, be then switched to use at once Google Maps Geocoding API is obtaining geographic location address information, and the program successfully obtains the accurate of effective information Spend for return geographic location address information in " address_components " and the second level, return geographic location address letter The language of breath equally follows the language used by current system.
Preferably, if be repeated several times, the failure of geographic location address information or acquired geographic location address letter are obtained Breath is invalid, then with locally stored, memory cache is updated to null character string.
The above is only the preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art Member, on the premise of without departing from the inventive method, can also make some improvement and supplement, and these improve and supplement also should be regarded as Protection scope of the present invention.

Claims (4)

1. asynchronous acquisition methods in a kind of geographical position, it is characterised in that comprise the steps:
Step 01:Obtain locally stored geographical position coordinates point;
Step 02:The corresponding geographic location address information of the coordinate points is obtained by geographical Gray code;
Step 03:If successfully geographic location address information is obtained, whether effectively acquired geographic location address information is judged, Effective then memory cache is carried out to the corresponding geographic location address information of the geographical position coordinates point, while to locally stored Geographic location address information is updated, invalid then starting step 04.
Step 04:If obtaining the failure of geographic location address information or acquired geographic location address information being invalid, stand The interface of the geographical Gray code of switching is carved, restarts step 2.
2. asynchronous acquisition methods in a kind of geographical position according to claim 1, it is characterised in that judge institute described in step 02 Effectively whether the geographic location address information of acquisition, meet priority including acquired geographic location address information and be followed successively by city -- -- road -- province -- country meets and is then judged as being otherwise effectively invalid secondary provincial unit in city.
3. a kind of asynchronous acquisition methods in geographical position according to claim 1, it is characterised in that the acquisition geographical position Address information unsuccessfully includes, acquired geographic location address information is sky.
4. a kind of asynchronous acquisition methods in geographical position according to claim 1, it is characterised in that geographic location address information Obtain service be that the renewal for following geographical position coordinates point is carried out in real time, every time to locally stored geographical position coordinates point The acquisition service of geographic location address information after renewal, will be started.
CN201611078316.8A 2016-11-29 2016-11-29 Asynchronous acquisition method of geographic position Active CN106454743B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611078316.8A CN106454743B (en) 2016-11-29 2016-11-29 Asynchronous acquisition method of geographic position

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611078316.8A CN106454743B (en) 2016-11-29 2016-11-29 Asynchronous acquisition method of geographic position

Publications (2)

Publication Number Publication Date
CN106454743A true CN106454743A (en) 2017-02-22
CN106454743B CN106454743B (en) 2020-03-24

Family

ID=58222424

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611078316.8A Active CN106454743B (en) 2016-11-29 2016-11-29 Asynchronous acquisition method of geographic position

Country Status (1)

Country Link
CN (1) CN106454743B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110837605A (en) * 2019-10-17 2020-02-25 贝壳技术有限公司 Low-flow consumption quick positioning method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1939757A2 (en) * 2006-12-28 2008-07-02 Group 1 Software, Inc. Universal address parsing system and method
CN103167604A (en) * 2013-03-01 2013-06-19 海南久其云计算科技有限公司 Method and system of mobile communication terminal information report
CN103957502A (en) * 2014-04-04 2014-07-30 小米科技有限责任公司 Location-based service program selecting method, device and terminal
US20150185041A1 (en) * 2013-10-04 2015-07-02 Uber Technologies, Inc. Determining location information using a location data point provided by a computing device
CN104867402A (en) * 2014-02-25 2015-08-26 高德软件有限公司 Offline reverse geocoding method, device thereof and terminal equipment
CN104917895A (en) * 2015-06-09 2015-09-16 小米科技有限责任公司 Positioning system selection method and device and terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1939757A2 (en) * 2006-12-28 2008-07-02 Group 1 Software, Inc. Universal address parsing system and method
CN103167604A (en) * 2013-03-01 2013-06-19 海南久其云计算科技有限公司 Method and system of mobile communication terminal information report
US20150185041A1 (en) * 2013-10-04 2015-07-02 Uber Technologies, Inc. Determining location information using a location data point provided by a computing device
CN104867402A (en) * 2014-02-25 2015-08-26 高德软件有限公司 Offline reverse geocoding method, device thereof and terminal equipment
CN103957502A (en) * 2014-04-04 2014-07-30 小米科技有限责任公司 Location-based service program selecting method, device and terminal
CN104917895A (en) * 2015-06-09 2015-09-16 小米科技有限责任公司 Positioning system selection method and device and terminal

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110837605A (en) * 2019-10-17 2020-02-25 贝壳技术有限公司 Low-flow consumption quick positioning method

Also Published As

Publication number Publication date
CN106454743B (en) 2020-03-24

Similar Documents

Publication Publication Date Title
TWI546519B (en) Method and device for displaying points of interest
RU2606694C1 (en) Method and device for determining electronic card
CN106416313A (en) Identifying an entity associated with wireless network access point
RU2008147401A (en) SYSTEM AND METHOD FOR PROVIDING A VIRTUAL DATABASE ENVIRONMENT AND FORMING DIGITAL CARD INFORMATION
EP1118837A3 (en) Method and system of providing navigation services to portable communication devices
CN105808609A (en) Discrimination method and equipment of point-of-information data redundancy
US20170099629A1 (en) Network search method and apparatus
CN104867402B (en) A kind of method and device thereof and terminal device of offline inverse geocoding
CN111159974A (en) Address information standardization method and device, storage medium and electronic equipment
CN104075712A (en) Interactive type navigation system and method
CN112559663A (en) POI data processing method, device, equipment, storage medium and program product
CN106897432B (en) System and method for crawling landmark information in electronic map
CN106454743A (en) Geographic position asynchronous obtaining method
CN104573083A (en) Automatic map cache service updating method
CN113157214A (en) Remote sensing image display method, device, equipment and storage medium
CN110598131B (en) Method and device for determining user resident area, storage medium and electronic equipment
CN102156866A (en) Road sign recognition system and method
CN111506679B (en) Map element data generation and display method and device, medium and equipment
CN110458715B (en) Risk scoring method, apparatus and computer readable storage medium
CN109815307B (en) Position determination method, apparatus, device, and medium
CN108664572A (en) A kind of Geocoding and system
CN107832441A (en) A kind of method and device for parsing address
CN113015117A (en) User positioning method and device, electronic equipment and storage medium
CN106777063B (en) Layer grading drawing method
CN106507480A (en) Multidimensional fine quasi real time fusion and positioning method and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant