简体   繁体   中英

Converting game's x,y coordinates to Google Earth lat/long

I'm trying to convert coordinates from a game's Earth map to values in a Google Earth's kml file. The Earth in the game is represented this way:

The map is flat with width of 43,200,000m (X goes from -21,600,000 to 21,600,000) and height of 21,600,000m (Y goes from -10,800,000 to 10,800,000)

The distance between degrees is always the same: 120,000 m in length.

How do I convert the X , Y coordinates on this map to decimal latitude/longitude in Google Earth's format?

I've tried to use these formulas:

 LON = (360/map width) * X   
 LAT = (180/map height) * Y

but the coordinates are always off by a few hundred meters. There must be something I'm missing.

You need to know exactly, what is your projection . It looks like one of cylindrical. (Hope, your datum is WGS84). The Google Earth uses WGS84 geographic coordinates. Then you can find and use right inverse equations to go from your projected coordinates to geographic.

Maybe you can find something useful here and here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM