Android Question Questions: B4A Class - Open Street Map viewer - GPS

Harris

Expert
Licensed User
Longtime User
BTW, Great job with this!
I am working on a project for my trucker buddies in Alaska - who deal with pretty extreme weather / road conditions (winter mostly).
I have a database of all the hi-ways / roads in Alaska - along with ALL the Mile Posts (lat / lon) for each.
In a loop, I feed these locations to the map (for each zoom level - 10 to 17) which generates (downloads) each tile and saves them to the tiles.db3.
Right now, my DB is over 1.5 GB in size!

I wrote an app that will MOCK the locations using the new FusedProviderClientGMS.

Question 1.
OSM class uses GPS currently. I would like to use FPC_GMS exclusively. I should be able to work this out, but any tips grateful.

Question 2.
What is the meaning of the structure for the t_tiles table in tiles.db3 (how does the map figure out what records to use each time)?

Question 3.
I guess this is rather obvious, but how can I define a few major roads and load them into a separate DB table, to reduce the size (from 1.5 GB down to a couple of MB)?
One way is to empty the t_tiles, drive the few roads with the MOCK app - then name, save and copy the DB to a different location for distribution.

Any advise gratefully accepted from you geniuses out here in B4X land.

Harris
 

AHilton

Active Member
Licensed User
Longtime User
"I have a database of all the hi-ways / roads in Alaska - along with ALL the Mile Posts (lat / lon) for each."

Where or How did you get this?
 
Upvote 0

Harris

Expert
Licensed User
Longtime User
"I have a database of all the hi-ways / roads in Alaska - along with ALL the Mile Posts (lat / lon) for each."

Where or How did you get this?
Good question....
The AK DOT mapped all these points out.
They provide such on their website. https://data-soa-akdot.opendata.arcgis.com/datasets/0415461584a349e5b9a772c1835ebe75_0/explore

A friend led me to the main page and it took some digging to get to this.
Downloaded the CSV, imported to MySQL and created the SQLlite DB with table.

I have been asking for this data for years, and now I can create the project with such data. I don't live in AK, Kamloops BC is where I reside.
Without such data, the only other way is to DRIVE each road and tag mile posts (with an app) manually...

I shall post the completed app when done. It's pretty funcky...
 
Upvote 0

AHilton

Active Member
Licensed User
Longtime User
Good question....
The AK DOT mapped all these points out.
They provide such on their website. https://data-soa-akdot.opendata.arcgis.com/datasets/0415461584a349e5b9a772c1835ebe75_0/explore

A friend led me to the main page and it took some digging to get to this.
Downloaded the CSV, imported to MySQL and created the SQLlite DB with table.

I have been asking for this data for years, and now I can create the project with such data. I don't live in AK, Kamloops BC is where I reside.
Without such data, the only other way is to DRIVE each road and tag mile posts (with an app) manually...

I shall post the completed app when done. It's pretty funcky...

Wonderful for AK to make this available. Thanks for the link! I've been trying for the better part of a decade to get the same/similar for any lower 48 State. How accurate do you think it is? The GPS data, I mean.

I've been using overlapping (multiple known routes) ELD data (returning GPS coords among other things) in order to try to nail down roads without having to do expensive and poor quality API lookups for a transportation-focused tech company client. A State like Wyoming isn't too bad. The Northeast USA is just a mess.

Unfortunately, I don't have an answer to your questions. I've only used OSM in a website configuration; feeding its' API data.

Really enjoy the BC area. Been looking to do some poking around the Bella Bella region some day.
 
Upvote 0

Harris

Expert
Licensed User
Longtime User
Unfortunately, I don't have an answer to your questions. I've only used OSM in a website configuration; feeding its' API data.
That's too bad. Perhaps others can...

How accurate do you think it is? The GPS data, I mean.
It's bang on (100%). Right down the middle of the road points are following (6 to 8 lat / lon decimal points - fine tuned), at every zoom level - which is pretty amazing.
This, in turn, implies the map tiles are very accurate as well.
Mapping has come along way in the past few years - as has B4X (and smart contributors).
It is such a pleasure being here developing complex systems, for all platforms (web, android and iOS), with minimal effort.
I pity the poor foo's who struggle in other dev environments.
It does NOT get any easier than this - and it WORKS - 99.9% of the time.
And when it breaks - someone will show you how to fix it (where you went wrong). That ups the level to 100%....
 
Last edited:
Upvote 0
Top