Friday, December 31, 2021

Map Flooder

I was searching for a way to highlight zones (regions, provinces, counties, etc) on a map, and I don't need super precise maps so I wrote this AutoIT script, based on picking up black and white maps (2 colors BW .png or .gif tested) and filling them with colors, writing down a sqlite database to associate zones with names (and possibly other data as well), and reuse the map and the DB to display data, in my example reading a simple .txt file.


So you can forget about multi gigabytes frameworks, with complex web based environments to be patched every 15 minutes and prone to vulnerabilities 😉, I love having an easy stand alone map showing tool in one (1 boys...) megabyte and without dependencies 😁.


Let's have a look at this 2 minutes video:




So I have two modes:
  1. The Map "creation mode" : you provide a map image and you start to pick up colors, set "upper level" region/state, and by clicking on a region you fill it and you name it, and all the data are saved on a sqlite DB (auto-created by the script).
  2. when you have the map image and a DB with the correct associations, you can switch the "mode" to "show" (as by .ini file) and the script tries to read a "datafile" showing the zone names listed in datafile.

And feel free to evolve, calling the executable passing the data to show, maybe assigning weighted colors based on values for zones.


The code is here (link)

But you can start to play immediately with this second link, there is the already compiled executable and some files to try:

Link to all the demo files




No comments:

Post a Comment

PDFJoint

 PDFJoint I am glad to share with you a quick app I assembled from older efforts and with drag&drop interface, to join two or more PDF ...