Hi Moshe,

Sorry for the delay in responding to your email.  Thank you very much for 
providing this tool.  I just received v5.0, so I'll give it a try and see how 
everything works.  I haven't tested 5.0 to see if it handles images any 
differently, but I'll let you know if there is any difference from previous 
versions of Maptitude.

Thanks again for your time and effort in making this product even more useful!

Mike


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Moshe 
Haspel
Sent: Tuesday, December 04, 2007 12:37 PM
To: [email protected]
Subject: [Maptitude] Two new utilites: maps2go and strip/restore images


Fellow Maptituders,

I've placed two new tools on the directionsmag.com website for
download. These were inspired in part by 1) Mike McCann's recent
comment in message 3626 about difficulties with how Maptitude treats
image annotations (see
http://tech.groups.yahoo.com/group/Maptitude/message/3626); 2) Doug
Johnson's comment in message 3631 about the challenges inherent in
taking maps "on the road" (see
http://tech.groups.yahoo.com/group/Maptitude/message/3631); and most
of all 3) my own occasional frustration at taking a map home to work
on, only to discover that I forgot one of the underlying geo files.

It is possible that the new v5.0 (hooray!) release will ameliorate
some or all of these issues. And there is also the distinct
possibility that one or both of these scripts will not work in 5.0
(can't test, since we've only just ordered it; I'm using 4.7). But
here they are anyhow:

Maps2go.rsc (http://www.directionsmag.com/files/index.php/view/745)

"maps2go" moves a map to a "to go" directory, allowing you to take a
map on the road with the assurance that it will open (all of the
geographic files will be available) when you get to your destination.

The script:
1) Elicits user input for the "to go" directory.
2) Checks whether the geographic files, including imagery files, used
in the map exist in the "to go" directory (if not, makes copies).
3) Finds "freehand bitmap" annotations (.bmp/.jpg/.jpeg), makes
certain that a copy of the image exists in the "to go" directory,
records the info needed to restore the annotation to an external file,
and finally removes the image from the map. (This step is necessary
because Maptitude doesn't look for bitmaps the way it looks for
geographic files-- again see Mike McCann's comment in message 3626).
4) Saves the map, sans bitmap annotations to the "to go" directory.

The bitmap annotations removed from your map can be restored using the
"restore images" macro (see below).

Strip and Restore Images.rsc
(http://www.directionsmag.com/files/index.php/view/746)

This file contains two macros, "strip images" and "restore images"

"strip images" searches through the list of annotations in a map_file.
If it finds a "freehand bitmap" annotation (bitmap or jpeg) it records
everything there is to know about the annotation to an external file:
the filename of the annotation, its location within the map, and the
like. This info is stored as plain text in a file named filename for
the map itself + "-map-images.txt"

"restore images" reads the information back from the external file and
restores the bitmap annotations to the map. The macro looks for the
image file first in its original place. If the image is not found
there, the macro next looks in the path containing the current map. If
the image is still not found, the macro prompts the user to search for
the file. Once the image is located, it is returned to its original
map coordinates and with its other settings intact.

PLEASE NOTE:

I'm making these available without charge (GPLv3 license), so there
are no warranties or support available. Sorry. That said, if you do
find a bug, I'd like to know about it. Please copy down the EXACT
error message (the numbers separated by the commas are crucial!) and
send it along.

And though these tools are free of charge, they did take a
considerable amount of time to develop. So please consider making a
donation to one of my favorite 501(c)3's (see the comments in the code
for details). Software tools and a tax write-off... what more could
you ask for? Are you a skinflint? That's OK too-- just please pay it
forward. That's what I'm doing right now: I wrote these tools on
Notepad++, for which I paid not a dime.

And in closing, the usual shout-out to Larry Manire and Armando
Scalise, who helped foster a GISDK developer community by releasing
lots of their code including-- but not limited to-- the DKAIDS
package. In that spirit, I have posted commented code instead of a
compiled version.

Reply via email to