geocoding

Converting latitude and longitude to decimal values

故事扮演 提交于 2019-11-26 09:20:16
问题 I have GPS information presented in the form: 36°57\'9\" N 110°4\'21\" W I can use the javascript functions of Chris Veness to convert degrees, minutes and seconds to numeric degrees, but first need to parse the GPS info into the individual latitude and longitude strings (with NSEW suffixes). I have read related posts on stackoverflow, but am not a regex expert (nor a programmer) and need some help with the parsing function. What\'s the best way to parse this string into latitude and

iOS - MKMapView place annotation by using address instead of lat / long

我的梦境 提交于 2019-11-26 09:20:00
问题 I am able to place annotations on my MKMapView by using latitude and longitude, however, my feed coming in that I need to use location for is using street addresses instead of Lat and Long. e.g 1234 west 1234 east, San Francisco, CA ... Would this have something to do with the CLLocationManager ? Has anyone attempted this before? 回答1: Based on psoft 's excellent information, I was able to achieve what I was looking for with this code. NSString *location = @"some address, state, and zip";

What datatype to use when storing latitude and longitude data in SQL databases? [duplicate]

家住魔仙堡 提交于 2019-11-26 08:42:59
问题 This question already has answers here : What is the ideal data type to use when storing latitude / longitude in a MySQL database? (21 answers) Closed 4 years ago . When storing latitude or longitude data in an ANSI SQL compliant database, what datatype would be most appropriate? Should float be used, or decimal , or ...? I\'m aware that Oracle, MySql, and SQL Server have added some special datatypes specifically for handling geo data, but I\'m interested in how you would store the

Polygon area calculation using Latitude and Longitude generated from Cartesian space and a world file

柔情痞子 提交于 2019-11-26 08:36:00
问题 Given a series of GPS coordinate pairs, I need to calculate the area of a polygon (n-gon). This is relatively small (not larger than 50,000 sqft). The geocodes are created by applying an affine transform with data from a world file. I have tried to use a two step approach by doing converting the geocodes to cartesian coordinates: double xPos = (lon-lonAnchor)*( Math.toRadians( 6378137 ) )*Math.cos( latAnchor ); double yPos = (lat-latAnchor)*( Math.toRadians( 6378137 ) ); then I use a cross

Android; Geocoder, why do I get “the service is not available”?

人盡茶涼 提交于 2019-11-26 08:29:35
问题 I want to use the Geocoder in an android application, I\'ve got the following piece of code to sample it : public class LocatorGeo extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Geocoder geo = new Geocoder(getApplicationContext()); List<Address> myAddrs = new ArrayList<Address>(); try { myAddrs = geo.getFromLocationName(\"CO100AR\", 1); } catch

Trilateration using 3 latitude and longitude points, and 3 distances

故事扮演 提交于 2019-11-26 08:07:21
问题 There exists an unknown target location (latitude and longitude co-ordinates). I have 3 latitude and longitude co-ordinate pairs and for each pair a distance in kilometers to the target location. How can I calculate the co-ordinates of the target location? For example, say I have the following data points 37.418436,-121.963477 0.265710701754km 37.417243,-121.961889 0.234592423446km 37.418692,-121.960194 0.0548954278262km What I\'d like is what would the guts of the function that takes that as

Forward geocoding from the iPhone

流过昼夜 提交于 2019-11-26 08:06:52
问题 Given that the mapkit doesn\'t provide forward geocoding functionality today, can anyone provide help on how I can i use a search bar to return a latitude and longitude coordinate from a user inputted address today. If someone can provide sample code that would be great. 回答1: iOS 5 now allows for forward Geocoding: http://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/LocationAwarenessPG/UsingGeocoders/UsingGeocoders.html#//apple_ref/doc/uid/TP40009497-CH4-SW5 I hope

Get nearest places on Google Maps, using MySQL spatial data

瘦欲@ 提交于 2019-11-26 08:05:06
问题 I have a database with a list of stores with latitudes and longitudes of each. So based on the current (lat, lng) location that I input, I would like to get a list of items from those within some radius like 1 km, 5km etc? What should be the algorithm? I need the PHP code for algorithm itself. 回答1: You just need use following query. For example, you have input latitude and longitude 37 and -122 in degrees. And you want to search for users within 25 miles from current given latitude and

How to determine a zip code and city from an IP address? [closed]

与世无争的帅哥 提交于 2019-11-26 07:17:45
问题 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 3 years ago . I am looking for advice for open API or 3d party products which will help to convert an IP address to a zip code and city, to make geo-specific web site content. 回答1: What I use is ip2nation: http://www.ip2nation.com It is a completely free MySQL database of IP to country mappings. They include a few sample PHP

How to obtain longitude and latitude for a street address programmatically (and legally)

£可爱£侵袭症+ 提交于 2019-11-26 06:16:40
问题 Supposedly, it is possible to get this from Google Maps or some such service. (US addresses only is not good enough.) 回答1: The term you're looking for is geocoding and yes Google does provide this service. New V3 API : http://code.google.com/apis/maps/documentation/geocoding/ Old V2 API: http://code.google.com/apis/maps/documentation/services.html#Geocoding 回答2: In addition to the aforementioned Google geocoding web service, there is also a competing service provided by Yahoo. In a recent