hi friends in my gps application i did convert Geo point to pixels. i have two geo points so i convert this both of two points to pixels now i take different of this both pixels points and i want to convert this difference to kilometers
i want to convert google map pixels to kilometers
2.5k Views Asked by sam_k At
1
There are 1 best solutions below
Related Questions in ANDROID
- Delay in loading Html Page(WebView) from assets folder in real android device
- MPAndroidChart method setWordWrapEnabled() not found
- Designing a 'new post' android activity
- Android :EditText inside ListView always update first item in the listview
- Android: Transferring Data via ContentIntent
- Wrong xml being inflated android
- AsyncTask Class
- Unable to receive extras in Android Intent
- Website zoomed out on Android default browser
- Square FloatingActionButton with Android Design Library
- Google Maps API Re-size
- Push toolbar content below statusbar
- Android FragmentPagerAdapter Circular listview
- Layout not shifting up when keyboard is open
- auDIO_OUTPUT_FLAG_FAST denied by client can't connect to localhost
Related Questions in GEOPOSITIONING
- From double to geopoint remove me the ,
- How do you confirm the source of GPS data from photographic EXIF?
- Different imagine quality and positioning among different browsers
- How to know if user's geo-position is close to a certain position?
- Getting altitude tapping on a place of the map
- i'm trying to get the placename using the geocoding api but it doesn't work it says placename is null
- How to allow geopositing in Intellij Idea and apply chrome flags "unsafely-treat-insecure-origin-as-secure"
- Implementation of position determination function
- Major cites in the world with latitude and longitude?
- i want to convert google map pixels to kilometers
- Windows Phone 8.1 - Geoposition.Coordinate.Speed.Value vs Geoposition.Coordinate.Speed
- Javascript leafletjs get user position for distance calc
- identify vehicle direction using Steering angle
- Alignment of ARCore with GPS
- How to calculate angle between two Geolocations?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I wouldn't recommend using the view pixels to do distance calculation. If you have the geo points, you should use those. It all comes down to some geodetic calculation. And the accuracy depends on how you model the earth. What you want is to use geodetic great circle lines to perform distance calculations.
If you model the earth as a sphere (using law of cosines):
I would also recommend looking into the Haversine formula, which is numerically more stable. Using the haversine formula, the angle calculated in the previous code would be:
If you want increased accuracy (for large distances), you should consider modeling the earth as an ellipsoid, though the calculations for this are considerably harder.
EDIT: Also note that the above only holds if you give longitude and latitude in radians. So you'll have to make that conversion first too.