Create account / Log in

Hex to Lat/long converter

Suggestions for additional features for the module editor and Vassal engine.

Moderators: uckelman, Tim M

Hex to Lat/long converter

Postby RLWilson » April 25th, 2014, 2:08 pm

With tools like Goggle Earth and Google Maps, Google Street View and such it would be nice if there was a handy and quick way to compute the Lat/Long of any hex. The way the tool might work is that the user enters the lat/long of two or three hexes (that are easy to locate on a Google map and then the app would compute the lat/Long for all the other hexes and display them in a format that they could be copy and past into Google maps et al so that one can quickly see what that hex looks like (maybe not in 1944) but at least how it looks today.

This would also be handy for map builders who can use this feature to help them build a game map.
RLWilson
 
Posts: 14
Joined: January 12th, 2013, 6:16 pm

Re: Hex to Lat/long converter

Postby mcbeth » April 25th, 2014, 2:37 pm

On Fri, Apr 25, 2014 at 02:08:13PM +0000, RLWilson wrote:
> With tools like Goggle Earth and Google Maps, Google Street View and
> such it would be nice if there was a handy and quick way to compute the
> Lat/Long of any hex. The way the tool might work is that the user enters
> the lat/long of two or three hexes (that are easy to locate on a Google
> map and then the app would compute the lat/Long for all the other hexes
> and display them in a format that they could be copy and past into
> Google maps et al so that one can quickly see what that hex looks like
> (maybe not in 1944) but at least how it looks today.

Projections and artistic license will screw this up horribly.
For example, I took an orienteering map (which are supposed to be usable with compass and pace counting for finding things) and tried to get a GPS track to line up with it, and even the differences between GPS and what ever local state datum the club used were unreconcilable, even with nearly 15 well spread tie points. How you would get game maps to line up, with artistic license and playability trumping how well things hew to the WGS-84 would be an absolute miracle.

There are good GIS tools that you could use to get started building maps, but I would guess this would be well out of scope for something like VASSAL.

Welcome to the wide wooley world of coordinate transforms!

Jeff

--
"The man who does not read good books has no advantage over
the man who cannot read them."
-- Mark Twain
User avatar
mcbeth
 
Posts: 22
Joined: December 20th, 2007, 7:27 pm

Re: Hex to Lat/long converter

Postby RLWilson » April 25th, 2014, 2:44 pm

I understand that the accuracy may suffer from the above... but perhaps (like horseshoes) close might count for this... even if close may be 100's of meters off... that is better than nothing.
RLWilson
 
Posts: 14
Joined: January 12th, 2013, 6:16 pm

Re: Hex to Lat/long converter

Postby RLWilson » April 25th, 2014, 2:58 pm

One other spin off form this. Given capabilities like Google street view, it would be neat if one could say take six screen dumps of a Google street view like scene at every 60 degrees and then import those images into a map as viewable sprites so to speak. It might work something like this. If a perspective picture is loaded into a game that matches (or at least sort of matches) a map hex side, then that hex side may be drawn say fatter than a non populated one. Then by clicking on that hex side that would pop of the image that shows that view.

Yes, that would be an incredible large amounts of imagery to create to do that for all hex sides on a map, but the idea is just to do that for a view landmark ones. This could help a player get a worms eye view of the terrain... even if the worm hole may not be quite the hex on wants to take a pick at the terrain but 5 or 6 hexes away. Once again that would be a lot better than no view at all.

And BTW, as to accuracy of computing lats and longs of hexes, the more goofy the map and its projections the more reference points one may need to add to compute the conversion parameters. Ideally it would only take two (one on each opposite corner) but in actuality it might take a dozen of so to get even close. The algorithm could divide the map into sub-regions as more reference points are added, the limit being that each hex has a reference lat/long... but hopefully reasonable accuracy could be gotten with fewer than that!

I am not saying this would be easy to do.. rather it would be cool to have... given some really clever person could figure out how to make it work.
RLWilson
 
Posts: 14
Joined: January 12th, 2013, 6:16 pm

Re: Hex to Lat/long converter

Postby RLWilson » April 25th, 2014, 3:47 pm

A way to (perhaps) make the above more doable is to create a data structure linked to the grid data structure where the lat/longs of each hex is either entered (via a human/data file) or computed on demand.. to save memory for large maps.

The game map builder (or even player) could populate (or add to the existing points) as many reference hexes they desire with the lat and longs (however they might be obtained. On selecting a hex that lat/long could be displayed, regardless of whether it is one entered or one computed on the fly (though some indication of which is the case might be shown as well).

The computed lat and long would be based on the three (or so nearest reference points) and would use a selectable projection model (e.g. flat, spherical, Mercator, whatever) where the idea is that the projection model can be simple in that better accuracy can be gotten just by adding more reference hexes until the accuracy is "good enough for government work".

Thus the idea here is not to match the capability of a GIS tool in accuracy but just simply interpolate between known reference points and only be as good as those points and how many of them there are in a way so that the user can easily use this without having to get a PhD in map making but simply add enough reference points to get reasonably accurate results.
RLWilson
 
Posts: 14
Joined: January 12th, 2013, 6:16 pm


Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 2 guests

cron