Streetcomplete: Make getting the country for GPS pos more performant

Created on 24 Jan 2018  路  6Comments  路  Source: westnordost/StreetComplete

Getting a country for a given set of GPS coordinates is quite heavy on the CPU because it's a point-in-polygon-check for quite some big polygons.

Most helpful comment

Finally got this off my todo list.

In the last 2 weeks, I worked on this: https://github.com/westnordost/countryboundaries

All 6 comments

(Would make it possible to make the country-blacklist/whitelist more precise as well)

https://stackoverflow.com/questions/3659809/where-am-i-get-country#19415296

Variant listed there:

  • get via SIM (getNetworkCountryIso)
  • via IP (as the online service) using an ip database as flagfox

Where a point is, not where you yourself are. Don't worry, I do know exactly what to do.

Success! (AddMaxSpeed is disabled in US, but not in Mexico)

device-2018-03-18-204524

Finally got this off my todo list.

In the last 2 weeks, I worked on this: https://github.com/westnordost/countryboundaries

Awesome! 馃帀

Was this page helpful?
0 / 5 - 0 ratings

Related issues

RubenKelevra picture RubenKelevra  路  4Comments

cascafico picture cascafico  路  4Comments

nmxcgeo picture nmxcgeo  路  3Comments

westnordost picture westnordost  路  3Comments

matkoniecz picture matkoniecz  路  3Comments