2 Replies Latest reply on Feb 17, 2010 3:47 PM by MarieB

    Map Generator program - works! mapmaker.pl

      Hi all.


      I spent a few days hacking away at something and I've just gotten working. Its very useful to me, I'm hoping its useful to you!

      Warranty: None

      Support: None!

      License: Public Domain


      Background - part of the network I maintain consists of retail locations scattered across the US - about 800 of them. I wanted to create an orion map that had these centers plotted in the correct location on a US map, along with a weather overlay.


      Here is the result!



      The weather part is easy - there are plenty of weather images to link to.

      For the plotting part, I wrote a perl script that does the following


      1) reads in a file full of lines that look like this:

      841, "Center: 14001 - (New York, NY, 10016)"

      I got this file by doing a 'select nodeid, caption from nodes where ..." from the orion dbm but obviously it can come from anywhere. if your data is in a different format you will need to modify the regular expression

      2) for each line, talks to google maps API and pulls geocoding info for the address part

      3) scales this info based on the bounding box constants defined at the top of the script (these are already set for the NWS image I use)

      4) creates a file called beta.orionmap by stringing together header.txt (the map file prologue), a node{} block for each location, and footer.txt

      after it runs, all you need to do is open the file in network atlas, and save it up to solarwinds to get it to work.

      A few points:


      • you'll need to register for your own google maps api key and add it to the script. its free.
      • i definitely dont know the real workings of network atlas. The file format is clear enough, but I do not know the 'official' logic that gerates the 'node: ' and 'nodeLabel: ' elements in the node structure. So basically I just pick random and dont duplicate. the resulting map seems to work, but im sure that is not correct.
      • The perl script was written against active-perl 5.8.8. it should be platform independent as long as you have Geo::Coder::Googlemaps installed properly via cpan or ppm.
      There is a zipfile with the script and datafiles here:

      it will expire in 7 days. does anyone know where I can stow this permanently?

      Have fun!