geolocation

How to put all countries/cities/states of the world into my database?

痴心易碎 提交于 2019-12-21 05:10:16
问题 I have a difficult architectural and web problem. I am trying to make a page about hiking for every city in the world for http://www.comehike.com I have to somehow import all the cities in the world and structure them by state, which is in turn structured by country. I already have a list of countries which I added by hand into the db, then added all the cities of California (there are 300+ if you consider small places), and realized there will be no way for me to do this by hand with

Move a LatLng 5 meters towards another LatLng

我与影子孤独终老i 提交于 2019-12-21 04:42:31
问题 What algorithm/formula can I use to calculate a LatLng point 5 meters closer to another LatLng point? I'm trying to write a function with 2 LatLng parameters and have it return a LatLng that is 5 meters from the first LatLng and in the direction of the second LatLng. 回答1: Have a look at Android Map Utils library, specifically the SphericalUtil class. 1.) Call the method computeHeading to obtain your heading from first to second 2.) Call the method computeOffset to solve for the location 5

IPhone - SQLite distance by Latitude and Longitude

五迷三道 提交于 2019-12-21 04:42:22
问题 I have a embedded database in my app that has all Latitude and Longitude of some interested points and I need to know my distance from these points(get my position using GPS). My problem is: I've just figured out that SQLite can't calculate distance using the query that I have because it doesn't calculate trigonometry functions(SIN, COS...). I was trying to avoid calculating these distances programatically using this query: NSLog(@"SELECT ((ACOS(SIN(%@ * PI() / 180) * SIN(lat * PI() / 180) +

Optimization of a distance calculation function

空扰寡人 提交于 2019-12-21 04:37:23
问题 In my code I have to do a lot of distance calculation between pairs of lat/long values. the code looks like this: double result = Math.Acos(Math.Sin(lat2rad) * Math.Sin(lat1rad) + Math.Cos(lat2rad) * Math.Cos(lat1rad) * Math.Cos(lon2rad - lon1rad)); (lat2rad e.g. is latitude converted to radians). I have identified this function as the performance bottleneck of my application. Is there any way to improve this? (I cannot use look-up tables since the coordinates are varying). I have also looked

How to convert Latitude and longitude to Location name [closed]

泪湿孤枕 提交于 2019-12-21 04:17:29
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . How can I get an address or a locality name from the geo-coordinates (latitude, longitude) using an API in Java? Is there any reverse geocoder available in Java? 来源: https://stackoverflow.com/questions/2025925

Given coordinates, how do I get all the Zip Codes within a 10 mile radius?

和自甴很熟 提交于 2019-12-21 04:06:23
问题 I have a location (latitude & longitude). How can I get a list of zipcodes that are either partially or fully within the 10 mile radius of my location? The solution could be a call to a well known web service (google maps, bing maps, etc...) or a local database solution (the client has sql server 2005) or an algorithm. I have seen the somewhat similar question, but all the answers there pretty much pertain to using SQL Server 2008 geography functionality which is unavailable to me. 回答1:

Geolocation in C#

冷暖自知 提交于 2019-12-21 03:56:25
问题 I'm trying to develop an application that should be something like a game. The user would have some locations in a city and he would have to do something on each location. In order to track the position of the user, I have tried using geolocation with the following code: Geolocator geolocator = new Geolocator(); //geolocator.DesiredAccuracy = Windows.Devices.Geolocation.PositionAccuracy.High; geolocator.DesiredAccuracyInMeters = 50; try { Geoposition geoposition = await geolocator

Computing which points (latitude, longitude) are within a certain distance in mysql?

旧城冷巷雨未停 提交于 2019-12-21 03:13:07
问题 There are two points A, B, and distances x (miles from A), and y (miles from B). Let the distance from A to B be N. So, A is N miles away from B. How do I solve the problem: What are the points available that are (N + x + y) miles away from A? I'm not sure how to explain this any better. I really have no clue on how to attack this problem, I read Fastest Way to Find Distance Between Two Lat/Long Points and I believe the solution given calculates the distance between two points and have no

Using both Mongodb and Mysql in one project

可紊 提交于 2019-12-21 03:00:47
问题 I have been working to learn Mongodb effectively for one week in order to use for my project. In my project, I will store a huge geolocation data and I think Mongodb is the most appropriate to store this information. In addition, speed very important for me and Mongodb responds faster than Mysql. However, I will use some joins for some parts of the project, and I'm not sure whether I store user's information in Mongodb or not. I heard some issues can occur in mongodb during writing process.

Get gps location of a photo

社会主义新天地 提交于 2019-12-21 02:54:16
问题 I know how to get the current GPS location of a mobile phone. I also know how to save the GPS location to the photo when you take it. (Camera option Samsung galaxy s2). But how can I get the GPS location of that photo (later)? When I open the photo on the computer, I can see the GPS location data, but got no idea how to extract them later in android. So could someone put me in the good direction? To make question more clearly: How can I get the GPS location of a photo that is already taken?