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 a Java Developer and I was given this coordinates from a database

verbat_sistema_coordenadas  verbatim_SRS    datum   verbat_longitud verbat_latitud
UTM                         WGS84           WGS84   9947921          815887

And I tried the examples here http://stackoverflow.com/questions/7661/java-code-for-wgs84-to-google-map-position-and-back, but I get something like this when I try to use the MercatorTransform showed there

LatVerb           LonVerb               LatEPSG                        LonEPSG
815612.0         9948458.0           7.3267672551129115        66.40190209729147

I tried the formulas shown there and I get differnt result with each formula and none are close to what I need. Then someone I am working with gave me an excel sheet with some formulas but the have a million variables and constants

Fi' Ni  a   A1  A2  J2  J4  J6  Alfa    Beta    Gamma   B(fi)   b   Zeta    Xi  Eta Sen h Xi    Delta Lambda    Tau

And they depend on the Timezone(meridian, maybe I am translating this wrong?), and the hemisphere, and they seem to work. They gave me -0.4544682953,-78.1736736245, which is the correct answer.

This is the excel sheet http://www.gabrielortiz.com/descargas/descarga.asp?Fichero=Conversion_UTM_Geograficas.xls

I tried using geotools, but it was way off too http://osgeo-org.1560.x6.nabble.com/convert-wgs84-coordinate-to-Google-Map-coordinate-system-EPSG-3785-with-geotools-and-java-td4983362.html

share|improve this question
1  
What is your question? –  whuber Jun 6 '13 at 4:23
    
Sorry, I am looking for a formula to transform from WGS84 to EPSG 3785, but none of them give me the same results, what is the correct way to do this. –  Juan Diego Jun 6 '13 at 5:07

2 Answers 2

UTM has nothing to do with EPSG 3785 and Google maps, apart from the WGS84 ellipsoid and datum. And WGS84 in degrees is yet another coordinate system.

If your desired point of the earth has negative lat/lon in degrees, the Google mercator coordinates are negative as well.

If you have UTM coordinates, they are always positive, but you need the UTM zone they are laying in. For the southern hemisphere, positive y counts from the south pole, for the northern hemisphere from the equator.

You can find formulas for UTM here: http://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system

Your zone might be UTM 30S.

share|improve this answer

Based on the latitude-longitude values you gave as correct (-0.4544682953,-78.1736736245), that the input coordinate values are labeled misleadingly.

 verbat_longitud verbat_latitud
   9947921          815887

The first number is the northing value and the 2nd one is the easting. Also based on the latitude-longitude values, the zone should be 17 South (data is in/near Quito).

So you have two conversions to do: UTM to latitude,longitude and latitude,longitude to EPSG:3857 (EPSG:3785 has been deprecated and replaced with 3857). UTM is based on tranverse Mercator and knowing the UTM zone allows you to figure out the parameter values. To convert to EPSG:3857, you will need the sphere-based equations for Mercator.

share|improve this answer

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.