Navigating in China

138 views
Skip to first unread message

Kevin Bogle

unread,
Dec 3, 2019, 7:08:41 PM12/3/19
to Osmand
Today I created a map for China in Ride with GPS and uploaded it to OsmAnd. Same problem with other navigation apps.

The route is off course from the beginning. I can see it on the map as an overlay but it does not snap to the road/route.

I know this has to do with using non Chinese apps for routing in China.

Does anyone know if there is a solution to this problem?

Kevin

Bart Eisenberg

unread,
Dec 4, 2019, 1:11:29 AM12/4/19
to Osmand
What happens if you go to the Options button in the directions menu and enable Calculate route between points? (I'm assuming here you've uploaded not a map, but a GPX route).  

Kevin Bogle

unread,
Dec 4, 2019, 11:26:53 AM12/4/19
to osm...@googlegroups.com
thanks for the suggestion Bart. 

this seems to be an old problem because of different gps systems.

I did upload the map of china and enabling a route between points works but it doesn't give me what i want. it calculates it's own route. 
i built a tour of the Yangtze river from Shanghai to the point where it breaks up into to two feeder routes near Cuiping/Yibin. would like to do it next year but without a proper build not so sure. wanted to follow the river as closely as possible

kevin

--
You received this message because you are subscribed to the Google Groups "Osmand" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osmand+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osmand/46b1c2b4-00d8-4c5c-9b88-e6f703d57b93%40googlegroups.com.


--

Life on the earth is a fluke of the Milky Way



Bart Eisenberg

unread,
Dec 4, 2019, 11:53:10 AM12/4/19
to Osmand
From what I've seen, the problem is as you describe.  If you try to navigate a GPX from another source, OsmAnd will follow the GPX itself with no regards to the underlying map.  If you enable "Calculate route between points, it will follow the map, but not necessarily duplicate the GPX route.  I have yet to see a perfect solution to this.  You could just show the GPX and follow it best you can.  Or you can use my (imperfect) method: https://youtu.be/mMcw4kYmfPk  

It seems that the only sure way to do true turn-by-turn navigation on OsmAnd is to create the route in OsmAnd.

n Wednesday, December 4, 2019 at 8:26:53 AM UTC-8, Kevin wrote:
thanks for the suggestion Bart. 

this seems to be an old problem because of different gps systems.

I did upload the map of china and enabling a route between points works but it doesn't give me what i want. it calculates it's own route. 
i built a tour of the Yangtze river from Shanghai to the point where it breaks up into to two feeder routes near Cuiping/Yibin. would like to do it next year but without a proper build not so sure. wanted to follow the river as closely as possible

kevin

On Tue, Dec 3, 2019 at 10:11 PM Bart Eisenberg <bartei...@gmail.com> wrote:
What happens if you go to the Options button in the directions menu and enable Calculate route between points? (I'm assuming here you've uploaded not a map, but a GPX route).  

On Tuesday, December 3, 2019 at 4:08:41 PM UTC-8, Kevin wrote:
Today I created a map for China in Ride with GPS and uploaded it to OsmAnd. Same problem with other navigation apps.

The route is off course from the beginning. I can see it on the map as an overlay but it does not snap to the road/route.

I know this has to do with using non Chinese apps for routing in China.

Does anyone know if there is a solution to this problem?

Kevin

--
You received this message because you are subscribed to the Google Groups "Osmand" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osm...@googlegroups.com.

Kevin Bogle

unread,
Dec 4, 2019, 1:07:17 PM12/4/19
to osm...@googlegroups.com
Yes, I would like to create the route in OsmAnd but I nearly burned my eyes out yesterday looking at my smartphone. To bad it's not possible to create the routes on a desktop. I'll look at your solution. thanks for your help.

I might take a stab at trying to create the route on Baidu. I tried 行者, another cycling app, smartphone only, but gave up in despair.

I'll let you know how it goes, if it goes.

K

To unsubscribe from this group and stop receiving emails from it, send an email to osmand+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osmand/dbc15227-0f31-40a3-bbc5-522ba79ee621%40googlegroups.com.

Grzegorz Adamiak

unread,
Dec 6, 2019, 9:50:59 AM12/6/19
to 'Xavier' via Osmand
The difference in route calculated by Osmand vs. an other source lies in routing engine being used and its settings (in case of a recorded track it's obvious, it's the exact path someone took). When following a gpx track the navigation is not full featured (as shown on Bart's video). To get a full featured one, Osmand needs to calculate the route. Now, to get the result best matching external source, you need as many waypoints as possible, so Osmand has no (or almost) choice for routing. Some sources provide such options e.g. Kurviger can export additional waypoints and a tack at the same time.

If that's not available, you might want to add waypoints to imported track manually in Osmand to fix the biggest deviations, let it make the route and start navigation, while displaying the imported track. Of course, you'd need to adjust the settings in Osmand to match those from external source, esp. for things like paved/upaved roads or the base profile. That way you can follow the imported track "manually" and let Osmand recalculate on each deviation you make from calculated track to follow the imported one. Sounds complicated but is quite easy given you placed waypoints in correct places, and works quite well.

Hope that helps :)

Kevin Bogle

unread,
Dec 6, 2019, 11:03:35 AM12/6/19
to osm...@googlegroups.com
You are correct. It does sound complicated and I'm not sure it is a work around for creating and following a route in 
China. Everything I've tried so far has not worked and points to the difference in GPS systems. Most of the world follows 
the US system whereas China has their own an the two don't match.

Thanks for your great effort to help.

Grzegorz Adamiak

unread,
Dec 7, 2019, 8:36:00 AM12/7/19
to 'Xavier' via Osmand
Out of curiosity, can you share the gpx file and possibly the source route i.e. the one you created online as I understand (if the online service has such an option)?

Kevin Bogle

unread,
Dec 7, 2019, 12:58:55 PM12/7/19
to osm...@googlegroups.com
This link is from Ride with GPS. Not sure that it will work because I did not create or ride this route yet I'm trying to share it with you. If I try to copy and paste the link from a saved link it won't work, it only allows for sharing directly from the app.


 

Bart Eisenberg

unread,
Dec 7, 2019, 6:42:23 PM12/7/19
to Osmand
What about using the "Ride with GPS " app? 

On Saturday, December 7, 2019 at 9:58:55 AM UTC-8, Kevin wrote:
This link is from Ride with GPS. Not sure that it will work because I did not create or ride this route yet I'm trying to share it with you. If I try to copy and paste the link from a saved link it won't work, it only allows for sharing directly from the app.


 

On Sat, Dec 7, 2019 at 5:35 AM Grzegorz Adamiak <grzegor...@gmail.com> wrote:
Out of curiosity, can you share the gpx file and possibly the source route i.e. the one you created online as I understand (if the online service has such an option)?

pt., 6 gru 2019 o 17:03 Kevin Bogle <bogvi...@gmail.com> napisał(a):
You are correct. It does sound complicated and I'm not sure it is a work around for creating and following a route in 
China. Everything I've tried so far has not worked and points to the difference in GPS systems. Most of the world follows 
the US system whereas China has their own an the two don't match.

Thanks for your great effort to help.



--

Life on the earth is a fluke of the Milky Way



--
You received this message because you are subscribed to the Google Groups "Osmand" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osm...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Osmand" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osm...@googlegroups.com.


--

Life on the earth is a fluke of the Milky Way



--
You received this message because you are subscribed to the Google Groups "Osmand" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osm...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Osmand" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osm...@googlegroups.com.

Kevin Bogle

unread,
Dec 7, 2019, 6:50:59 PM12/7/19
to osm...@googlegroups.com
Thanks for the suggestion. Trust me I've tried everything, I use Ride with GPS for all my rides including 26 days in Taiwan last year. It's not that I cannot map roads/rides for China on RwGPS it's that they don't follow the roads. They are all offset sideways and backwards or forward by about 200 yards. It's fine, I guess I could keep my eyes glued to the screen and try to estimate where I am but I'm still looking for a better way.

To unsubscribe from this group and stop receiving emails from it, send an email to osmand+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osmand/943058e1-6f95-421d-9e04-91c201e14443%40googlegroups.com.

Bart Eisenberg

unread,
Dec 7, 2019, 11:05:43 PM12/7/19
to Osmand
Wow.  When the service that produced the GPX can't follow the GPX, that's a problem. 

I haven't imported this route to OsmAnd, but just looking at it, I can see where OsmAnd's routing algorithm would take you on a different route: OsmAnd is looking for a direct route; the GPX is suggesting a more bicycle-friendly one.  Ideally, OsmAnd would "snap" the GPX to the underlying map. But it doesn't. The developers say that would be a difficult feature to implement. 

Kevin Bogle

unread,
Dec 7, 2019, 11:38:35 PM12/7/19
to osm...@googlegroups.com
Thanks for your understanding. Now you see the problem. It's not just a difficult problem for OsmAnd to overcome, it's a matter of using the Chinese GPS satellite system. That cannot be overcome and why would they try, the Chinese already have a system that works for them. Hardly any non-Chinese people much less cyclists go there to ride/navigate.

The only two solutions I have found if you can call them that are Baidu and it's off-shoot Xingzhe. Xingzhe was built by cyclists for cyclists and so I struggle to break into it (legally) and create my own maps so that I can ride where ever I want in that country with accuracy. It's still very inflexible but as the demand grows so should the usefulness.

To unsubscribe from this group and stop receiving emails from it, send an email to osmand+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osmand/f703920c-4f7b-4fbc-a1c3-585d1a0f2fd2%40googlegroups.com.

Greg Troxel

unread,
Dec 8, 2019, 9:57:37 AM12/8/19
to Kevin Bogle, osm...@googlegroups.com
Kevin Bogle <bogvi...@gmail.com> writes:

> Thanks for your understanding. Now you see the problem. It's not just a
> difficult problem for OsmAnd to overcome, it's a matter of using the
> Chinese GPS satellite system.

For those reading in the archives:

"Chinese GPS satellite system" is not the right description. There is a
Chinese GNSS (not GPS!) called Beidou

https://en.m.wikipedia.org/wiki/BeiDou

but that's not the issue. The datum of BeiDou is quite conventional
within the world of GNSS, more or less matching ITRF97 and WGS84.

https://www.nap.edu/read/13292/chapter/10#84

The issue is a datum GCJ-02 with intentional distortions:

https://en.wikipedia.org/wiki/Restrictions_on_geographic_data_in_China#Coordinate_systems

Basically, maps are published with incorrect coordinates, and using
incorrect coordinates with OsmAnd and openstreetmap data doesn't work
very well.

CP

unread,
Dec 8, 2019, 3:40:49 PM12/8/19
to osm...@googlegroups.com

Op 08-12-2019 om 15:57 schreef Greg Troxel:
The issue is a datum GCJ-02 with intentional distortions:
  https://en.wikipedia.org/wiki/Restrictions_on_geographic_data_in_China#Coordinate_systems

Basically, maps are published with incorrect coordinates, and using
incorrect coordinates with OsmAnd and openstreetmap data doesn't work
very well.

This argument makes a lot of sense. I didn't want to crash the party with just my opinion. But I had a difficult time following the reasoning of the OP.
I don't know if the  China maps from
OsmAnd also have this aberration? Possibly so. In that case it could help to generate the China map yourself.  Also, I've always had success with the routes created on Kurviger and downloaded to my phone to use in OsmAnd.

-CP

Grzegorz Adamiak

unread,
Dec 9, 2019, 4:18:16 AM12/9/19
to 'Xavier' via Osmand

I don't know if the  China maps from OsmAnd also have this aberration? Possibly so. In that case it could help to generate the China map yourself.

Why would it? My expectation OSM for China, or all regions in general, is produced with same tools and workflows, hence results should be the same. Unless, of course, a distorted positioning is at the source, which Beidu is AFAIU. But GPS is working the same round the globe, so in China it should render the same accuracy as elsewhere. Or am I wrong?
 
Also, I've always had success with the routes created on Kurviger and downloaded to my phone to use in OsmAnd.

That's exactly what I do for my rides. It works like a charm. Most usually I navigate by the track, but for Osmand calculated route, I tend to export also a route with additional waypoints.

I did import the route shared by Kevin and it displayed correctly in my Osmand AFAICT. It could be navigated by it, which has some shortcomings compared to Osmand calculated route, but works reliably. As Bert mentioned earlier, the track is not snapped to underlying road, which is in purpose, and voice navigation may be a bit annoying. I usually switch it off for onroad riding, but have it on for offroad. There's too much to observe on the ground offroad to look at the screen when riding :)

Anyway, this RwGPS service has an option to export cues (a paid feature) and a route (free) based on cues. Although cues are not that useful as waypoints they can be used to calculate the route in Osmand. I found that they are misplaced though, which makes Osmand calculate this particular route to be ~100 km longer. If you look into it closer, you'll notice a lot of circles and turnarounds. Another thing is the routing engine used, As mentioned by Bert, you might get a better result with bike profile and tuning it a bit with riding preference.

If navigating a track is not acceptable and you really want Osmand to calculate the route you'd need to do some homework. I'd start with the track, add cues to it manually as waypoints (gpx is a text file) and tune them (delete, move) to get a close result while using a relevant navigation profile. You might also import the track into other service like Kurviger or GPSvisualizer to make the work more comfortable. At the end what you need is a route for Osmand to calculate based on waypoints.

CP

unread,
Dec 9, 2019, 1:39:02 PM12/9/19
to osm...@googlegroups.com
Op 09-12-2019 om 10:17 schreef Grzegorz Adamiak:


I don't know if the  China maps from OsmAnd also have this aberration? Possibly so. In that case it could help to generate the China map yourself.

Why would it? My expectation OSM for China, or all regions in general, is produced with same tools and workflows, hence results should be the same. Unless, of course, a distorted positioning is at the source, which Beidu is AFAIU. But GPS is working the same round the globe, so in China it should render the same accuracy as elsewhere. Or am I wrong?

Hmmm.... I was happily typing away in a "type-before-you-think"  mode. When I got corrected by a related Wiki page, which says:

"This seems to outlaw the entire OSM project and any participation or contribution."

The bottom line: In China you are bound to use maps with the GCJ-02 aberration included. This means that unless you use a routing engine with the official algorithm supporting GJC-02, you're screwed. Standard WGS-84 tools will not work.
Unless you want to risk illegal activities such as "fixing" the flawed algorithm as explained here: https://en.wikipedia.org/wiki/Restrictions_on_geographic_data_in_China#Reverse_transformation.
But given China's reputation on human rights, I would only give that advice to my worst enemies.

CP


Grzegorz Adamiak

unread,
Dec 10, 2019, 3:32:42 AM12/10/19
to 'Xavier' via Osmand
Hmmm.... I was happily typing away in a "type-before-you-think"  mode. When I got corrected by a related Wiki page, which says:

"This seems to outlaw the entire OSM project and any participation or contribution."
Effectively that means you are not allowed to record a gps track on your device in China as it falls under the mapping activity. Is it legal to use gps enabled device for navigation at all?

CP

unread,
Dec 10, 2019, 2:24:31 PM12/10/19
to osm...@googlegroups.com


Op 10-12-2019 om 09:32 schreef Grzegorz Adamiak:

"This seems to outlaw the entire OSM project and any participation or contribution."
Effectively that means you are not allowed to record a gps track on your device in China as it falls under the mapping activity. Is it legal to use gps enabled device for navigation at all?

According to the various bits: Yes. As long as you use the GCJ-02 aberration in both the maps as well as the software. Then you never get the accurate position, while you're still able to navigate correctly.
I assume this means you should probably buy a local navigation device to have this ensured.

CP

Bill Leuze

unread,
Mar 14, 2020, 3:42:19 PM3/14/20
to OsmAnd
I just found this discussion while looking for something else.

I have been back in North america for 3 years now but before that I was in China for 2 years. I did a lot of travel by motorbike which would have been totally impossible without gps. What I actually had the most luck with was a custom compiled version of OSMAnd that someone had created which included a correction for the intentional distortion of GPS in China. \\I will have to look to see if I still have the information on where to find that custom compile. It was fantastic. It just worked. I could even choose to overlay google maps. I could also overlay baidu map. That meant If I had to ask a chinese person to show me where something is, I could change overlay to Baidu map so they could read it, get him to put a pin where I needed to go, then I switch back to OSM map so I could read it.

I will post back here if I find that wonderful old version of OSMAnd
Reply all
Reply to author
Forward
0 new messages