latitude-longitude

Is there a way to divide a map into square grids and retrieve latitude/longitude information from there? [closed]

≡放荡痞女 提交于 2019-12-04 22:39:44
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I have a map of a specific area and I need to determine whether a given location -with lat-lon coordinates- falls into any grid that covers this map. I decided to divide the map of the area I was given into 1 km x 1 km square grids using Google Earth -enabling the square grids using CTRL+L and zooming to the

PHP Latitude Longitude to Address

一曲冷凌霜 提交于 2019-12-04 22:37:57
I have a form on my website where a user enters an address of a place. When they submit the form, I convert this location into latitude/longitude and store this in a MySQL Database. I am using Google's Geocode service for this conversion. The problem is that I can't find either a class or a service to convert that latitude/longitude back to an address and as far as I know, Google's Geocode service is a unidirectional conversion. I realize I could store the physical address in the database, but over time this is wasted space when it could be stored in a simpler format. Does anybody know of

getting current location longitude and latitude in android

半世苍凉 提交于 2019-12-04 19:32:28
THis is my location class with this i am getting location longitude and latitude, but my problem is if i change my current location the longitude and latitude values are not updating. if i store my home location in my device, then my app is taking every time the same longitude and latitude values it is not taking my current location details. ex: I was in new york today and I launched a app and the location was my home in new jersey. public class GetLocation extends Activity { protected LocationManager locationManager; protected Button retrieveLocationButton; Context mContext; Double Longitude,

Get latitude and longitude points along a line between two points, by percentage

馋奶兔 提交于 2019-12-04 19:29:23
In the image below, you can see that there 3 lines drawn from one point (the black circle) to its 3 related points (). IMAGE QUESTION How to calculate latitude and longitude point between points along each line, using a percentage of the distance between the two points? For example, if I wanted to get the position to be able to draw additional circles along each line with a 20% difference? WHAT CODE I HAVE NOW var data = [ { "coords" : [ 53.409045, -2.985406 ]}, { "coords" : [ 53.408747, -2.982862 ]}, { "coords" : [ 53.407630, -2.984136 ]}, { "coords" : [ 53.407142, -2.986931 ]} ]; var pointA

Google heatmap plotting with wrong gradient based on weight

时光总嘲笑我的痴心妄想 提交于 2019-12-04 18:57:31
I was having some problem with Google Heatmap. The result that I am getting as such: The following as the code for me to populate the array for heatmap, I declared the heatmapData as global array so that I can be used in some other function: var heatmapData = []; function addForecastMarker(marker){ // code to plot marker here heatmapData.push({location: new google.maps.LatLng(marker['lat'], marker['lng']), weight: marker['total'].toFixed(2)}); } When I tried to print out the above data to ensure I am retriving the correct data, I am getting these which mean my population for heatmapData is no

How to get the current Location name as a string , when we know the latitude and longitude [duplicate]

喜你入骨 提交于 2019-12-04 18:11:05
Possible Duplicate: How to retrieve user's current city name? using the following methods i am getting latitude and longitude of the current position - (void)viewDidLoad { [super viewDidLoad]; locationManager = [[CLLocationManager alloc] init]; locationManager.delegate = self; locationManager.distanceFilter = kCLDistanceFilterNone; // whenever we move locationManager.desiredAccuracy = kCLLocationAccuracyHundredMeters; // 100 m [locationManager startUpdatingLocation]; } - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *

Return Nearest Place available to Users location using Latitude-Longitude?

↘锁芯ラ 提交于 2019-12-04 18:05:23
I want to implement Nearest Place available to User algorithm in Java or MySQL. I have Stations table in MySQL database which has around 100K records of Stations with Latitude and Longitude . If User gives his latitude and longitude as x and y, then I want to return nearest stations available from User's location. So please suggest me any algorithm available in Java or MySQL . I tried with the following query, but it seems slower in performance - SELECT *,3956*2*ASIN(SQRT(POWER(SIN((user_lat-abs(st.station_lat))*pi()/180/2 ), 2) + COS(user_lat*pi()/180)*COS(abs(st.station_lat) *pi()/180)*POWER

EF5, SQL Server, Longitude and Latitude

安稳与你 提交于 2019-12-04 17:39:35
问题 I found that the best type to store lat and long in SQL Server is decimal (9,6) (ref. What datatype to use when storing latitude and longitude data in SQL databases?) and so I did AddColumn("dbo.Table", "Latitude", c => c.Decimal(nullable: false, precision: 9, scale: 6)); AddColumn("dbo.Table", "Longitude", c => c.Decimal(nullable: false, precision: 9, scale: 6)); SQL seems ok, everything is working, BUT when I insert / update a value, i.e. lat = 44.5912853 it is saved like this: 44.590000 I

how do I cluster a list of geographic points by distance?

扶醉桌前 提交于 2019-12-04 14:03:37
I have a list of points P=[p1,...pN] where pi=(latitudeI,longitudeI). Using Python 3, I would like to find a smallest set of clusters (disjoint subsets of P) such that every member of a cluster is within 20km of every other member in the cluster. Distance between two points is computed using the Vincenty method . To make this a little more concrete, suppose I have a set of points such as from numpy import * points = array([[33. , 41. ], [33.9693, 41.3923], [33.6074, 41.277 ], [34.4823, 41.919 ], [34.3702, 41.1424], [34.3931, 41.078 ], [34.2377, 41.0576], [34.2395, 41.0211], [34.4443, 41.3499],

Calculate lat/long coords a specific distance away from another pair of lat/long coords [duplicate]

↘锁芯ラ 提交于 2019-12-04 13:45:46
This question already has an answer here: Moving a CLLocation by x meters 10 answers My app needs to be able to get the user starting location and then calculate lat/long coords specific distances away from that spot (in all directions). Does anyone know how I might accomplish this? Morgan Chen The set of points a fixed distance from a central point has infinite members, so it's not possible to list out every one. However, given a single point you could check if it is within the set by using the distanceFromLocation: method. Mathematically, given a radius coordinate (long, lat) and assuming