Gridsquare overlay for google maps

4,075 views
Skip to first unread message

jgnatow

unread,
Sep 6, 2020, 3:50:40 PM9/6/20
to Valleyhams
Hey all,
I spent too much time looking on google for a kml file that does grid squares. Not finding much I created one for at least the east coast and golf coast. For now, Here is a link to my google map that has the grids. This is great for rover or any traveling hams that need to know exactly when they change grids. The default view is kind of ugly but when you zoom in to a practicable size, it's very usable. Let me know what you think. I'll add more grids and work on cleaning up the kml file as i (hahahaha) get time.




Jason Gnatowsky KG4FJC

Mark Whitis

unread,
Sep 10, 2020, 3:38:00 AM9/10/20
to jgnatow, Valleyhams
I have some bad news and some good news.   You have not only reinvented the wheel but the prior art is considerably more useful than your current efforts, so far.  There are already some fairly nice KML/KMZ maidenhead grid overlays, one for offline and one for online use.

The fact that your coverage is spotty makes me think your methodology is very primitive.  These overlays can and should be created completely automatically.

A proper kml overlay would consist of multiple layers of files such that the detailed layers would only be loaded when and where needed. 
Better yet would be to write a cross platform program that creates local webserver http://localhost:8081/  that KDE marble, google earth, or other KML aware application could simply connect to and would generate overlays on the fly.   This method supports 10 character maidenhead grids that can uniquely identify your front door.

For the stated purpose of knowing exactly when you have actually crossed grids, google earth imagery can be off by 100ft.  Use your GPS instead. And use a maidenhead converter (see below).  Also, the maidenhead system is based directly on GPS coordinates.   So, you can tell when you have crossed into a new grid by when certain GPS digits roll over the odometer.   Also, there are multiple android apps such as HamGPS.

The following is a link to a page containing a  windoze executable that generates 22GB of detailed grids.  It will run under wine; it gives one error but still runs.  It also has a smaller pregenerated download that only generates 4 character grids instead of the 6 character grids.   He did make the mistake of Including all 4 digit codes in the top level file instead of just doing the two character codes and this wastes memory and slows google earth down a bit.  It has 32,400 grids instead of the 324 it should have had if porperly organized.   It has one 47MB file (which grows when read into RAM)  and 32,400 half megabyte files.
Tip: do not "open file", instead right click on "myplaces" -> Add -> network link .   That way it won't import 47MB into myplaces.kml.   The bigger myplaces.kml is, the more prone it is to corrruption and the longer it takes to load.   Maidenhead grid should only be loaded when actually displayed and it can't do that if you imported the whole thing.

This is a free one that uses an online server.   Good for subsquares (6 character).   Easily turn on/off each of the three layers of heierarchy.
It comes from this page which also offers DXCC countries overlay:

Earthpoint has a nice (online) system that does Maidenhead, MGRS/USNG, UTM, Degrees, etc. but you have to redownload every 24hours unless you subscribe for $5/month.   Accurate down to 1 meter but your imagery may not be positioned that accurately.

A few online maidenhead systems.  Not KML (or at least not easily accessible). Some of these go out to 10characters. 


This doesn't do maidenhead but it does let you change what maps google uses:

There are some useful linux command line utilities (should  also work in windoze subsystem for linux)
Quick install:
  sudo apt-get install geographiclib-tools wwl; sudo pip3 install maidenhead

The linux program wwl will calculate distance and bearing between two maidenhead grids.
The linux program GeoConvert will convert latitude/longitude to USNG/MGRS or UTM and decimal degrees, decimal minutes, and degrees/minutes/seconds.
Here is a python program to convert to/from maidenhead (sudo pip3 install maidenhead) (MIT license):

Javascript code (easily converted to a useful language) with MIT license to convert lat/long to maidenhead.   Also links to a discussion thread that has snippets in other languages.

To get maidenhead, 360 degrees of longitude and 180 degrees of latitude are divided by 18 to get the field (FM), then subdivided by 10 to get the square (FM08), then subdivided by 24 to get the subsquare (FM08NB) and  repeat the 10 and 24 pattern if you want extended maidenhead.   Grid squares are 1 degree high by 2 degrees wide and subsquares are 2.5 minutes high by 5 minutes wide.  

4 character codes change when longitude divided by 2 degrees changes the integer portion or when latitude divided by 1 degree changes.   For 6 characters grid squares, put your gps in the archaeic degrees/minutes/seconds mode or decimal minnutes mode and when longitude MINUTES divided by 5 changes or latitude minutes divided by 2.5 changes, you are in a new grid square.  So, my house in waynesboro is at:

 38° 4'57.05"N      Change grid squares when degree portion shows  37degrees or 39 degrees.
 78°52'47.42"W    Change grid squares when degree portion shows 80 degrees or 77 degrees (78 and 79 are same square)

So, if I go one block north, I will rollover from 4 minutes something to 5 minutes and I will be in the next  subsqure ( 6 character) at  2' 30" per subsquare.
To get to the next major square, though, I need drive south almost to Sherando which will rollover from 38 degrees to 37 degrees which will not only put me in the next 6 character grid it will also but me in the next 4 character grid.  Going north, I have to drive just past strasburg to latitude 39 to get into the square to my north.   To change squares (4 character) east west, I have to move by 2 degrees and there will be mountain ranges involved.   East I need to go to Louisa, culpepper, or Hadensville to get into FM1? territory where I roll over from -78 to -77 degrees latitude and going west, I need to go just west of Covington, WV on I64 longitude -80, grid square EM97 (EM97XT) which, by the way, involves going through another grid square south of here first.     Or I can go west on 250 to the end and keep on going on 92 till I reach the end of that, then turn left and go another 2.5miles.






--
--
You received this message because you are subscribed to the Google
Groups "ValleyHams" group.
To post to this group, send email to valle...@googlegroups.com
To unsubscribe from this group, send email to
valleyhams+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/valleyhams?hl=en
Please do not send jokes and junk e-mail on this list - Let's use it for our various hobbies, public service, communications and any good useful information for our hobbies and Events.
---
You received this message because you are subscribed to the Google Groups "Valley Hams" group.
To unsubscribe from this group and stop receiving emails from it, send an email to valleyhams+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/valleyhams/1281614010.3809642.1599421822608%40mail.yahoo.com.
Reply all
Reply to author
Forward
0 new messages