Many sites use vendors other than Google for their mapping needs. These may use projections that dish up non-GPS coordinates. Here’s a rough way to figure out what these coordinates are and how to convert them, without returning to school for a graduate degree in geoinformatics.
- Make a note of the unfamiliar coordinates and the street address.
- Search by street address at Google Maps. Get the coordinates by right-clicking at the very tip of the red indicator and choosing “What’s here?”
- Hop over to the World Coordinate Converter web site. Choose ‘*GPS (WGS84) (deg)’ from the drop-down in the upper box (if it’s not already selected) followed by the Google Maps coordinates.
- Fool around with target systems in the lower box. Choose some likely candidates and click Convert. Keep this up until you get results close to the mystery coordinates (don’t count on identical).
- Click on the ? next to the coordinate system name you chose. Put on your reading glasses and find the link in the popup to spatialreference.org. Click on it. This will give you the WKID (Well Known ID) of the projection, in the form of EPSG:\d+.
- The WKID for the Google Maps projection is EPSG:4326 (http://spatialreference.org/ref/epsg/4326/).
- Obtain the program
gdaltransformby installing the GDAL utilities on your friendly *nix box.
On Fedora, it’s
apt-get install gdal-bin
- Now the magic incantation:
echo $x $y | /usr/bin/gdaltransform -s_srs [/source] -t_srs [target WKID]
You will get your desired coordinates. Gingerly carry these over to Google Maps and verify that you’re in desired vicinity. The coordinates may be longitude-first, so you may need to reverse their order.
- The GDAL web site
var nw = new OpenLayers.LonLat(west, north);
var nwCarto = nw.transform(new OpenLayers.Projection("EPSG:2154"),new OpenLayers.Projection("EPSG:900913"));
Geo::GDAL, the Perl binding to the GDAL library.
- Post at Stack Exchange on