Concept: Download osm data, add to database object, query nearest item

Skip to first unread message

Frank Zeritsch

May 25, 2019, 8:03:15 PM5/25/19
to osmdroid
I'm having a real problem asking the right questions, because I probably don't have the correct concepts in place, so please straighten me out  :-)

1. I'm pretty good with android studio (at least I can figure out most code snippets on the net and can come up with my own)
2. I want to create an app that simply tells me the speed limit of the road I'm currently driving on. and...
3. I will also include nodes for Schools and Playgrounds.
4. I've used Overpass Turbo to create a query that will give me what I need for my city (maxspeed, school, playgrounds) (I can provide exact query if needed)
5  My bbox is large, and creates a file that is 8 MB in size.

I don't actually want to display maps or tiles if I don't have to!

I've already created code that gives me my current location.  I want to do a spatial query against the data points.  want to trigger events when I enter or exit proximity to the nodes,ways, or polygons.

What I need help with:
1. Create proper query, and download data from an osm server
... a. Although I have overpass query, I can't easily find my bbox coordinates.  (I can find lower-bottom, and upper-right lat/lon from a different page on the net, but I'd like to know if there's a different way.
    b. Best way to query Internet and down the file.  I can do other queries to post php, and get results... I suspect I can do an http get.. But Probably a better way exists ...
    c. Take data and add/format/import (I don't know) into a spatial database (I don't know)

2.  And then, compare my current location I get from FusedLocation Provider, about every second, and compare lat/lon against database... Nearest item will trip some code like onEnter: Speak, 'You're speeding!'

I have tried looking through the wiki, butit really feels like a needle in a hay stack when I don't know what a needle looks like!

I'd really appreciate a leg up.  Thanks!

Reply all
Reply to author
0 new messages