I'am new in android development my problem is.
I have to find nearby coordinates from a data in a given radius in android.
For example when i click a button. It will search nearby coordinates listed in an array or in a database.
Example: My current coordinates is 1.1
Nearby coordinates will show : 1.2,1.3,1.4,1.5 which is stored or from my database/array.
Is this possible? Can someone help me. Any answer is really appreciated.
Thanks!
One approach is to simply use a geographical distance function.
Have a look at: http://www.movable-type.co.uk/scripts/latlong.html
This will give you some background information on what you are trying to do. I've used this website many times during work with UAVs. Also, keep in mind that you might need to convert to/from Deg/Min/Sec Lat & Longitude <-> decimal Latitude/Longitude.
Find the method for calculating distance - and there are many coded examples already out there - and then run each of your target points through it to find out how far each is from you.
Good luck!
Related
I would like to create a circular route from distance. First, I get current position, and then create a circular route based on the specified distance. But I don't know how to achieve this at all. I couldn't find any helpful methods in Google Maps API.
Is there any way to achieve this?
It sounds like you want to draw a Circle on a map, and based on your tags you might want to use the Maps SDK for Android. Here's the documentation for creating Circles on a Google Map for Android. https://developers.google.com/maps/documentation/android-sdk/shapes
If you want a polygon of exact points on roads based on distance from a center point, you might be looking for an Isodistance. Here is some open source code in JavaScript for building an isodistance polygon. You would use the same strategy in Java to do this in the Maps SDK for Android. https://github.com/dugwood/isochrone-isodistance-with-google-maps
I encountered a problem and failed to find a solution up until now:
Google´s Maps API uses Lat/Long coordinates to find a certain location.
I´m currently trying to write an app which displays a location after entering coordinates. The problem is the typ of coords I get:
Our Rescue Coordination Center only provids coords in SwissGrid(ch1903) e.g. 4416984.21 / 5392873.07.
Do you know a work-around or a solution to use these coords with the Anroid GM API.
Thanks and greetings from Germany.
You can convert SwissGrid(ch1903) to Lat/Lang.. This like might be useful
How would someone attempt to track the distance the user has walked as they are walking- displaying the distance in a text view and updating it accordingly?
It feels confusing looking at all the options there appears to be - Android's Location API and Google's Location Services API to name but two. I've looked through some code that has implemented somewhat similar concepts but I want to understand and know where to start.
Thanks
I need to calculate the new direction relative to the previous one at every GPS update by using coordinates. The only thing which is important here is left or right.
First I tried doing this by using the heading only, by just looking at the new heading if it was more to the west or east relative to the previous heading.
But after getting past 0 or 360 degrees point, problems occurred. This also did not seem like a very robust solution.
After 3 GPS updates there is always an array available of the latest 3 GPS coordinates.
The following coordinates should all show left, since it is on a roundabout:
58.70265614,12.45208851
58.70266725,12.45198338
58.7026786,12.4518954
58.70267177,12.45180805
58.70264375,12.45171462
58.70259777,12.45164779
58.70254734,12.45163389
58.7025029,12.45167082
58.70246575,12.45173065
58.70245399,12.45182545
58.7024728,12.45192582
58.70251695,12.45201489
58.70256638,12.45205355
58.70261456,12.45204386
58.70265059,12.45198956
58.70266192,12.45188943
I have difficulties looking at coordinates and see them as or convert them to Points or Vectors, and use this as the base to do calculations.
I did look into similar topics in C++ and C#, but I could not get it translated into my problem.
Also I don't need the complete solution. Pseudo code should be enough as long as the math is there. :)
Thank you for your time!
I am using eclipse with the adk android plugin and I am completely lost
That would depend on what do you mean by displaying their location:
Relative to each other on a blank screen.
Read up on distance calculation in coordinates and draw the locations relative to their distance from each other.
On a map, each one separately from the other or together.
Use a web/binary API for map display like Google Maps (don't want to spam and post links with my reputation), or write your app to display Open map data from sources like OpenStreetMap.
On a satellite/aerial images.
Pretty much the same as #3 just you have less options to investigate and try.
If you were a bit clearer in your question, I could have been more specific with the answers, if you edit your question and clarify more, I could be more specific.