Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GTA Coords to LongLat #5

Open
Identity-labs opened this issue Mar 16, 2018 · 3 comments
Open

GTA Coords to LongLat #5

Identity-labs opened this issue Mar 16, 2018 · 3 comments

Comments

@Identity-labs
Copy link

Hi,

Do you have any formule to translate GTA in game coords to Google maps LongLat

Thx

@davide-coccomini
Copy link

Did you find any solution?

@BarBaroNN
Copy link

Did you find any solution yet?

@davide-coccomini
Copy link

The conversion boils down to finding an equation of the form y = mx + q, one for latitude and one for longitude. Y will be the converted value, x will be the value to be converted. The real problem is to find values for m and q that work well over the whole map and this can always be done mathematically. However, due to the low degree of accuracy with which a co-ordinate can be derived from the map, compared to those derived by the game engine, it is really difficult to find suitable values.

In my specific case, for the upper part of the map, I found discrete values but for any other cases you can modify them as you like until you find suitable values and use this function:

function convertCoordinates(coordinates){ return [(coordinates[1] * 0.001200353047349200) + 75.3764506332618, (coordinates[0] * 0.009713334876609776) - 124.61412024703065]; }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants