Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am creating a wildlife survey form that has a field where users enter location. Users will be able to enter location using a map (i.e. draggable pushpin) or by manually entering lat/lng. My clients are also requesting an option for entering UTM coordinates.

If a user does enter UTM coords I would like to convert these before pushing to the database. I've seen a couple websites that have utilities for converting UTM to decimal degrees.

Does anyone know of a javaScript lib that will make these conversion given zone and easting-northing? I also saw this thread

Convert geographic coordinates to UTM zone 29N with Javascript

Does ESRI have a web service that I could pass UTM coords to and get lat/lng back?

share|improve this question
add comment

2 Answers 2

up vote 3 down vote accepted

If you're not happy with using a Geometry Service like Kirk suggested, you could use proj4js client-side.

share|improve this answer
    
This looks promising. I am converting from UTM Zone 11 EPSG-2153. I don't see this listed under the proj4js lib/defs. Any suggestions? –  snowgage May 30 '13 at 20:31
    
I found the definition on this page and it is the string +proj=utm +zone=11 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_def. You can use the user guide here to figure out how to make that work in your app. –  Jason Scheirer May 31 '13 at 6:49
    
The above definition works great for UTM. thanks –  snowgage May 31 '13 at 17:11
add comment

You could use the GeometryService on sampleserver6, but there's no guarantee Esri won't change or remove it.

Can call it using javascript Project method.

share|improve this answer
    
interesting but I am looking for a longer term solution –  snowgage May 30 '13 at 16:28
1  
@snowgage The geometryservice is part of the default installation for ArcGIS server. If you can find an ArcGIS server site that you can count on, there's a good chance they've published the geometryservice. –  Kirk Kuykendall May 30 '13 at 16:35
add comment

Your Answer

 
discard

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.