geolocation

Detecting geographic clusters

给你一囗甜甜゛ 提交于 2019-12-02 18:39:54
I have a R data.frame containing longitude, latitude which spans over the entire USA map. When X number of entries are all within a small geographic region of say a few degrees longitude & a few degrees latitude, I want to be able to detect this and then have my program then return the coordinates for the geographic bounding box. Is there a Python or R CRAN package that already does this? If not, how would I go about ascertaining this information? I was able to combine Joran's answer along with Dan H's comment. This is an example ouput: The python code emits functions for R: map() and rect().

Querying for things near a geolocation?

£可爱£侵袭症+ 提交于 2019-12-02 18:37:42
I have a query that attempts to find things within a certain geolocation, but the results that it brings back are a little bit... strange. I had previously posted this thread and the community helped me find a formula that I needed: Querying within longitude and latitude in MySQL but the query now gives really wacky results. My data is surrounding the city of San Francisco which has the lat/lng 37.780182 , -122.517349 Query: SELECT id, hike_title, lat, lng, ( 3959 * acos( cos( radians(37) ) * cos( radians( lat ) ) * cos( radians( lng ) - radians(37.780182) ) + sin( radians(-122.517349) ) * sin

Intent for Google Maps 7.0.0 with location

五迷三道 提交于 2019-12-02 18:24:15
At first I know that there are several similar questions on StackOverflow. Curriently I use the geo scheme for addressing points which can be handled by other apps. Like in the example of the Android documentation (by the way it seems to be outdated the RFC it out!) I tried to use something like this: geo:50.95144,6.98725?q=50.95144,6.98725%20(Disneyland) So I get a intent chooser where I can select an App which showed me in case of Google Maps Disneyland with a marker on it. Now it seems that an update was installed which removes that support. I just get the message that this place cannot

How web apps ask location of mobile device?

心已入冬 提交于 2019-12-02 18:19:11
Many modern mobile phones (google nexus one etc.) have some kind of built in location service. when i go to a some website (eg. google.com) that website asks if I'm willing to share my location with that site. How do you actually ask for mobile device to give out it's location to the site? And in what format is that location given? I've got no clue and didn't find any answers from google, neither. Web applications on iPhone, Android or even certain desktop browsers (some recent versions of Firefox, Chrome and Opera) use the W3C Geolocation API to request your location. Google Gears also

Location object passed into onLocationChanged is null?

喜夏-厌秋 提交于 2019-12-02 17:43:44
问题 I have an activity that implements LocationListener in my application and my onLocationChanged method has been working perfectly up until recently. For some reason the Location object being passed into the method is null. My question is, why is it null? Does it pass in a null object if it cannot acquire a location? My GPS is on and I have it set to pull a location from the GPS, and I know my GPS can get a fix on me as I used Maps and had it locate me. Also, I have the permission for my app

Geolocation with IPv6?

依然范特西╮ 提交于 2019-12-02 17:36:16
I'm working on an IP geolocation library that uses the first three octets of an IPv4 address to determine a user's country, city, lat, lon, etc. Works like a charm. But it doesn't handle IPv6 addresses, and I'd like it to do so. Is there any way to transform an IPv6 address to get the equivalent of the first three octets of an IPv4 address, or are they on an entirely different numbering scheme, requiring a completely different ipgeo mapping? The typical IPv6 allocation is a /32 (four octets) to an Internet provider (which can be a multinational company), then /48 (six octets) to an end site

Rotate Links Using Geoplugin

白昼怎懂夜的黑 提交于 2019-12-02 17:30:35
问题 I'm geoplugin.class to redirect CA users to a specific link. Right now the code only allows me to redirect the user to 1 website. I would like to modify this code so I can redirect the user to either link1.com link2.com link3.com Does anyone have a quick modification for this? Thank you in advance. <?php require_once('geoplugin.class.php'); $geoplugin = new geoPlugin(); $geoplugin->locate(); $geo_region = $geoplugin->region; switch($geo_region) { case 'CA': header('Location: http://www.link1

Extfiltrating Google Location History from Timeline

空扰寡人 提交于 2019-12-02 17:19:15
Note, due to changes to Google's "Timeline" this previous answer no longer works . Google offers a "Timeline" service which allows users to access their phone's location history. I want to extract my phone's current location. If I select "today" in Timeline, I can "Export this day to KML" This contains the data I need, but I don't know how to get these data programatically. I don't want to have to log in to the website every time I need this information. The URL it provides is - https://doc-0uom0-1q5a8-s-googleusercontent.commondatastorage.googleapis.com/gs/[hash1]/[hash2]/1441116000000

Can iPhone web apps get GPS position?

家住魔仙堡 提交于 2019-12-02 17:11:30
Is there an easy way to design a website to facilitate an iphone user providing gps coordinates to the site? I am wondering if there might be a naming convention for form fields for example, to let the user input in an automated way. I am considering building a location based website and would like to tailor it for iphone (and other mobile users). I realize an iphone app could do this but I'm not equipped to create one. Here's a snippet on how to read location from the iPhone. Looks like it requires 3.0: navigator.geolocation.getCurrentPosition(foundLocation, noLocation); function

How to group latitude/longitude points that are 'close' to each other?

六月ゝ 毕业季﹏ 提交于 2019-12-02 17:09:34
I have a database of user submitted latitude/longitude points and am trying to group 'close' points together. 'Close' is relative, but for now it seems to ~500 feet. At first it seemed I could just group by rows that have the same latitude/longitude for the first 3 decimal places (roughly a 300x300 box, understanding that it changes as you move away from the equator). However, that method seems to be quite lacking. 'Closeness' can't be significantly different than the distance each decimal place represents. It doesn't take into account that two locations may have different digits in the 3rd