Export and Import

Category B	Version 3.0

These two programs will allow you to export landmarks from multiple machines, which can then be added to another machine. Instead of merging two or more datasets, you can achieve a similar result by adding all landmarks to a "main" or "head" machine.

While this is useful for combining data from multiple users, it was originally intended to allow a user to tile an object/bigmap simultaneously on multiple machines and then combine the results onto a single machine. Hence it uses LMRKLIST1.TXT, which is a list of newly added landmarks.

User Warnings

/!\You must ensure that LMRKLIST1.TXT only has the recently created landmarks (i.e., contains only the LMKs you wish to export and import into a new model).If LMRKLIST1.TXT has other LMKs you don't wish to bring into a different model, remove them from the top of the LMRKLIST1.TXT.

/!\You should also ensure that there aren't any maplets or landmarks remaining in NEW_FILES. If NEW_FILESdoes not exist, you must create NEW_FILES, as well as NEW_FILES/LMKFILES and NEW_FILES/MAPFILES.

/!\The imported landmarks will be renamed based upon region! This renaming procedure ensures that no existing landmarks will be overwritten. It also means you may end up with duplicate landmarks if you didn't make sure to exclude them when you created LMRKLIST1.TXT.

Export

Required Files

MAPFILES/ - a directory containing the full suite of maplets

LMKFILES/ - a directory containing the full suite of landmarks

LMRKLIST1.TXT - a list of the new landmarks

Output Files

EXPORT.TXT - Script that will execute the EXPORT.B script and clean up the previous version of NEW_FILES

EXPORT.B - Script that will cp new maplet and landmark files to NEW_FILE

Using Export

To run export, you must generate a script that will copy the new landmarks and put them into a tar ball.

Make EXPORT.B and the script EXPORT.TXT. Note that EXPORT.TXT will run the script EXPORT.B.

/!\You must ensure that LMRKLIST1.TXT only has the recently created landmarks.If it has older ones, trim the top of the file.

/!\You should also ensure that there aren't any maplets or landmarks remaining in NEW_FILES. If NEW_FILESdoes not exist, you must create NEW_FILES, as well as NEW_FILES/LMKFILES and NEW_FILES/MAPFILES.

Enter the following at the command line:

mkdir -p NEW_FILESmkdir -p NEW_FILES/LMKFILESmkdir -p NEW_FILES/MAPFILES/usr/local/bin/EXPORT

This will populate NEW_FILES with copies of the newly created mapfiles and landmarks.

The script EXPORT.TXT looks this:

cp LMRKLIST1.TXT NEW_FILES/LMRKLIST.TXT cd NEW_FILES/LMKFILES rm -f *.LMK cd ../.. cd NEW_FILES/MAPFILES rm -f *.MAP cd ../.. chmod +x EXPORT.b ./EXPORT.b tar -cf NEW_FILES.tar NEW_FILES rm -f LMRKLIST1.TXT

Run this script by entering the following at the command line:

sh EXPORT.TXT

Change the name of NEW_FILES.tar to something distinctive like

new_<bigmapName>.tar

Transfer the tar file to the other computer.

Import

Required Files

NEW_FILES/LMRKLIST.TXT - List of new landmarks

NEW_FILES/MAPILES/ - a directory containing the new maplets

NEW_FILES/LMKFILES/ - a directory containing the new landmarks

Output Files

MAPFILES/ - a directory containing the full suite of maplets

LMKFILES/ - a directory containing the full suite of landmarks

LMRKLIST.TXT - updated landmark list

NEWLIST.TXT - list of new landmarks with the new name

Using Import

1. Untar to recover NEW_FILES directory.

If you didn't rename the tar file, from the working directory type the following at the command line:

tar -xvf NEW_FILES.TAR

This will create the directory NEW_FILE if it doesn't already exist. If you are concerned about overwriting data in the current directory, use "tar" to check the location the data will be written to.

2. Once you have confirmed that you will be writing to an empty directory, type the following at the command line of the working directory:

/usr/local/bin/IMPORT

This will import the new landmarks.

/!\The imported landmarks will be renamed based upon region! This renaming procedure ensures that no existing landmarks will be overwritten. It also means you may end up with duplicate landmarks if you didn't make sure to exclude them when you created LMRKLIST1.TXT.

3. Import will update and move all the files to be integrated into the SPC working directory. However, it needs an iteration to run the renaming portion and connect the overlaps with the existing maplets.

cp NEWLIST.TXT make_script.in

For make_scriptF.seed use:

nngu1oRECENTn1qEND

Copy into window:

./rem_script.brm -f ./TESTFILES/*rm -f ./TESTFILES1/*make_scriptFsh ./run_script.b &

Check progress with:

find_nofit

(Modified by JRW from text written by EEP)

CategoryPrograms