geolocation

iPhone - access location information from a photo

天大地大妈咪最大 提交于 2019-12-18 12:28:57
问题 Is it possible, in an iPhone app, to extract location information (geocode, I suppose it's called) from a photo taken with the iPhone camera? If there is no API call to do it, is there any known way to parse the bytes of data to extract the information? Something I can roll on my own? 回答1: Unfortunately no. The problem is thus; A jpeg file consists of several parts. For this question the ones we are interested in are the image data and the exif data. The image data is the picture and the exif

iOS Find Location (Latitude,longitude) from Zipcode

帅比萌擦擦* 提交于 2019-12-18 12:07:26
问题 What could be the best way to get location for a given zipcode. Would it work for countries outside US/Canada .Thanks 回答1: Use the Google geolocating API (try it out on google.com/maps): Input for a Swiss ZIP code for example: CH-9014 or a french one: FR-34000 or german: de-12101 or US: us-90210 or canada: ca-J5Z 1A1 or china: cn-100000 for example: yields { "status": "OK", "results": [ { "types": [ "postal_code" ], "formatted_address": "9014 St Gallen, Switzerland", "address_components": [ {

Make html5 geolocation ask permission every time user reloads the page

久未见 提交于 2019-12-18 11:56:14
问题 Why we need that: We have some page in our website which allows users to enter some data and search for another customers in their area. When user opened that page the popup message must be shown http://foo.bar.com would like to use your current location. After that user can discard that and fill the location fields manually or accept and be automatically redirected to results page. Problem: The problem is that when user selects any of the mentioned options at first time, browser remembers it

City Country State Database [closed]

£可爱£侵袭症+ 提交于 2019-12-18 11:36:26
问题 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 2 years ago . I am looking for a good City, Country State database It does not have to be crazy detailed, something that has a good coverage of Cities and their corresponding State,Countries in the world will do it for me. Appreciate if you can point me some links. Thanks 回答1: http://www.maxmind.com/app/geolitecity Although

Reading Geotag data from image in php

无人久伴 提交于 2019-12-18 11:12:27
问题 Does anyone know if there is a way to read geotag data from photos in PHP? Thanks 回答1: Like everyone else has said, exif_read_data(); will do it. To go ahead and get all of the data, use these args: exif_read_data($img, 0, true); // where $img is the path to your image This function can only read headers from tiffs and jpegs and I'm pretty sure only jpegs may contain geotags. I've written a simple php script for use in the command line and posted it as a gist on github. Run the script like

Using google maps API, how can we set the current location as the default set location using map.setCenter function?

做~自己de王妃 提交于 2019-12-18 11:12:12
问题 I am writing JavaScript code using Google Maps API. map = new google.maps.Map2(document.getElementById("map_canvas")); map.setCenter(new google.maps.LatLng(37.4419, -122.1419), 13); The above code sets the default location of the map canvas to Palo Alto. How can we write the script in such a way that the setCenter function automatically points to the current location of the client? 回答1: You can use the HTML5 GeoLocation API in browsers that support it. if (navigator.geolocation) { navigator

How do I calculate the Azimuth (angle to north) between two WGS84 coordinates

亡梦爱人 提交于 2019-12-18 11:11:50
问题 I have got two WGS84 coordinates, latitude and longitude in degrees. These points are rather close together, e.g. only one metre apart. Is there an easy way to calculate the azimuth of the line between these points, that is, the angle to north? The naive approach would be to assume a Cartesian coordinate system (because these points are so close together) and just use sin(a) = abs(L2-L1) / sqrt(sqr(L2-L1) + sqr(B2-B1)) a = azimuth L1, L2 = longitude B1, B2 = latitude The error will be larger

Python module for storing and querying geographical coordinates

﹥>﹥吖頭↗ 提交于 2019-12-18 11:07:45
问题 Is there a Python module where I can create objects with a geographical location coordinate (latitude and longitude), and query all the objects for ones which are within a 5km distance (i.e. radius) of a given coordinate? I've been trying to store the latitude and longitude as keys in dictionaries (as they're indexed by key) and use some distance finding algorithms to query them. But this feels like a horrible hack. Essentially something like PostGIS for PostgreSQL, but all within my Python

How to calculate the altitude above from mean sea level

对着背影说爱祢 提交于 2019-12-18 10:56:19
问题 I tried to find how to get the altitude above the mean sea level. At this time, it returns altitude from the ellipsoid. So, anyone knows the formula or calculation to change the altitude value from ellipsoid to the altitude value from mean sea level. Thank you for all help 回答1: As you mentioned, GPS returns the altitude as an offset from the WGS84 reference ellipsoid, but most people want to see mean sea level (MSL), and the two frequently don't agree. The way this is most frequently done is

Storing HTML5 geolocation data

一世执手 提交于 2019-12-18 10:26:13
问题 How can I store and process the geolocation (long and lat) of a website user in Rails 3, so that it checks to see if we're already holding those details in a session for that user on every page request (if we're not holding the details, then we should request the user's location from the browser and then store those details in the session)? 回答1: Based on your requirements I'd say that you don't actually need ajax, since most of the processing will be done using JS (to ask the user for access