latitude-longitude

Pandas Dataframe: join items in range based on their geo coordinates (longitude and latitude)

时光怂恿深爱的人放手 提交于 2019-12-18 13:25:26
问题 I got a dataframe that contains places with their latitude and longitude. Imagine for example cities. df = pd.DataFrame([{'city':"Berlin", 'lat':52.5243700, 'lng':13.4105300}, {'city':"Potsdam", 'lat':52.3988600, 'lng':13.0656600}, {'city':"Hamburg", 'lat':53.5753200, 'lng':10.0153400}]); Now I'm trying to get all cities in a radius around another. Let's say all cities in a distance of 500km from Berlin, 500km from Hamburg and so on. I would do this by duplicating the original dataframe and

Converting Latitude/Longitude values(DMS+Compass Direction format) to corresponding Decimal Point values in Android

北慕城南 提交于 2019-12-18 12:39:12
问题 I am working on an Java android project and have the following issue. I Searched so much but still I have the problem of converting the Latitude/Longitude values that are in DMS format (Eg: 38°2'56''N, 122°9'28''W) for their corresponding Decimal Degrees format. Example values that need to be converted for their corresponding decimal degrees format. 38°49'59''N, 26°56'59''E 38°2'56''N, 122°9'28''W 34°52'58''S, 56°10'58''W Thank you 回答1: All you're doing when you convert DMS to decimal degrees

Tiger/Lines or shapefiles of USA states and cities?

时光毁灭记忆、已成空白 提交于 2019-12-18 12:02:46
问题 i've been asked to generate some demographic reports (crime rates, birth/deaths, etc) based on state and cities for the USA. I have all the demographic data (provided by our client) but can't seem to find any places which have the boundaries (read: LAT/LONG's) of the USA States and their cities. Our data are Lat/Long points of data (eg. a crime, a birth, etc) and we want to get some mapped reports and also datamine using Sql server (we're using MS Sql 2008, but that shouldn't impact this

Clustering Lat/Longs in a Database

☆樱花仙子☆ 提交于 2019-12-18 10:29:40
问题 I'm trying to see if anyone knows how to cluster some Lat/Long results, using a database, to reduce the number of results sent over the wire to the application. There are a number of resources about how to cluster, either on the client side OR in the server (application) side .. but not in the database side :( This is a similar question, asked by a fellow S.O. member. The solutions are server side based (ie. C# code behind). Has anyone had any luck or experience with solving this, but in a

How to get the latitude and longitude of location where user taps on the map in android

假如想象 提交于 2019-12-18 09:27:02
问题 In my Android application, I'm using google maps v2 to show map by getting the latitute and longitude of the device's current location And I'm showing pin on that location. Now when user clicks or taps on any other location on the map, then I have to get that points latitude and longitude and i have to set the pin at that location. Could you please tell me how get the latitude and longitude of the user taps/clicks location. 回答1: An example of what i use. Change it accordingly for your needs.

GPS - Getting the distance,time while running and walking

被刻印的时光 ゝ 提交于 2019-12-18 07:02:53
问题 i have a situation where i need to use GPS technique. i need to find the distance between two points when the person is walking. When the person starts walking he will click on Start button and when he stops he clicks on stop button after this it should show him 1.time taken 2.Distance travelled in Kms. 3.from where to where(places name) eg: a to b Do i need to have google maps for this? I saw the code here link to get the current location which gives me latitude longitude. please help how to

Comparing two LatLng objects in google map v2 android

与世无争的帅哥 提交于 2019-12-18 06:35:22
问题 I have an arraylist which consists of latLong object as shown below: ArrayList < LatLng > latLngList = new ArrayList< LatLng >(); Note: LatLng is an object which has latitude and longitude values in double format i.e., Latitude is in double format and Longitude is in double format The below are the values which are stored in the above latLngList object: Lat Long List:[lat/lng: (34.072516,-118.403609), lat/lng: (34.074227,-118.399248), lat/lng: (34.07304,-118.3995), lat/lng: (34.07304,-118

Using gps get the distance a person has walked

≯℡__Kan透↙ 提交于 2019-12-18 05:16:08
问题 guys i am able to get the current location longitude and Latitude using the below code. I have two buttons Start walking and Stop Walking. Onclick of Start Walking it will get the current location(longitude and Latitude) the person will start walking from A(source) position and walks from some time and comes back to A(now it becomes destination),after that he clicks on stop walking button. Now i need to show the user these details: 1.Distance that he walked in Kms. 2.Time he took in minutes.

How can i send latitude longitude of android device every 15minute to php web service

馋奶兔 提交于 2019-12-18 05:12:14
问题 I want to send every 15minute updated latitude and longitude of android device to php web service. How can i do this? 回答1: Use an AlarmManager that starts a service every 15 minutes. The service should include a class that implements a location listener. follow this link - http://ukgupta.blogspot.com/2011_09_01_archive.html class GpsListener implements LocationListener{ public void onLocationChanged(Location location) { // TODO Auto-generated method stub double latitude = location.getLatitude

locationManager.getLastKnownLocation() return null

久未见 提交于 2019-12-18 04:00:08
问题 i dont understand why locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER); return the location null. I gave all permission but its reutning null . if (isGPSEnabled) { if (location == null) { locationManager.requestLocationUpdates( LocationManager.GPS_PROVIDER, MIN_TIME_BW_UPDATES, MIN_DISTANCE_CHANGE_FOR_UPDATES, this); Log.d("GPS", "GPS Enabled"); if (locationManager != null) { location = locationManager .getLastKnownLocation(LocationManager.GPS_PROVIDER); if (location != null