More radio amateur grid squares

Toronto, as understood by the Maidenhead Locator system

After yesterday’s post, I went a bit nuts with working out the whole amateur radio grid locator thing (not that I’m currently likely to use it, though). I’d hoped to provide a shapefile of the entire world, but that would be too big for the format’s 2GB file size limit.

What I can give you, though, is:

  • A Perl program that will generate a shapefile of an entire Maidenhead grid field, down to the subsquare level: make_grid.pl. You’ll need Geo::Shapelib to make this work. 324 (= 182) of these files would cover the whole world, and at 8MB or so a pop, things get unwieldy quickly.
  • A Google Earth KML file covering the whole world in 20° by 10° grid fields: Maidenhead_Locator_World_Grid. (If you’re feeling nerdy, here it is in Shapefile format: Maidenhead_Locator_World_Grid-shp).

If anyone would like their grid square in Google Earth format, let me know, or read on …

Making KML Files

Several people have asked, so here’s how you convert to KML. You’ll need the OGR toolkit installed, which comes in several open-source geo software bundles: FWTools/osgeo4w/QGis. Let’s assume we want to make the grid square ‘EN’.

    1. Run make_grid.pl:
      make_grid.pl en
    2. Convert to KML using ogr2ogr:
      ogr2ogr -f KML EN-maidenhead_grid.kml EN-maidenhead_grid.shp
    3. Alternatively, if you just want to extract a square (say EN82), you can use ogr2ogr’s ‘where’ clause to select just the geometry you want:
      ogr2ogr -f KML -where "Square='82'" EN82-maidenhead_grid.kml EN-maidenhead_grid.shp

 

Comments

6 Responses to “More radio amateur grid squares”

  1. […] see if I can find an answer. Still, for all its wrongness, you can make something pretty, like my whole world Maidenhead locator grid projected this way turns into a […]

  2. kurt Avatar
    kurt

    I wonder if you could make one for the world now using the Esri geodatabase api?

    Would be pretty cool.

  3. kurt Avatar
    kurt

    In fact..if you can extract the world into shape files and put them in a cloud folder, I could download them and replace it with an Esri geodatabase of a seamless layer.

  4. scruss Avatar

    I don’t do ESRI … they’re proprietary and Windows-only

  5. […] schmeißt man zuerst die Suchmaschine und schaut nach bereits erstellten Grid-Dateien. Auf dieser Seite bin ich fündig geworden. Das erste Ergebnis nach 3 Minuten Arbeit kann sich sehen lassen und […]

  6. PH4Z Avatar
    PH4Z

    Thanks, I have just imported the kml in “Topo GPS” app for iOS. It was exactly the solution I have look for.

Leave a Reply

Your email address will not be published. Required fields are marked *