Point misplaced at street. Android application with maps. - android

I am developing an application that marks the path taken in real time (on android). Sometimes the gps fails and a point located in a building. Is there any way to fix this? Could I ask google if the marked point corresponds to a building, not the street, sending the location?
Thank you.

You can only partially avoid that, by using the accuracy fields from location. you cannot rotally remove that effect, which is typical for GPS.
It is possible to snap the position to the next road, when you have the vector data of the street (or map). But this is often not a good idea, when you travel by train then the losition will be false corrected to a near road. further if the street you are travelling dors nor exist on the map.

Related

Find a location that far from my by X distance in Google maps Android Studio

I'm currently working on an app in Android Studio and I'm using Google Maps. What I am trying to do is have the user enter a certain distance and I will show him a location that is far from him according to the distance he has chosen. At first I thought about moving on a path or road and seeing if I had reached the desired distance, I could not find how to do it and in general I could not find any solution to what I was looking for. Is there any way to do that?

Android Algorithm Google Direction Check start point and destination point in the polyline

I have a project, it 's a carpooling app that means you can find people who can give you a lift if, in there plan road, they can pick you up and take you to where you want to go.
The problem is about algỏrithm to find a suitable trip match with my start place and destination place, that mean my start place location and destination place location have to be in their road and same direction.
I think about user google map direction to download overview_polyline then I can have a list of latlng to test, but then I have to save the list to firebase data and get them whatever I want to test, that requires a lot of data because latlng points of the road is too many and also too many posts about the trip have to be saved.
if you guys have a better idea for this situation or know some tool, algorithm, API which can solve this problem please show me your answer.
I think you should store the user's navigation route as a polyline(i.e. save it's geometry), maybe in PostGIS because you will have 100's and 1000's of routes to be saved, and then whenever any user queries to find any available car you apply intersection between the user's current location and the saved route in the PostGIS DB.
Hope it helped. :)

Google Map V2 Lib Android, draw active path from GPS update

I don't want to show the route as there is no destination point in our app, so what we want is to show the active path of the user over the map from the starting point to the current point.
Problem: As some time or most of the time the location shown outside the road on which user is traveling, which draws the path outside the roads.
Help me to draw the path on the road as user is driving on the road.
How Google do the same? or is there a way to do so which i am missing or
any algo to correct the path.
That is a very common problem that all GPS devices need to solve.
See http://econym.org.uk/gmap/snap.htm for some examples to snap your location coordinates to a street.

Identify location along .shp routelayer for Android app

I wish to make a simple Android app which displays current location along .shp route layer. I am a total beginner concerning Android app developement. I have this tool in Arcgis, it enables to indentify kilometer value at specific point, from the beginning of the road. The app should use GPS location and from that convert it to road distance and road number. Its a very good tool for reporting accidents or other road events (dead animal, fallen tree).
Where should i start? Maybe there are some tutorials? Is this app reasonable and doable?
Thank you in advance

How do I find the point on a google map that's closest to me?

I am writing an Android-application that is supposed to download a bunch of addresses from my SQL-server, reverse geocode them, compare them all to my current location and return the one that is closest to me, not geometrically, but the one that I am the shortest driving distance from.
I have managed to get the reversed geocoding to work, but when I run my program a few times, I hit the OVER_QUERY_LIMIT on google. Needless to say, there are quite a few addresses in my database.
I understand that I could do this the quick and dirty way and just see which address is nearest to me by comparing the latitude and longitude of my current position and that of my addresses as opposed to comparing it to the actual driving distance. The problem with this is that this application will be used in a region where there are quite a lot of lakes to drive around and using that method will likely return quite a few stupid results.
How can I keep this from happening over and over? Can I present google with a view of all my addresses and just do a comparison once? I really need help with this one.
Actually, you will have to query a routing service (not necessarily Google Maps, to my knowledge also Cloudmade provides you with routing; there definitely are more) to get driving directions to each of the Points Of Interest around you and then select the closest one. This is a very bad practice, as you are very limited with the request amount.
According to the Google Maps API TOS (paragraph 10.1.3) you are not always allowed to do that.
What I did in a similar case was to store the coordinates for all POI, and look up the closest ones just by range of lat/lng.

Categories

Resources