Inventory and Map Update Process


Contents

Source Files
Uploading
Backing up
Maps
Backing up Existing Maps
Process TimeLine Maps
Process Typology Maps
Scripts
Backing up Existing Scripts
Running the Scripts
Test the Maps
Programming Notes


Source Files

Uploading

Katherine Rinne (rinne@jefferson.village.virginia.edu, kwrinne@yahoo.com) will upload new source files to jefferson.village.virginia.edu in the following directories:

Backing up

Run the following commands to back up new source files:
  1. Copy .sgm files to the backups directory, with the date, month, and year appended to the copy file name.
    cp /home/rinne/current/rome.sgm /home/rinne/backups/rome.sgm.mmddyy
  2. Tar the timeline and typology directories with the month, day, and year in the tar file name.
    tar -cvf /home/rinne/backups/timeline.mmddyy.tar \ 
      /home/rinne/current/timeline/*
    tar -cvf /home/rinne/backups/typology.mmddyy.tar \
      /home/rinne/current/typology/* 

Maps

Backing up Existing Maps

It is a good idea to back up existing map-related files before generating new maps. Run the following command(s) to back up existing files in the timeline, typology, and timevrml directories. Note that you should include the day, month, and year of the new tar files.
tar -cvf /institute/web/waters/backups/timeline.mmddyy.tar \
  /institute/web/waters/timeline/*
tar -cvf /institute/web/waters/backups/typology.mmddyy.tar \
  /institute/web/waters/typology/*
tar -cvf /institute/web/waters/backups/timevrml.mmddyy.tar \
  /institute/web/waters/timevrml/* 

Process Timeline Maps

Figure 1
STEP 1: Generate source files for the JPEG output option.
  1. Download the new Timeline map from /home/rinne/current/timeline/. If you're replacing existing Timeline maps, the name of the new map files must match the name of the old map files and you must check the existing timeline directory for the correct name (/institute/web/waters/timeline/).
  2. Open the new maps in Canvas (version 5).
  3. Save the map as "Colada Web" using the "Create Folder" and "JPEG Image with links" flags (see figure 1).
  4. Upload the new JPEG files to /institute/web/waters/timeline/. Upload the new HTML files to /institute/web/waters/timeline/unprocHTML/.
  5. Copy the files to /institute/web/waters/timeline/process_newHTML/ before running the scripts. It is critical to maintain an unprocessed version of the HTML files in the /unprocHTML/directory.

The files are now ready for the Perl scripts.

STEP 2: Generate source files for the VRML output option.

  1. Make a copy of one of the existing VRML files in /institute/web/waters/timevrml/, renaming it to match the new corresponding Timeline map (new_name.wrl).
  2. Edit the new VRML file in any text editor and change the JPEG texture HREF pointer to your new JPEG file.
  3. Make a copy of the new Timeline map JPEG in /institute/web/waters/timeline/, renaming it to match the new VRML file (new_name.jpg) and place it in /institute/web/waters/timevrml/.
  4. Open the JPEG in Photoshop and save it as a nonprogressive JPEG (VRML browsers will not load progressive JPEGs).

Repeat this process for each of the output options: "Basic", "With 1998 Street Grid", "With 1998 Topography".

STEP 3: Generating a new query#.html file for the new Timeline map.
  1. Make a copy of the new Timeline map JPEG in /institute/web/waters/timeline/. Assign the copy a short name that uses the first few letters of the existing map name followed by the number 1 (for example, hydro1.jpg).
  2. Resize the JPEG to 360 x 360 pixels and upload it to /institute/web/waters. This is the new reference JPEG for the Timeline maps query#.html file.
  3. Copy /institute/web/waters/query.html to query#.html. The # sign represents the numeric order of the map's position in the timeline sequence (the older maps have lower numbers). Edit the query#.html file's text to refer to the new map and the <img ref> pointer to the new reference JPEG.
  4. Upload the new query#.html file to /institute/web/waters/.
STEP 4: Generating a new icon for the web interface timeline.
Figure 2
  1. Make a copy of an existing timeline icon (such as figure 2) and use it as a template to create an icon for the new map. Resize the new Timeline Map JPEG to match the template icon and add a text label for the map name.
  2. Upload the new JPEG to /institute/web/waters/.
  3. Edit the timline.html file and add an <href> tag in the new query#.html file and <img ref> to the new icon.

Process Typology Maps

  1. Download the new Typology layer map from /home/rinne/current/typology/.
  2. If replacing an existing Typology layer, the name of the new map files must match the name of the old map, since these files are used by the build.html file. Check the Typology directory for the correct name (/institute/web/waters/typology/).
  3. Open the map in Canvas. Save the map as a Photoshop document using the "Anti-Alias" and "Create Mask" flags (see figure 3).
  4. Open the new file in Photoshop. Save the file as a 32-bit Targa file to /institute/web/waters/typology/.
  5. Save the map a second time in Canvas as Colada Web using the "Create Folder" and "JPEG Image with links" flags (see figure 4).
  6.  
    Figure 3
    Figure 4

  7. You can discard the JPEG image, since the Targa file will be used instead.
  8. Move the new html files to /institute/web/waters/typology/unprocHTML/.

The files are now ready for the Perl scripts.


Scripts

Backing up Existing Scripts and Related Files

Use the following command(s) to create backups of the scripts and related files:

tar -cvf /institute/web/waters/backups/scripts.mmddyy.tar \
  /institute/web/waters/scripts/*
tar -cvf /institute/web/waters/backups/books.mmddyy.tar \
  /ebt/ebtdocs/rinne/books/rome/*

Running the Scripts

Check the paths in the global vars at the head of each script before running it to make sure the relevant files are where they're supposed to be. Scripts are located in /institute/web/waters/scripts/.

  1. Copy the new SGML file into the DynaWeb path. For example,
    cp /home/rinne/current/rome.sgm /ebt/ebtdocs/rinne/books/rome/
  2. Use the following commands to run mkbook (mkbook runs against the SGML file and creates files that DynaWeb uses to publish on the web):
    cd /usr/local/dtext41/bin/
    ./mkbook -fa -col /ebt/ebtdocs/rinne rome \
      -catalog /dtext41/data/ents/default.cat \
      -catalog /usr/local/sgml/catlaogs/iathcat -log rome.log
  3. Run the makelist.pl script. This script will create a file called nameslist.txt that the two .html conversion scripts use as input. If you have updated the SGML file you must also update the map's HTML if any object names in the SGML have changed, even if no map objects have changed.
  4. Copy the new HTML files into the timeline/process_newHTML/ directory for processing. It is essential to maintain a copy of the unprocessed HTML files in /institute/web/waters/timeline/unprocHTML/:
    cp /institute/web/waters/timeline/unprocHTML/*.* \
      /institute/web/waters/timeline/process_newHTML/
  5. Run the convert_timeline.pl script. This script will modify the HTML files in /institute/web/waters/timeline/process_newHTML/.

  6. Copy the processed HTML files into the timeline directory replacing existing files of the same name.
    cp /institute/web/waters/timeline/process_newHTML/*.* \
      /institute/web/waters/timeline/
  7. Copy the new HTML files into the typology/process_newHTML/ directory for processing. It is essential to maintain a copy of the unprocessed HTML files in /institute/web/waters/typology/unprocHTML/:
    cp /institute/web/waters/typology/unprocHTML/*.* \
      /institute/web/waters/typology/process_newHTML/
  8. Run the convert_typology.pl script. This script will modify the HTML files in /institute/web/waters/typology/process_newHTML/.

  9. Copy the processed HTML files into the typology directory replacing existing files of the same name.
    cp /institute/web/waters/typology/process_newHTML/*.* \
      /institute/web/waters/typology/

Test the Maps

Point your web browser to /waters//first.html and click on "Typology" to build a typology map. Click on the yellow Timeline map icons along the bottom of the page to test them.

Programming Notes

makelist.pl (/institute/web/waters/scripts/)
Description: This script reads the .sgm file and creates a text file of ids and corresponding names called nameslist.txt that is used by the html conversion scripts (convert_typology.pl and convert_timeline.pl, below). Be aware that if the structure of the .sgm file changes you may have to modify the pattern matching code in the script.

convert_typology.pl: (/institute/web/waters/scripts/)
Description: This script creates modified HTML files for the "Typology Maps". The following functions are performed:

convert_timeline.pl: (/institute/web/waters/scripts/)
Description: This script creates modified html files (ISMAPS) for the "JPEG" option of the "Timeline Maps". Each of the three form options "Basic", "With Contemporary Street Grid", and "With Contemporary Topography" use the JPG and HTM files that are placed in /institute/web/waters/timeline/$foo/. The following functions are performed:

waters.pl: (/www/httpd/cgi-bin/)
Description: This script creates the dynamic HTML and composite JPEGs for the "Typology Maps" ("Create Map"). It uses the .tga and .htm files found in /institute/web/waters/typology. The JPEG and VRML files that it creates are placed in /institute/web/waters/tmp. These files are kept for 36 hours and then deleted by a cron job (dfiles.pl). The following functions are performed:

If the ImageMagick software is updated be sure to check the maps and make certain they work properly.

waterssearch.pl: (/www/httpd/cgi-bin/)
Description: A CGI script that provides the interface between the ISMAPs and Dynaweb.

dfiles.pl: (/usr/local/iath/bin/)
Description: This script deletes files in the /institute/web/waters/tmp directory that are more than 36 hours old and have the file extension .wrl or .jpeg. It is located in /usr/local/iath/bin and run automatically by cron.