geocoding
Geocode an IP address? [closed]
Another free REST API with city accurate information would be http://freegeoip.net Requests are fairly straight forward. You would use something like http://freegeoip.net/{format}/{ip_or_hostname} to geocode an IP address, where format can be csv, xml or json. Their website has all the details. [UPDATE:] FreeGeoIP.net was not continuously available in the past as a public service. The … Read more
How can I find the center of a cluster of data points?
The following solution works even if the points are scattered all over the Earth, by converting latitude and longitude to Cartesian coordinates. It does a kind of KDE (kernel density estimation), but in a first pass the sum of kernels is evaluated only at the data points. The kernel should be chosen to fit the … Read more
how to model a postal address
Here’s how I model addresses for the US. You could also store a 10 digit zip code (XXXXX-XXXX) if you needed. You may also consider adding a point field, or a poly field from geodjango depending on what you’re using the addresses for. from django.contrib.gis.db import models from django.utils.translation import ugettext as _ from django.contrib.localflavor.us.models … Read more
Which are the best geo Coding APIs available for free? [closed]
Available Solutions for the Address / ZipCode to (latitude, longitude) mapping are … Google API, http://code.google.com/apis/maps/documentation/geocoding/ ) The most popular due to Google’s name. Extensive support available on the internet (less development time). Alas! not available freely for commercial usage. The free version has 2500 queries/day limitations. (http://code.google.com/apis/maps/documentation/geocoding/) There is one clause in “Usage Terms” … Read more
Google Javascript API Geocoding Limits
I work in Maps for Business support at Google. The following is my personal opinion, not Google’s, but let’s just say I’m rather familiar with this topic! First, it’s important to distinguish between client-side geocoding (JavaScript calls to google.maps.Geocoder) and server-side geocoding (HTTP requests to /maps/api/geocode). This question and answer are specifically about client-side geocoding; … Read more
Converting Longitude & Latitude to X Y on a map with Calibration points
Here’s what worked for me, without so much bs. int x = (int) ((MAP_WIDTH/360.0) * (180 + lon)); int y = (int) ((MAP_HEIGHT/180.0) * (90 – lat)); The lat,lon coordinates were given to me by Android devices. So they should be in the same standard used by all Google Earth/Map products.
Calculate distance between Zip Codes… AND users.
Ok, for starters, you don’t really need to use the Haversine formula here. For large distances where a less accurate formula produces a larger error, your users don’t care if the match is plus or minus a few miles, and for closer distances, the error is very small. There are easier (to calculate) formulas listed … Read more
Random geographic coordinates (on land, avoid ocean)
To deal with the body of water problem is going to be largely a data issue, e.g. do you just want to miss the oceans or do you need to also miss small streams. Either you need to use a service with the quality of data that you need, or, you need to obtain the … Read more
iOS – MKMapView place annotation by using address instead of lat / long
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”; CLGeocoder *geocoder = [[CLGeocoder alloc] init]; [geocoder geocodeAddressString:location completionHandler:^(NSArray* placemarks, NSError* error){ if (placemarks && placemarks.count > 0) { CLPlacemark *topResult = [placemarks objectAtIndex:0]; MKPlacemark *placemark = [[MKPlacemark alloc] … Read more