Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My script allows you to drawn shapes on an openlayers map, and then to get the WKT information from that shape, except the returned coordinates are in 900913 and i need them to be in lat/lon. thanks

share|improve this question
Welcome to GIS Stack Exchange! I'm not sure if you had trouble posting a relevant snippet from your code to indicate where you thought your problem might lie but I think you will need to do so in order to get assistance. – PolyGeo Jun 3 '13 at 10:31

You need to project (transform) the shape from EPSG:900913 (actually use the standard EPSG:3857) to EPSG:4326.

You can use the following code:

var gcs=new OpenLayers.Projection("EPSG:4326");
var webMercator=new OpenLayers.Projection("EPSG:3857");

/*I am assuming that you have a polygon in web mercator. You can do this for points and lines as well*/
var polygon_wgs84=poly.transform(webMercator, gcs);

//now you can convert the polygon to wkt
share|improve this answer
@ Devdatta - Thanks.... – Sandipan Saha Jun 3 '13 at 12:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.