NOAA Geospatial

NOAA stewards one of the largest collection of environmental data in the world. Many of these data include a location on the earth, so they are GeoSpatial Data. Many NOAA scientists and data managers are experimenting with tools specifically designed for analyzing, managing and distributing geospatial data. This forum is for sharing information on those tools.

Messages Inline: 0 1

None First NOAA Geospatial Data Workshop

Date: 2000, Dec 05
From: Ted Habermann <Ted.Haberman@noaa.gov>


The First NOAA GeoSpatial Data Workshop was held in Silver Spring between Nov. 28 - Dec. 1, 2000. The workshop included sections on metadata, data access, modern applications within NOAA, NOAA's spatial data infrastructure, and many other topics.

Idea Searchable Workshop Agenda

Re: None First NOAA Geospatial Data Workshop (Ted Habermann)
Date: 2000, Dec 05
From: Ted Habermann <Ted.Habermann@noaa.gov>


Ted Habermann from NOAA's National Geophysical Data Center spoke about using the NNDC Interface Database for accessing distributed databases. He applied that technique to a database with the agenda for this meeting. It can be used to search the agenda.

None GeoSpatial Tools

Date: 2000, Dec 05
From: Ted Habermann <Ted.Habermann@noaa.gov>



None ESRI Spatial Database Engine

Re: None GeoSpatial Tools (Ted Habermann)
Date: 2000, Dec 05
From: Ted Habermann <Ted.Habermann@noaa.gov>


The ESRI Spatial Database Engine is a tool used with relational database systems in order to make the data in those databases available to ESRI GIS clients (to spatially enable those databases. SDE FAQ are available at ESRI. This forum includes information on SDE from NOAA users.

None Loading Data Into SDE

Re: None ESRI Spatial Database Engine (Ted Habermann)
Date: 2000, Dec 08
From: Mark A. Ohrenschall <Mark.A.Ohrenschall@noaa.gov>


Presently we have three ways of loading data into SDE: 1) from shapefiles, 2) by spatially enabling DBMS tables, and 3) from FreeForm-described data files.


None Automatically Loading And Optimizing Shapefiles In SDE

Re: None Loading Data Into SDE (Mark A. Ohrenschall)
Date: 2000, Dec 08
From: Mark A. Ohrenschall <Mark.A.Ohrenschall@noaa.gov>


Introduction

Probably everyone who has worked with SDE and shapefiles is familiar with the shp2sde utility. Depending on the size and number of shapefiles this may be enough. However, for large shapefiles and large quantities, I have a Perl script which will load, set optimum layer grid sizes, set optimum Oracle table extents, calculate the layer envelope, and grant select access to other users on any number of shapefiles.

I’ll cover each of these steps next, and finish by presenting the Perl script. (Thanks to Tim Clark of ESRI for providing the optimizing and tuning information which is the foundation of this article.)

Loading and Optimizing Shapefiles

Optimizing layer grid sizes

The -g option (layer grid sizes) is required when running shp2sde, so what value do you use? I usually have no idea, so I pick a reasonable number for starters, for example:

whiterim(/home/mao/SDE/shp){9}: shp2sde -o create -l eq477shp,geometry -f eq477shp.shp -g 5,15,45 -x -200,-110,1000000
-c 100 -a all -k IMPORT -e +p -G 4326 -u quake
ESRI SDE Shape to Layer Loading Utility   Fri Dec  8 13:12:15 2000
------------------------------------------------------------------------
649419     features converted.
649419     features stored.

Then I run sdelayer -o si_stats once the SDE layer has been created to see how good my guess was (with the parameter we’re trying to change in bold, brown highlights):

whiterim(/home/mao/SDE/shp){10}: sdelayer -o si_stats -l eq477shp,geometry -u quake

ESRI SDE Layer Administration Utility Fri Dec  8 15:18:22 2000
--------------------------------------------------------------
Layer 465 Spatial Index Statistics:
Level 1,   Grid Size 5
|-------------------------------------------------------------------|
| Grid Records: 649419                                              |
| Feature Records: 649419                                           |
| Grids/Feature Ratio:  1.00                                        |
| Avg. Features per Grid: 428.66                                     |
| Max. Features per Grid: 35049                                     |
| % of Features Wholly Inside 1 Grid: 100.00                         |
|-------------------------------------------------------------------|
|               Spatial Index Record Count By Group                 |
| Grids:      <=4    >4    >10    >25    >50    >100   >250   >500  |
|---------- ------ ------ ------ ------ ------ ------ ------ ------ |
| Features: 649419      0      0      0      0      0      0      0 |
| % Total:     100%     0%     0%     0%     0%     0%     0%     0%|
|-------------------------------------------------------------------|

Level 2,   Grid Size 15
|-------------------------------------------------------------------|
| Grid Records: 0                                                   |
| Feature Records: 0                                                |
| Grids/Feature Ratio:  0.00                                        |
| Avg. Features per Grid:  0.00                                     |
| Max. Features per Grid: 0                                         |
| % of Features Wholly Inside 1 Grid:  0.00                         |
|-------------------------------------------------------------------|
|               Spatial Index Record Count By Group                 |
| Grids:      <=4    >4    >10    >25    >50    >100   >250   >500  |
|---------- ------ ------ ------ ------ ------ ------ ------ ------ |
| Features:      0      0      0      0      0      0      0      0 |
| % Total:       0%     0%     0%     0%     0%     0%     0%     0%|
|-------------------------------------------------------------------|

Level 3,   Grid Size 45
|-------------------------------------------------------------------|
| Grid Records: 0                                                   |
| Feature Records: 0                                                |
| Grids/Feature Ratio:  0.00                                        |
| Avg. Features per Grid:  0.00                                     |
| Max. Features per Grid: 0                                         |
| % of Features Wholly Inside 1 Grid:  0.00                         |
|-------------------------------------------------------------------|
|               Spatial Index Record Count By Group                 |
| Grids:      <=4    >4    >10    >25    >50    >100   >250   >500  |
|---------- ------ ------ ------ ------ ------ ------ ------ ------ |
| Features:      0      0      0      0      0      0      0      0 |
| % Total:       0%     0%     0%     0%     0%     0%     0%     0%|
|-------------------------------------------------------------------|

(I don’t know why Level 2 and 3 are being ignored.)

Well, I’ve been told it’s good to have the average features per grid be around 75 to 150, and since I’m taking a mechanical approach to optimizing the grid size, I’ll consider the job done when Level 1 has an average of 112.5 +/- 37.5 features per grid. Tom Carey’s fast algorithm for approaching this range is to estimate a new grid size by multiplying the previous grid size by the square root of the ratio of the target and actual grid sizes, which in this case gives me 5 * sqrt(112.5 / 428.66) = 2.56147302. This formula reflects the geometric argument that if features are evenly distributed, then—in this case—5 * 5 is proportional to 428.66 and so X * X should be proportional to 112.5 where 5 is the current grid size with a 428.66 average and X is the grid size that should give a 112.5 average. So dividing these two proportionalities and solving for X yields the general formula X = G * sqrt(T / M) where X is the new grid size, G is the current grid size, T is the target average features per grid, and M is the current average features per grid.

So here goes my second try (and since SDE is ignoring Levels 2 and 3, so will I):

whiterim(/home/mao/SDE/shp){15}: sdelayer -o alter -l eq477shp,geometry -g 2.56147302 -u quake

ESRI SDE Layer Administration Utility Fri Dec  8 15:53:23 2000
--------------------------------------------------------------
Change Layer Grid Size from (7.684419059,0,0)
                            to (2.56147302,0,0),
Are you sure? (Y/N): y

Successfully Modified the Layer
  Grid size for eq477shp changed and Spatial Index rebuilt.

whiterim(/home/mao/SDE/shp){16}: sdelayer -o si_stats -l eq477shp,geometry -u quake

ESRI SDE Layer Administration Utility Fri Dec  8 15:57:54 2000
--------------------------------------------------------------
Layer 465 Spatial Index Statistics:
Level 1,   Grid Size 2.56147302
|-------------------------------------------------------------------|
| Grid Records: 649419                                              |
| Feature Records: 649419                                           |
| Grids/Feature Ratio:  1.00                                        |
| Avg. Features per Grid: 168.94                                     |
| Max. Features per Grid: 28257                                     |
| % of Features Wholly Inside 1 Grid: 100.00                         |
|-------------------------------------------------------------------|
|               Spatial Index Record Count By Group                 |
| Grids:      <=4    >4    >10    >25    >50    >100   >250   >500  |
|---------- ------ ------ ------ ------ ------ ------ ------ ------ |
| Features: 649419      0      0      0      0      0      0      0 |
| % Total:     100%     0%     0%     0%     0%     0%     0%     0%|
|-------------------------------------------------------------------|

If the points were really evenly distributed we would have hit the target average (112.5) on the first try. However, applying the same formula on the latest approximation should yield an even better approximation, so we’ll continue until we’re in the ballpark:

whiterim(/home/mao/SDE/shp){17}: sdelayer -o alter -l eq477shp,geometry -g 2.090257556 -u quake 

ESRI SDE Layer Administration Utility Fri Dec  8 16:15:57 2000
--------------------------------------------------------------
Change Layer Grid Size from (2.56147302,0,0)
                            to (2.090257556,0,0),
Are you sure? (Y/N): y

Successfully Modified the Layer
  Grid size for eq477shp changed and Spatial Index rebuilt.

whiterim(/home/mao/SDE/shp){18}: sdelayer -o si_stats -l eq477shp,geometry -u quake

ESRI SDE Layer Administration Utility Fri Dec  8 16:19:26 2000
--------------------------------------------------------------
Layer 465 Spatial Index Statistics:
Level 1,   Grid Size 2.090257556
|-------------------------------------------------------------------|
| Grid Records: 649419                                              |
| Feature Records: 649419                                           |
| Grids/Feature Ratio:  1.00                                        |
| Avg. Features per Grid: 129.42                                     |
| Max. Features per Grid: 27117                                     |
| % of Features Wholly Inside 1 Grid: 100.00                         |
|-------------------------------------------------------------------|
|               Spatial Index Record Count By Group                 |
| Grids:      <=4    >4    >10    >25    >50    >100   >250   >500  |
|---------- ------ ------ ------ ------ ------ ------ ------ ------ |
| Features: 649419      0      0      0      0      0      0      0 |
| % Total:     100%     0%     0%     0%     0%     0%     0%     0%|
|-------------------------------------------------------------------|

We’re in the 75 – 150 range, so we’ll stop optimizing the grid layer sizes now.

Avoid the DEFAULTS configuration section

Here’s what the DEFAULTS configuration section looks like in one of our dbtune.sde files (with the interesting parts in bold, blue highlights):

DEFAULTS Configuration Section From a dbtune.sde file
##DEFAULTS

INDEX_TABLESPACE sde_indexes

F_TBLSP         sde_features            # Feature Tablespace.
F_INIT          40960                   #          INITIAL (40960 bytes).
F_NEXT          40960                   #          NEXT (40960 bytes).
F_MINX          1                       #          Minextents (1)
F_MAXX          55                      #          Maxextents (55)
F_PCTI          0                       #          PCTINCREASE (0)
F_ITRANS        2                       #          INITTRANS (2)
F_MAXTRS        3                       #          MAXTRANS (3)
F_PCTFREE       5                       #          PCTFREE (5%)
F_PCTUSD        90                      #          PCTUSED (90%)

F_IX1_INIT      10240                   # Feature DBMS Index INITIAL
F_IX1_NEXT      10240                   #                    NEXT

A_TBLSP         sde_features
A_INIT          40960                   #          INITIAL (40960 bytes).
A_NEXT          40960                   #          NEXT (40960 bytes).
A_MINX          1                       #          Minextents (1) Default
A_MAXX          55                      #          Maxextents (55) Default
A_PCTI          0                       #          PCTINCREASE (0)
A_ITRANS        2                       #          INITTRANS (2)
A_MAXTRS        3                       #          MAXTRANS (3)
A_PCTFREE       5                       #          PCTFREE (5%)
A_PCTUSD        90                      #          PCTUSED (90%)

A_IX1_INIT      40960                   #          Initial extent size
A_IX1_NEXT      40960                   #          Next extent size

S_TBLSP         sde_spatial_idx         # Spatial Index Tablespace.
S_INIT          40960                   #          INITIAL (40960).
S_NEXT          40960                   #          NEXT (40960).
S_MINX          1                       #          Minextents (1) Default
S_MAXX          55                      #          Maxextents (55) Default
S_PCTI          0                       #          PCTINCREASE (0)
S_ITRANS        2                       #          INITTRANS (2)
S_MAXTRS        3                       #          MAXTRANS (3)
S_PCTFREE       5                       #          PCTFREE (5%)
S_PCTUSD        90                      #          PCTUSED (90%)

S_IX1_INIT      10240                   # Spatial DBMS Index INITIAL
S_IX1_NEXT      10240                   #                    NEXT
S_IX2_INIT      40960                   #          Initial extent size
S_IX2_NEXT      40960                   #          Next extent size

END

This means that when you don’t specify a configuration keyword when running shp2sde (using the -k option), the attribute, feature, and spatial index tables and attribute and 2nd spatial indexes can be no larger than 2,027,520 bytes (40,960 bytes times 55 extents times 90%), and the feature and 1st spatial indexes can be no larger than 506,880 bytes (10,240 bytes times 55 extents times 90%).

So for loading large shapefiles I have created the IMPORT configuration section (unlike DEFAULTS, IMPORT has no special significance to its name):

IMPORT Configuration Section From a dbtune.sde file
##IMPORT

F_MAXX 1000
F_INIT 1M
F_NEXT 1M
F_PCTFREE 0             # Suitable only for static data sets
F_PCTUSD 99

A_MAXX 1000
A_INIT 1M
A_NEXT 1M
A_PCTFREE 0             # Suitable only for static data sets
A_PCTUSD 99

S_MAXX 1000
S_INIT 1M
S_NEXT 1M
S_PCTFREE 0             # Suitable only for static data sets
S_PCTUSD 99

A_IX1_INIT 1M
A_IX1_NEXT 1M

F_IX1_INIT 1M
F_IX1_NEXT 1M

S_IX1_INIT 1M
S_IX1_NEXT 1M

S_IX2_INIT 1M
S_IX2_NEXT 1M

END

So when I run shp2sde with the -k IMPORT option, I’m allowing for nearly up to a 1000 megabytes for all the tables and indexes. The downside to this is that any table or index which occupies a fraction of a megabyte has that entire extent allocated for its use, which can result in some slack space.

To avoid wasted space, I create a custom configuration section for each shapefile I load. Here is an example:

Example Custom Configuration Section From a dbtune.sde file
##EQ477SHP

# Created on Fri Dec  8 11:57:08 2000

A_INIT 1335296          # Analyzed size: 144,580,608, Rows: 649,419
A_NEXT 1M
A_MAXX 139              # A_IX1 also uses this parameter
A_PCTFREE 0             # Suitable only for static data sets
A_PCTUSD 99

F_INIT 1458176          # Analyzed size: 42,958,848
F_NEXT 1M
F_MAXX 41               # F_IX1 also uses this parameter
F_PCTFREE 0             # Suitable only for static data sets
F_PCTUSD 99

S_INIT 1269760          # Analyzed size: 26,165,248
S_NEXT 1M
S_MAXX 28               # S_IX1,2 also use this parameter
S_PCTFREE 0             # Suitable only for static data sets
S_PCTUSD 99

A_IX1_INIT 1720320      # Analyzed size: 9,994,240
A_IX1_NEXT 1M

F_IX1_INIT 1720320      # Analyzed size: 9,994,240
F_IX1_NEXT 1M

S_IX1_INIT 1794048      # Analyzed size: 29,794,304
S_IX1_NEXT 1M

S_IX2_INIT 1335296      # Analyzed size: 10,649,600
S_IX2_NEXT 1M

END

I determined the table and index sizes for a shapefile after I had loaded it into SDE with the IMPORT configuration section, and then I deleted the layer and loaded the shapefile again using a configuration section that was sized just for that shapefile. Note that I’m still using 1 megabyte extent sizes. Originally I specified only single extents that were the size of the tables or indexes (e.g., A_INIT about 138 M, A_NEXT 0, and A_MAXX 1) but I found that because of tablespace fragmentation I couldn’t always request a 138 Mb extent. Feel free to tune extent sizes versus number of extents as you see fit.

Here are the Oracle queries I ran to determine the table and index sizes:

Oracle SQL Queries Estimating Table and Index Sizes
SQLWKS> analyze table eq477shp estimate statistics;
Statement processed.
SQLWKS> analyze table f465 estimate statistics;
Statement processed.
SQLWKS> analyze table s465 estimate statistics;
Statement processed.
SQLWKS> select table_name,blocks from user_tables where table_name = 'EQ477SHP';
TABLE_NAME                     BLOCKS    
------------------------------ ----------
EQ477SHP                            17649
1 row selected.
SQLWKS> select table_name,blocks from user_tables where table_name like '%465';
TABLE_NAME                     BLOCKS    
------------------------------ ----------
F465                                 5244
S465                                 3194
2 rows selected.
SQLWKS> select index_name,leaf_blocks from user_indexes where index_name like '%465%'
     2> 
INDEX_NAME                     LEAF_BLOCK
------------------------------ ----------
A465_IX1                             1220
F465_UK1                             1357
S465_IX1                             3637
S465_IX2                             1300
4 rows selected.

You can ask your DataBase Administrator what the block size is for your database. Here is one way to determine this (this may require DBA privileges):

Oracle SQL Query to Determine Blocksize
SQLWKS> select distinct tablespace_name, blocksize from sys_dba_segs
     2> 
TABLESPACE_NAME                BLOCKSIZE 
------------------------------ ----------
HABER                                8192
IDB_USER                             8192
RBS                                  8192
SDE                                  8192
SDE_FEATURES                         8192
SDE_INDEXES                          8192
SDE_SPATIAL_IDX                      8192
SDE_USER                             8192
SYSTEM                               8192
TEMP                                 8192
TOOLS                                8192
11 rows selected.

Miscellaneous

Some SDE applications may require the layer envelope to be calculated which is done with the following command:

whiterim(/home/mao/SDE/shp){19}: sdelayer -o alter -l eq477shp,geometry -E calc -u quake

ESRI SDE Layer Administration Utility Fri Dec  8 16:47:50 2000
--------------------------------------------------------------

Successfully Modified the Layer

And letting others see your new SDE layer can be helpful:

whiterim(/home/mao/SDE/shp){20}: sdelayer -o grant -l eq477shp,geometry -A select -U public -u quake

ESRI SDE Layer Administration Utility Fri Dec  8 16:50:32 2000
--------------------------------------------------------------
SDE Access has been changed.

The Perl Script

Doing this by hand is how I and most people start doing tasks, but when I was presented with a multiple CD set of lots of shapefiles, it was time to automate. The following Perl script is somewhat customized for the ESRI Data & Maps CD sets (e.g., the Perl script prefixes shapefile names with directory codes) but much of the Perl script is generally applicable to any collection of shapefiles.

Perl Script to Batch Process shapefiles
#!perl -w

use DBI;
use File::Find;
use strict;

use Sys::Hostname;

my $DBTUNE = "f:\\ora8iexe\\etc\\dbtune.sde";

my $DIRSEP = '\\';

my $ATTR_PATH = "/home/mao";
my $ATTR_EXT  = "alias";

my $BLOCK_SIZE = 8192; # Check with your DBA on this one

my $ANALHOW = "estimate";

my $DEBUG = 0;
my $VERBOSE = 1;

my $PASSWD;
my $USER;
my $SERVER = hostname();

my $start_time = time;

my @pathname;

while ($#ARGV >= 0)
{
        my $arg = shift @ARGV;

        if ($arg =~ /-(\S+)/) {
                $arg = shift @ARGV;
                
                if ("u" eq lc $1) {
                        $USER = $arg;
                } elsif ("p" eq lc $1) {
                        $PASSWD = $arg;
                } elsif ("s" eq lc $1) {
                        $SERVER = $arg;
                }
        } else {
                push @pathname, $arg;
        }
}

if ($#pathname < 0 or !$USER or !$PASSWD)
{
        print "Please specify a user!\n" if !$USER and $#pathname >= 0;
        print "Please specify a password!\n" if !$PASSWD and $#pathname >= 0;
        
        print "\nUsage: $0 -u user -p password [-s server] shapefile [shapefiles...]\n";
        print "Alternate Usage:  $0 -u user -p password [-s server] -  < shapefilelist\n";
        print "Note use of hyphen in Alternate Usage\n";

        print "NOTE:  Please make a backup copy of $DBTUNE before continuing!!!\n";

        exit;
}

if ($pathname[$#pathname] eq '-')
{
        pop @pathname;

        while (<STDIN>)
        {
                push @pathname, $_;
        }
}

my @grid_size;

my $connect = $USER . '@' . $SERVER;
my $DBH = DBI->connect('DBI:Oracle:',$connect,$PASSWD) || die "Couldn't connect to database! ($DBI::errstr)\n";

for my $pathname (@pathname)
{
        find(\&do, $pathname);
}

my $stop_time = time - $start_time;
my $hours = int($stop_time / 3600);
my $minutes = int(($stop_time - 3600 * $hours) / 60);
my $seconds = $stop_time % 60;

printf("Total elapsed time: %d:%02d:%02d\n", $hours, $minutes, $seconds);

$DBH->disconnect;

sub do
{
        my $start_time = time;
        
        my $pathname = $File::Find::name;
        $pathname =~ s,/,$DIRSEP,;

        if ($DIRSEP eq "\\") {
                $pathname =~ s/\\{2,}/\\/g;
        } else {
                $pathname =~ s/$DIRSEP{2,}/$DIRSEP/g;
        }

        my @dirs;
        
        if ($DIRSEP eq "\\") {
                @dirs = split /\\/, $pathname;
        } else {
                @dirs = split /$DIRSEP/, $pathname;
        }

        my $filename = $dirs[$#dirs];
        my $tablename = $filename;
        $tablename =~ s/\.shp$//;
        $tablename =~ s/-/_/;

        return unless -f $pathname && -s $pathname && $filename =~ /\.shp$/;

        print (($VERBOSE ? "\n" : "") . "\nProcessing $pathname\n" . ($VERBOSE ? "\n" : ""));

        my $attrmode = "all";
        my $attrfile = $ATTR_PATH . "$DIRSEP$tablename." . $ATTR_EXT;

        if ($DIRSEP eq "\\") {
                $attrfile =~ s/\\\\/\\/g;
        } else {
                $attrfile =~ s/$DIRSEP$DIRSEP/$DIRSEP/g;
        }
        
        $attrfile =~ s/\.\./\./;

        $attrmode = "file=$attrfile" if -e $attrfile;

        my $entity_types = "+";

        my $cmd = "shpinfo -f $pathname";
        my @cmd = `$cmd`;

        return if &check_cmd($cmd, \@cmd);
        
        for $_ (@cmd)
        {
                $entity_types .= "p" if /^Type:/ && /point/i;
                $entity_types .= "sl" if /^Type:/ && /arc/i;
                $entity_types .= "a" if /^Type:/ && /polygon/i;
        }

        $tablename = &mkuniq(\@dirs, $tablename);

        $cmd = "sdelayer -o describe -l $tablename,geometry -u $USER -p $PASSWD -s $SERVER";
        print "Executing: $cmd\n" if $VERBOSE;
        @cmd = `$cmd`;

        unless (join("", @cmd) =~ /error/i) {
                $cmd = "sdetable -o delete -t $tablename -u $USER -p $PASSWD -s $SERVER -N";
                print "Executing: $cmd\n" if $VERBOSE;
                @cmd = `$cmd`;
                return if &check_cmd($cmd, \@cmd);
        }

        $cmd = "shp2sde -o create -l $tablename,geometry -f $pathname -g 5,15,45 -x -200,-110,1000000 -c 100 -a $attrmode -k IMPORT -e $entity_types -G 4326 -u $USER -p $PASSWD -s $SERVER";
        print "Executing: $cmd\n" if $VERBOSE;
        @cmd = `$cmd`;
        return if &check_cmd($cmd, \@cmd);

        print "Determining optimum grid size...\n" if $VERBOSE;

        @grid_size = &si_stats($tablename);
        return if 1 == $#grid_size and -1 == $grid_size[1];

        print "Determining optimum table extents (assuming no updates)...\n" if $VERBOSE;

        $cmd = "sdetable -o delete -t $tablename -u $USER -p $PASSWD -s $SERVER -N";
        print "Executing: $cmd\n" if $VERBOSE;
        @cmd = `$cmd`;
        return if &check_cmd($cmd, \@cmd);

        $cmd = "shp2sde -o create -l $tablename,geometry -f $pathname -g $grid_size[1],$grid_size[2],$grid_size[3] -x -200,-110,1000000 -c 100 -a $attrmode -k IMPORT -e $entity_types -G 4326 -u $USER -p $PASSWD -s $SERVER";
        print "Executing: $cmd\n" if $VERBOSE;
        @cmd = `$cmd`;
        return if &check_cmd($cmd, \@cmd);
        
        unless (&op_tables($tablename)) {
                $cmd = "sdetable -o delete -t $tablename -u $USER -p $PASSWD -s $SERVER -N";
                print "Executing: $cmd\n" if $VERBOSE;
                @cmd = `$cmd`;
                return if &check_cmd($cmd, \@cmd);

                $cmd = "shp2sde -o create -l $tablename,geometry -f $pathname -g $grid_size[1],$grid_size[2],$grid_size[3] -x -200,-110,1000000 -c 100 -a $attrmode -k $tablename -e $entity_types -G 4326 -u $USER -p $PASSWD -s $SERVER";
                print "Executing: $cmd\n" if $VERBOSE;
                @cmd = `$cmd`;
                return if &check_cmd($cmd, \@cmd);

                &grant_select($tablename);

                &calc_envelope($tablename);

        }

        my $stop_time = time - $start_time;
        my $hours = int($stop_time / 3600);
        my $minutes = int(($stop_time - 3600 * $hours) / 60);
        my $seconds = $stop_time % 60;
        
        printf("Elapsed time: %d:%02d:%02d\n", $hours, $minutes, $seconds);
}

sub mkuniq
{
        my $dirp = shift(@_);
        my $tablename = shift(@_);

        my %codes = (
        "europe" => "eu",
        "mexico" => "mx",
        "canada" => "ca",
        "usa"    => "us",
        "usadet" => "us",
        "usagen" => "us",
        "southusa" => "us",
        );

        UNIQ: for my $dir (@$dirp)
        {
                for my $country (sort keys %codes)
                {
                        if ($dir =~ /^$country$/i && $tablename !~ /^$codes{$country}/)
                        {
                                $tablename = $codes{$country} . $tablename;
                                last UNIQ;
                        }
                }
        }
        
        return $tablename;
}


sub si_stats
{
        my $tablename = shift(@_);
        my $level;
        my @grid_size = (1,1,3,9);
        my @new_grid_size = (1,1,3,9);
        my @avg_features = (1,1,1,1);
        my @feature_records;

        my $LOW_END = 75;
        my $HIGH_END = 150;

        my $TARGET_AVG = ($HIGH_END + $LOW_END) / 2;

        my $tries = 0;
        my $error = 0;
for (;;)
{
        my $cmd = "sdelayer -o si_stats -l $tablename,geometry -u $USER -p $PASSWD -s $SERVER";

        print "Executing: $cmd\n" if $VERBOSE;
        my @si_stats = `$cmd`;
        return $error if ($error = check_cmd($cmd, \@si_stats));
        
        for (@si_stats)
        {
                $level = $1 if /^Level\s*(\d),/;
                $new_grid_size[$level] = $grid_size[$level] = $1 if $level and (/^Level\s*$level,   Grid Size\s*([\d\.]*)/);
                
                $avg_features[$level] = $1 if /\| Avg\. Features per Grid:\s*([\d\.]*)/;
                $feature_records[$level] = $1 if /\| Feature Records:\s*([\d\.]*)/;
        }

        last unless $feature_records[1] > 300 && ($avg_features[1] > $HIGH_END || $avg_features[1] < $LOW_END);

        while ($level)
        {
                $level--;

                next if $feature_records[$level+1] < 300; # Don't waste my time!
                next if $avg_features[$level+1] < $HIGH_END && $avg_features[$level+1] > $LOW_END;

                $new_grid_size[$level+1] = $grid_size[$level+1] * sqrt($TARGET_AVG/$avg_features[$level+1]);
        }

        for ($level = 2; $level <= $#new_grid_size; $level++)
        {
                $new_grid_size[$level] = 3.01 * $new_grid_size[$level - 1] if $new_grid_size[$level] < 3 * $new_grid_size[$level - 1] && $new_grid_size[$level] ne 0;
        }

        print "$tablename has a $avg_features[1]/$avg_features[2]/$avg_features[3] average with a $grid_size[1]/$grid_size[2]/$grid_size[3] grid_size, trying $new_grid_size[1]/$new_grid_size[2]/$new_grid_size[3]\n" if $DEBUG;
        $cmd = "sdelayer -o alter -l $tablename,geometry -g $new_grid_size[1],$new_grid_size[2],$new_grid_size[3] -u $USER -p $PASSWD -s $SERVER -N";

        print "Executing: $cmd\n" if $VERBOSE;
        my @si_alter = `$cmd`;

        return $error if ($error = check_cmd($cmd, \@si_alter));

        last if $tries++ > 10; # bail if thrashing
}

print "Done: $tablename has a $avg_features[1]/$avg_features[2]/$avg_features[3] average with a $grid_size[1]/$grid_size[2]/$grid_size[3] grid_size\n" if $VERBOSE;

        return @grid_size;
}

sub insert_commas
{
        my $number = shift(@_);

        my $comma_ndx = 3;
        while ($comma_ndx < length($number))
        {
                substr($number, length($number) - $comma_ndx, 0) = ",";
                $comma_ndx += 4;
        }

return $number;
}

sub calc_envelope
{
        my $tablename = shift(@_);

        my $cmd = "sdelayer -o alter -E calc -l $tablename,geometry -u $USER -p $PASSWD -s $SERVER";
        print "Executing: $cmd\n" if $VERBOSE;
        my @cmd = `$cmd`;
        return &check_cmd($cmd, \@cmd);
}


sub grant_select
{
        my $tablename = shift(@_);

        my $cmd = "sdelayer -o grant -A select -U public -l $tablename,geometry -u $USER -p $PASSWD -s $SERVER";
        print "Executing: $cmd\n" if $VERBOSE;
        my @cmd = `$cmd`;
        return &check_cmd($cmd, \@cmd);
}

sub op_extent_blocks
{
        my $tablename = shift;

        my $query = "select layer_id from sde.layers where table_name='$tablename' and owner='" . uc $USER . "'";

        my $layer_id_query = $DBH->prepare($query) or return "Can't prepare $query";

        my $rv = $layer_id_query->execute or return "Can't execute $query";

        if (my @layer_id_row = $layer_id_query->fetchrow_array) {
                my $layer_id = $layer_id_row[0];

                my $query = "analyze table $tablename delete statistics";
                print "Preparing $query\n" if $DEBUG;

                my $analyze_a = $DBH->prepare($query) or die $query;
                $analyze_a->execute or die "Can't execute delete query";

                $query = "analyze table F$layer_id delete statistics";
                print "Preparing $query\n" if $DEBUG;

                my $analyze_f = $DBH->prepare($query) or die $query;
                $analyze_f->execute or die "Can't execute delete query";

                $query = "analyze table S$layer_id delete statistics";
                print "Preparing $query\n" if $DEBUG;

                my $analyze_s = $DBH->prepare($query) or die $query;
                $analyze_s->execute or die "Can't execute delete query";

                $query = "analyze table $tablename $ANALHOW statistics";
                print "Preparing $query\n" if $DEBUG;

                $analyze_a = $DBH->prepare($query) or die $query;
                $analyze_a->execute or die "Can't execute analyze query";

                $query = "analyze table F$layer_id $ANALHOW statistics";
                print "Preparing $query\n" if $DEBUG;

                $analyze_f = $DBH->prepare($query) or die $query;
                $analyze_f->execute or die "Can't execute analyze query";

                $query = "analyze table S$layer_id $ANALHOW statistics";
                print "Preparing $query\n" if $DEBUG;

                $analyze_s = $DBH->prepare($query) or die $query;
                $analyze_s->execute or die "Can't execute analyze query";

                my $business_blocks = &get_table_blocks("$tablename");
                my $feature_blocks = &get_table_blocks("F${layer_id}");
                my $spatial_blocks = &get_table_blocks("S${layer_id}");

                my $ndx_business_blocks = &get_index_blocks("A${layer_id}_%1");
                my $ndx_feature_blocks = &get_index_blocks("F${layer_id}_%1");
                my $ndx_spatial1_blocks = &get_index_blocks("S${layer_id}_%1");
                my $ndx_spatial2_blocks = &get_index_blocks("S${layer_id}_%2");

                return ($business_blocks, $feature_blocks, $spatial_blocks, $ndx_business_blocks, $ndx_feature_blocks, $ndx_spatial1_blocks, $ndx_spatial2_blocks);
        }
}

sub op_tables
{
        my $tablename = shift(@_);
        $tablename =~ tr/a-z/A-Z/;

        my $config_section;
        my @layer_id_row;

        my $query = "select count(*) from $tablename";
        print "Preparing $query\n" if $DEBUG;
        my $count_query = $DBH->prepare($query) or die $query;
        $count_query->execute or die "Can't execute $query";
        my @row_count = $count_query->fetchrow_array;
        my $row_count = $row_count[0];

if (my @grid_blocks = &op_extent_blocks($tablename)) {
        my %fudge = (
                "a"   => 1,
                "f"   => 1,
                "s"   => 1,
                "ai"  => 1,
                "fi"  => 1,
                "si1" => 1,
                "si2" => 1
        );

        my $PCTFREE = 0;
        my $PCTUSED = 99;

        my $a_blocks = int((1 - ($PCTUSED / 100) + $fudge{a}) * $grid_blocks[0]) + 2;
        my $f_blocks = int((1 - ($PCTUSED / 100) + $fudge{f}) * $grid_blocks[1]) + 2;
        my $s_blocks = int((1 - ($PCTUSED / 100) + $fudge{s}) * $grid_blocks[2]) + 2;

        my $a_ix1_blocks = int((1 - ($PCTUSED / 100) + $fudge{ai}) * $grid_blocks[3]) + 2;
        my $f_ix1_blocks = int((1 - ($PCTUSED / 100) + $fudge{fi}) * $grid_blocks[4]) + 2;

        my $s_ix1_blocks = int((1 - ($PCTUSED / 100) + $fudge{si1}) * $grid_blocks[5]) + 2;
        my $s_ix2_blocks = int((1 - ($PCTUSED / 100) + $fudge{si2}) * $grid_blocks[6]) + 2;

# Tablespace may be fragmented, so chunk extent sizes...

        my $BLKMB = (1024 * 1024) / $BLOCK_SIZE; # blocks per MB (e.g., 128)
        
        my $a_init = $BLOCK_SIZE * ($a_blocks % $BLKMB + ($a_blocks > $BLKMB ? $BLKMB : 0));
        my $a_maxx = ($a_blocks > $BLKMB ? 0 : 1) + int($a_blocks / $BLKMB);

        my $f_init = $BLOCK_SIZE * ($f_blocks % $BLKMB + ($f_blocks > $BLKMB ? $BLKMB : 0));
        my $f_maxx = ($f_blocks > $BLKMB ? 0 : 1) + int($f_blocks / $BLKMB);

        my $s_init = $BLOCK_SIZE * ($s_blocks % $BLKMB + ($s_blocks > $BLKMB ? $BLKMB : 0));
        my $s_maxx = ($s_blocks > $BLKMB ? 0 : 1) + int($s_blocks / $BLKMB);

        my $a_ix1_init = $BLOCK_SIZE * ($a_ix1_blocks % $BLKMB + ($a_ix1_blocks > $BLKMB ? $BLKMB : 0));
        my $a_ix1_maxx = ($a_ix1_blocks > $BLKMB ? 0 : 1) + int($a_ix1_blocks / $BLKMB);

        my $f_ix1_init = $BLOCK_SIZE * ($f_ix1_blocks % $BLKMB + ($f_ix1_blocks > $BLKMB ? $BLKMB : 0));
        my $f_ix1_maxx = ($f_ix1_blocks > $BLKMB ? 0 : 1) + int($f_ix1_blocks / $BLKMB);

        my $s_ix1_init = $BLOCK_SIZE * ($s_ix1_blocks % $BLKMB + ($s_ix1_blocks > $BLKMB ? $BLKMB : 0));
        my $s_ix1_maxx = ($s_ix1_blocks > $BLKMB ? 0 : 1) + int($s_ix1_blocks / $BLKMB);

        my $s_ix2_init = $BLOCK_SIZE * ($s_ix2_blocks % $BLKMB + ($s_ix2_blocks > $BLKMB ? $BLKMB : 0));
        my $s_ix2_maxx = ($s_ix2_blocks > $BLKMB ? 0 : 1) + int($s_ix2_blocks / $BLKMB);

        $a_maxx = &max($a_maxx, $a_ix1_maxx);
        $f_maxx = &max($f_maxx, $f_ix1_maxx);
        $s_maxx = &max($s_maxx, $s_ix1_maxx, $s_ix2_maxx);

        $config_section = sprintf "##$tablename\n\n";

        my $date = localtime();
        $config_section .=  sprintf "# Created on $date\n\n";

        $config_section .=  sprintf "A_INIT $a_init             # Analyzed size: %s, Rows: %s\n", &insert_commas($grid_blocks[0] * $BLOCK_SIZE), &insert_commas($row_count);
        $config_section .=  sprintf "A_NEXT 1M\n" if $a_maxx > 1;
        $config_section .=  sprintf "A_MAXX $a_maxx             # A_IX1 also uses this parameter\n";
        $config_section .=  sprintf "A_PCTFREE $PCTFREE         # Suitable only for static data sets\n";
        $config_section .=  sprintf "A_PCTUSD $PCTUSED\n\n";

        $config_section .=  sprintf "F_INIT $f_init             # Analyzed size: %s\n", &insert_commas($grid_blocks[1] * $BLOCK_SIZE);
        $config_section .=  sprintf "F_NEXT 1M\n" if $f_maxx > 1;
        $config_section .=  sprintf "F_MAXX $f_maxx             # F_IX1 also uses this parameter\n";
        $config_section .=  sprintf "F_PCTFREE $PCTFREE         # Suitable only for static data sets\n";
        $config_section .=  sprintf "F_PCTUSD $PCTUSED\n\n";

        $config_section .=  sprintf "S_INIT $s_init             # Analyzed size: %s\n", &insert_commas($grid_blocks[2] * $BLOCK_SIZE);
        $config_section .=  sprintf "S_NEXT 1M\n" if $s_maxx > 1;
        $config_section .=  sprintf "S_MAXX $s_maxx             # S_IX1,2 also use this parameter\n";
        $config_section .=  sprintf "S_PCTFREE $PCTFREE         # Suitable only for static data sets\n";
        $config_section .=  sprintf "S_PCTUSD $PCTUSED\n\n";

        $config_section .=  sprintf "A_IX1_INIT $a_ix1_init     # Analyzed size: %s\n", &insert_commas($grid_blocks[3] * $BLOCK_SIZE);
        $config_section .=  sprintf "A_IX1_NEXT 1M\n" if $a_ix1_maxx > 1;

        $config_section .=  sprintf "\nF_IX1_INIT $f_ix1_init   # Analyzed size: %s\n", &insert_commas($grid_blocks[4] * $BLOCK_SIZE);
        $config_section .=  sprintf "F_IX1_NEXT 1M\n" if $f_ix1_maxx > 1;

        $config_section .=  sprintf "\nS_IX1_INIT $s_ix1_init   # Analyzed size: %s\n", &insert_commas($grid_blocks[5] * $BLOCK_SIZE);
        $config_section .=  sprintf "S_IX1_NEXT 1M\n" if $s_ix1_maxx > 1;

        $config_section .=  sprintf "\nS_IX2_INIT $s_ix2_init   # Analyzed size: %s\n", &insert_commas($grid_blocks[6] * $BLOCK_SIZE);
        $config_section .=  sprintf "S_IX2_NEXT 1M\n" if $s_ix2_maxx > 1;

        $config_section .= sprintf "\nEND\n\n";

} else {
        print "\nError: database query returned no rows:\n$query\n\n";

        return -1;
}

        unless (defined $config_section) {
                print "\nError creating configuration section\n\n";
                
                return -1;
        } else {        
                print "$config_section" if $VERBOSE > 1;

                open DBTUNE, "+< $DBTUNE" or die "Can't open for read/write $DBTUNE\n";
                flock(DBTUNE, 2);

                my @dbtune = <DBTUNE>;

                my $ignore;
                my $new_dbtune = "";
                for my $line (@dbtune)
                {
                        $ignore = 1 if $line =~ /^\s*##$tablename\s*$/;
                        my $skip_blank_lines = 0 if $line =~ /\S/;

                        $new_dbtune .= $line unless $ignore or $skip_blank_lines;
                
                        if ($ignore && $line =~ /^\s*END\s*$/)
                        {
                                $ignore = 0;
                                $skip_blank_lines = 1;
                        }
                }

                $new_dbtune .= $config_section;

                close DBTUNE;

                open DBTUNE, "> $DBTUNE" or die "Can't open for write $DBTUNE\n";

                print DBTUNE $new_dbtune;
        
                flock(DBTUNE, 8);
                close DBTUNE;

                return 0;
        }
}

sub get_table_blocks
{
        my $tablename = shift(@_);
        $tablename =~ tr/a-z/A-Z/;
        my @report_row;
        my $table_blocks;

        my $query = "select blocks,table_name from user_tables where table_name = '$tablename'";

        print "Preparing $query\n" if $DEBUG;

        my $report = $DBH->prepare($query) or die $query;
        $report->execute or die "Can't execute bytes query";

        while (@report_row = $report->fetchrow_array)
        {
                $table_blocks = $report_row[0];
                print "@report_row", "\n" if $DEBUG;
        }

        return $table_blocks;
}

sub get_index_blocks
{
        my $index_name = shift(@_);

        my $index_blocks;
        my @report_row;

        my $query = "select leaf_blocks,index_name from user_indexes where index_name like '$index_name'";

        print "Preparing $query\n" if $DEBUG;

        my $report = $DBH->prepare($query) or die $query;
        $report->execute or die "Can't execute bytes query";

        while (@report_row = $report->fetchrow_array)
        {
                $index_blocks = $report_row[0];
                print "@report_row", "\n" if $DEBUG;
        }

        return $index_blocks;
}

sub check_cmd($$)
{
        my $cmd = shift;
        my $out = shift;
        
        if (join ("", @$out) =~ /error/i) {
                print "\nError executing: \"$cmd\"\n", join "", @$out, "\n\n";

                return -1;
        } elsif ($VERBOSE > 1) {
                print "\n" . join ("" . @$out) . "\n\n";
        }

        return 0;
}


sub max($$;)
{
        if (wantarray) {
                my @max;
                my @els;

                # determine which array has most elements
                for my $i (0 .. $#_) {
                        push @els, $#{$_[$i]};
                }

                # take max of each ith element for each jth array
                for my $i (0 .. max(@els)) {
                        my @v;
                        for my $j (0 .. $#_) {
                                push @v, ${$_[$j]}[$i];
                        }
                        
                        push @max, scalar max(@v);
                }

                return @max;
        } else {
                my $max = shift;

                for my $foo (@_) {
                        $max = $foo if $max < $foo;
                }

                return $max;
        }
}

Question error in command

Re: None Automatically Loading And Optimizing Shapefiles In SDE (Mark A. Ohrenschall)
Date: 2002, Feb 25
From: Miguel Heras miguelheras


I'm trying to use your perl script but i get this command shp2sde -o create -l polbndl,gid -f /usr/users/sde/sic_umts/MiguelHeras/Australia/polbndl.shp -g 5,1 5,45 -x -200,-110,1000000 -c 100 -a all -k IMPORT -e + -G 4326 -u sde -p sdesic4 -s luca >> log.txt Layer polbndl,gid is incompatible with the input shape file type. ESRI SDE Shape to Layer Loading Utility Mon Feb 25 12:09:01 2002 ------------------------------------------------------------------------ Could you help me?

None Spatially Enabling DBMS Tables

Re: None Loading Data Into SDE (Mark A. Ohrenschall)
Date: 2000, Dec 12
From: Mark A. Ohrenschall <Mark.A.Ohrenschall@noaa.gov>


Introduction

In Automatically Loading And Optimizing Shapefiles In SDE we load shapefiles into SDE, and in my next article we load raw binary or ASCII data into SDE. In this article we look at spatially enabling data that are already in a DBMS.

dbms2sde

I have patterned the command-line usage of dbms2sde after the style of the ESRI administrative commands (options and variations specific to dbms2sde are shown in bold, brown highlights):

dbms2sde Command-line Help
Welcome to DBMS2SDE pre-release 0.1k Dec 14 2000 - an NGDC SDE 8 application

This application spatially enables a business table.

Usage syntax:
dbms2sde  -o point -l <table[,column]> [-g <grid_size>] [-k <config_keyword>]
          [-x <xoffset,yoffset,xyscale>] [-xname <xname>] [-z <zoffset,zscale>]
          [-yname <yname>] [-zname <zname>] [-m <moffset,mscale>] [-mname <mname>]
          [-G <projection_id>] [-w <“where_clause”>]
          [-key <fld>[,fld1][,fld2][,...]] [-c <commit_interval>]
          [-i <instance>] [-status file] [-progress file] [-summary file]
          [-D <database>] -s <server_name> -u <user_name> -p <user_password>
dbms2sde  -o rect -l <table[,column]> [-g <grid_size>] [-k <config_keyword>]
          [-x <xoffset,yoffset,xyscale>] [-z <zoffset,zscale>] [-zname <zname>]
          [-m <moffset,mscale>] [-mname <mname>]
          [-coords <"minx=expr, miny=expr, maxx=expr, maxy=expr">]
          [-G <projection_id>] [-w <“where_clause”>]
          [-key <fld>[,fld1][,fld2][,...]]  [-c <commit_interval>]
          [-i <instance>] [-status file] [-progress file] [-summary file]
          [-D <database>] -s <server_name> -u <user_name> -p <user_password>
dbms2sde  -?
dbms2sde  -h

Operations:
point        Add spatial layer to business table with point features
rect         Add spatial layer to business table with rectangle features

Options:
-c           Commit rate (default is the AUTOCOMMIT value from giomgr.defs).
-coords      Generate a rectangular polygon with lower-left and upper-right
             coordinates given by an SQL expression (evaluated per record)
             It must be quoted (e.g., "minx=longitude + 0.1, miny=...").
-D           Database or data source name. Not supported by all DBMSs.
-g           Layer grid sizes. Grid cell sizes for levels 2 and 3 are optional
             (default: 1.0,3.0,9.0). E.g., “-g 200” or “-g 200,1000,4000”.
-G           Coordinate system ID (see the pef.h file for the integer codes).
-i           SDE instance name (default: “esri_sde”).
-k           Layer configuration keyword in dbtune.sde file (default: “DEFAULTS”).
-key         Use a unique-valued column (or combination of columns) instead of
             coordinate values to enable table. This is faster and more reliable.
             STRONGLY RECOMMEND using -key with a PRIMARY KEY or indexed columns.
-l           The business table and it’s new spatial column (default: “geometry”).
             Use sdelayer -o delete if needed before running dbms2sde.
-m           The measure offset and scale values, separated by a comma
             (default: 0.0,1.0).
-mname       The business attribute for measure values.
-p           DBMS user password.
-progress    File to which progress messages are written (default: stderr)
-s           Server name.
-status      File to which status messages are written (default: stderr)
-summary     File to which summary information is written (default: stdout)
-u           DBMS user name.
-w           SQL where clause to limit the rows from the business table which are enabled.
             It must be quoted (e.g., “area < 1000”).
-x           The x and y offsets and scale values, separated by commas
             (default: -200.0,-110.0,1000000.0).
-xname       The business attribute for point features’ x coordinates (default: “longitude”).
-yname       The business attribute for point features’ y coordinates (default: “latitude”).
-z           The z offset and scale values, separated by a comma
             (default: 0.0,1.0).
-zname       The business attribute for z coordinates.

Presently dbms2sde only spatially enables point data, in which each row of a table corresponds to a single point, and all information about that point is contained within that row. It can create either a point shape or a rectangle shape for each table row (I could easily add an ellipse option—contact me if this interests you).

I could extend dbms2sde to spatially enable tables with line or area shapes whose vertices are derived from more than a single point (unlike the current -o rect option)—contact me if this interests you. However, there a variety of schemes in which the vertices might need to be accessed, and I will probably support only one. (But which one? For example, the vertices of a line or area could be stored in a single table row, or stored in a second table related to the business table, or stored in an external file.)

Spatially enabling a table seems to take much longer than loading a shapefile. Probably the reason for this is that doubly-nested queries are used when spatially enabling a table. This roughly means that the time to spatially enable a table is proportional to the square of the number of rows. What dbms2sde does is apply the query specified by the -w option to the business table (if not specified then the query is equivalent to "select all rows"—or "select all rows where 1 = 1"). For each row from the business table matching this query, shape information and a new where clause based on that row are formed, and then all tables in the business table are updated with the shape information that matches this new where clause.

This latter (or inner) query is why specifying the -key option can be extremely important. If the -key option is omitted, then dbm2sde forms a where clause based on the x and y coordinates (and z and measure values as well, if they’re specified). So, for example, if a particular row has a latitude equal to 40 and a longitude equal to -107, then all rows with that latitude and longitude will be updated with the shape information based on those coordinates. If there are five such rows, then those rows will each be updated five times. This still yields an SDE layer with the correct shape information, but it can be very slow.

The -key option overrides this by using the specified column(s) for the latter (or inner) query. So, for example, if dbms2sde is run with "-key ID", and a particular row has an ID value of 106, then all rows where ID equals 106 will be updated with the shape information derived from that row. At least with Oracle, it is a tremendous boon to run dbms2sde with the -key option specifying the table’s primary key. In Oracle the primary key is guaranteed to be unique and it is indexed as well—so it is safe and faster. (Unlike omitting the -key option, which—although it is inefficient—repeatedly updates rows that have the same coordinates values, specifying the -key option with column(s) having duplicate values can attach incorrect shape information to those rows which share the same key column(s) values. Unless, of course, those rows also happen to have the same coordinate values. I have added a check in dbms2sde which warns when duplicate values in key column(s) are found.)

So in a nutshell, ensure that your tables have a primary key (or the equivalent, and are indexed) and run dbms2sde specifying this column or columns with the -key option. Here are some examples of running dbms2sde without the -key option, with the -key option but on a column which is neither the primary key nor indexed, and finally with the -key option on a column which is the primary key.

Running dbms2sde without the -key option
Welcome to DBMS2SDE pre-release 0.1j Dec 13 2000 - an NGDC SDE 8 application

Connecting to nndc...
Summary information for rows being spatially enabled:

Column    Count  Minimum  Maximum  Average Std. Dev.
--------- ----- -------- -------- -------- ---------
LONGITUDE 17145 -180.000  180.000 -101.000   124.533
LATITUDE  17145   0.0000  72.2900  56.8549    4.9617

Running:  dbms2sde -o point -l eq_cat_030,geometry -u mao -s nndc -p ******

(Is this taking too long? Specifying a primary key with the -key option is much faster!)
Rows Enabled   Elapsed Time   Estimated Time
------------   ------------   --------------
        1024       00:05:08         01:25:56
SE_stream_fetch encountered a -51 error:
Underlying DBMS error
Extended error code: 1555, extended error string:
ORA-01555: snapshot too old: rollback segment number 10 with name "RB9" too small

Here we received an Oracle error complaining about our rollback segments being too small. Specifying a key column under certain conditions seems to bypass this error condition, but under other conditions involving a key column we will see this error again.

Running dbms2sde with the -key option on an unindexed column
Welcome to DBMS2SDE pre-release 0.1j Dec 13 2000 - an NGDC SDE 8 application

Connecting to nndc...
Summary information for rows being spatially enabled:

Column    Count  Minimum    Maximum   Average Std. Dev.
--------- ----- -------- ---------- --------- ---------
LONGITUDE 17145 -180.000    180.000  -101.000   124.533
LATITUDE  17145   0.0000    72.2900   56.8549    4.9617
ID        17145        2      17146   8574.00   4949.48

Running:  dbms2sde -o point -l eq_cat_030,geometry -key id -u mao -s nndc -p ******

Records Enabled   Elapsed Time   Estimated Time
---------------   ------------   --------------
          17145       02:56:02         02:56:02

In this case with the -key option (but run on a column that does have unique values, but is unindexed) dbms2sde does run to completion in just under three hours.

Running dbms2sde with the -key option on a primary key (and indexed) column
Welcome to DBMS2SDE pre-release 0.1j Dec 13 2000 - an NGDC SDE 8 application

Connecting to nndc...
Summary information for rows being spatially enabled:

Column    Count  Minimum    Maximum   Average Std. Dev.
--------- ----- -------- ---------- --------- ---------
LONGITUDE 17145 -180.000    180.000  -101.000   124.533
LATITUDE  17145   0.0000    72.2900   56.8549    4.9617
ID        17145        2      17146   8574.00   4949.48

Running:  dbms2sde -o point -l eq_cat_030,geometry -key id -u mao -s nndc -p ******

Records Enabled   Elapsed Time   Estimated Time
---------------   ------------   --------------
          17145       00:25:48         00:25:48

In this last case dbms2sde runs to completion in under half an-hour. This is because the ID column is a primary key and is automatically indexed in Oracle.

Incidentally, here’s what happens when you run dbms2sde specifying a column—having duplicate values—with the -key option. To do this I dropped the primary key and then set the ID column of one row to have the same value as another row. I then indexed the ID column (not strictly necessary, but I’d rather wait a half-hour than three hours).

Running dbms2sde with the -key option on an indexed column with a duplicate value
Welcome to DBMS2SDE pre-release 0.1j Dec 13 2000 - an NGDC SDE 8 application

Connecting to nndc...
Summary information for rows being spatially enabled:

Column    Count  Minimum    Maximum   Average Std. Dev.
--------- ----- -------- ---------- --------- ---------
LONGITUDE 17145 -180.000    180.000  -101.000   124.533
LATITUDE  17145   0.0000    72.2900   56.8549    4.9617
ID        17145        2      17146   8573.02   4949.51

Running:  dbms2sde -o point -l eq_cat_030,geometry -u mao -p ****** -s nndc -key id

Rows Enabled   Elapsed Time   Estimated Time
------------   ------------   --------------
       16384       00:14:45         00:15:26
SE_stream_fetch encountered a -51 error:
Underlying DBMS error
Extended error code: 1555, extended error string:
ORA-01555: snapshot too old: rollback segment number 16 with name "RB15" too small

So here the error presents itself again, although we processed nearly all rows. At this point I increased the size of the rollback segments, and was able to bypass the error without changing how I was running dbms2sde.

Running dbms2sde with the -key option and larger rollback segments on an indexed column with a duplicate value
Welcome to DBMS2SDE pre-release 0.1k Dec 14 2000 - an NGDC SDE 8 application

Connecting to nndc...
Summary information for rows being spatially enabled:

Column    Count  Minimum    Maximum   Average Std. Dev.
--------- ----- -------- ---------- --------- ---------
LONGITUDE 17145 -180.000    180.000  -101.000   124.533
LATITUDE  17145   0.0000    72.2900   56.8549    4.9617
ID        17145        2      17146   8573.02   4949.51

Running:  dbms2sde -o point -l eq_cat_030,geometry -key id -u mao -s nndc -p ******

Rows Enabled   Elapsed Time   Estimated Time
------------   ------------   --------------
       17145       00:15:02         00:15:02

Alert: At most, 2 rows have the same value for the key column.
(These many rows will have the same shape information.)

Optimizing

Much of the discussion in my previous article Automatically Loading And Optimizing Shapefiles In SDE applies to dbms2sde. You can take a self-guided demo of a web enterprise application of dbms2sde which allows you to select tables, spatially enable them, optimize their grid sizes, determine optimum configuration sections, and so on. Click here to take the tour. (Sorry, but this doesn’t fully work unless you’re coming from a computer in the noaa.gov domain. I’m working on that...)

Screen shot of the web enterprise application of dbms2sde

Screen shot of the enterprise web application of dbms2sde

However, there is one difference regarding optimizing grid sizes and table extents. It seems that the SDE libraries (which dbms2sde builds on) don’t use the specified grid sizes until the table is fully enabled—I’ve observed SDE making the spatial layer with a larger spatial index which then shrinks in size once the grid sizes are applied. This means that I can’t calculate the table extents after I’ve optimized the grid sizes (if I do, dbms2sde reports an error in which the maximum number of extents have been exceeded). So I have to calculate the table extents before I optimize the grid sizes, and then use what seems like a needlessly larger configuration section. Oh well, disk space is cheap, right?

Where do I get dbms2sde?

Click here to go to the ESRI ArcScripts page showing SDE utilities. There you can download a zipped tar file containing source code and Windows NT and Sun Solaris binaries.

None Blue Angel Metadata Management System

Re: None GeoSpatial Tools (Ted Habermann)
Date: 2000, Dec 05
From: Ted Habermann <Ted.Habermann@noaa.gov>


We are exploring the Blue Angel Enterprise MetaStar system for managing FGDC compliant metadata.

None ESRI ArcIMS (Internet Map Server

Re: None GeoSpatial Tools (Ted Habermann)
Date: 2000, Dec 08
From: Ted Habermann <Ted.Habermann@noaa.gov>


The ESRI ArcIMS is a tool used to make GIS data available to web browsers, the Geography Network, the free GIS Browser ArcExplorer, and to ESRI Clients. This forum includes information on ArcIMS from NOAA users.

Question ArcIMS technical discussion

Re: None ESRI ArcIMS (Internet Map Server (Ted Habermann)
Date: 2000, Dec 06
From: Tiffany C. Vance <vance@pmel.noaa.gov>


   On a more pragmatic level, I was left with the impression that a number of us are, or will be, creating ArcIMS installations. This can be a frustrating process due to the lack of documentation and the numerous "interesting" features that are in ArcIMS. Are there other folks who would be willing to share their questions, suggestions, successes and frustrations?

   I'll throw out a first question - following up on Daniel Martin's suggestion, I've finally gotten an extract server working. Does anyone know how to limit which layers are included in the extracted files?

- Tiffany

Question Must be in the AXL

Re: Question ArcIMS technical discussion (Tiffany C. Vance)
Date: 2000, Dec 11
From: Ted Habermann <Ted.Habermann@noaa.gov>


This is an interesting problem that must be faced by all data servers. In the Interface Database, this information is provided by the display_fields. In DODS, it comes from the DAS and the DDS. In the live access server it comes from the configuration files (I think).

My understanding of ArcIMS suggests that all of the information about what gets served is in the AXL file that describes the service. Maybe you could post that AXL file and we could have a look?


Idea Pieces to the ArcIMS puzzle

Re: Question ArcIMS technical discussion (Tiffany C. Vance)
Date: 2001, Jul 25
From: Patrick Hayes <Patrick.J.Hayes@noaa.gov>


I work with Ted Habermann at NGDC and I have been searching on the web for ArcIMS sites and would like to share some of the ideas and concepts I found. The first is a url to a company that has an overview of some of the pieces to ArcIMS. It's more of a general concept. The url is:

http://www.edgetech-us.com/Prd/Softw/ArcIMS.htm


Idea ArcIMS Toolbar help file

Re: Question ArcIMS technical discussion (Tiffany C. Vance)
Date: 2001, Jul 25
From: Patrick Hayes <Patrick.J.Hayes@noaa.gov>


An example of a help file for the toolbar in ArcIMS

The USGS has a page that descirbes how to use the tools in the toolbar for ArcIMS. The file contains the standard tools for ArcIMS. It was done nicely and the url is:

http://idaho.usgs.gov/projects/sr3/help/index.html

I use this help file as a link below the toolbar in the ArcIMS viewer I've created.


Idea Trying to give some answers to common question about ArcIMS

Re: Question ArcIMS technical discussion (Tiffany C. Vance)
Date: 2001, Jul 25
From: Patrick Hayes <Patrick.J.Hayes@noaa.gov>


Questions and answers about ArcIMS

Another site tried to answer some questions about ArcIMS. Some examples questions are:

  • How long does it take to display a map?
  • Why is the server busy?
  • How do I select a map area by query?
  • Why isn't there any text displayed on my map?
  • How do I Zoom In to a map area?
  • How do I Zoom Out of a map area?
  • What is the PAN button for?
  • How do I display information associated with particular parcel of land?
  • How do I print the displayed map and parcel information?
  • What if I need more information?
  • "Map server no longer connected"
  • Map Information Disclaimer
The url is:

http://www.co.cabarrus.nc.us/Pages/Gis/applications.htm


Idea Documentation, tutorials, and tips and tricks for using ArcIMS

Re: Question ArcIMS technical discussion (Tiffany C. Vance)
Date: 2001, Jul 25
From: Patrick Hayes <Patrick.J.Hayes@noaa.gov>


ArcIMS

Documentation, tutorials, and tips and tricks for using ArcIMS, the latest Internet Map Server from ESRI. It has such things as ArcOnline, ArcIMS 3.0 - An Application Developer's Perspective, Geography Network, ArcIMS Tutorials, ArcXML and ArcIMS Scripts. The url is:

http://gis.about.com/cs/arcims/?once=true&


Note Relationship between layers in the mapservice and in the HTML viewer

Re: Idea Documentation, tutorials, and tips and tricks for using ArcIMS (Patrick Hayes)
Date: 2001, Sep 24
From: John Cartwright <John.C.Cartwright@noaa.gov>


The HTML viewer numbers layers in the reverse order that they are listed in the MapService (defined in the AXL file). This reference remains constant even if the layer is not currently displayed in the viewer (due to scale constraints). For example: if the cities layer is defined as the next to layer in the AXL file, the viewer will always addess it as layer 1. (count begins at 0).


Idea General Instruction page on how to use the Layers area in ArcIMS

Re: Question ArcIMS technical discussion (Tiffany C. Vance)
Date: 2001, Jul 25
From: Patrick Hayes <Patrick.J.Hayes@noaa.gov>


Instructions on how to turn on layers and other things in ArcIMS

This general instructions is specific to this site, but it gets the idea across on ways to write up on How to use the layer area in ArcIMS.

The url is:

http://gisweb.sgrdc.com/Website/Lowndes2/instructions.html

The main page for this site is: http://gisweb.sgrdc.com/Website/Lowndes2/viewer.htm?Title=VALOR%20GIS


Idea Another tool bar help file ArcIMS

Re: Question ArcIMS technical discussion (Tiffany C. Vance)
Date: 2001, Jul 25
From: Patrick Hayes <Patrick.J.Hayes@noaa.gov>


Another Toolbar help file ArcIMS

This site gives another way to do the toolbar help file.

The url is:

http://205.169.141.11/imd/gis/arcims_help.htm


Idea ESRI GIS main Software Page

Re: Question ArcIMS technical discussion (Tiffany C. Vance)
Date: 2001, Jul 25
From: Patrick Hayes <Patrick.J.Hayes@noaa.gov>


ESRI main GIS software page

This page from ESRI lists all the software that they have and the url is:

http://www.esri.com/software/index.html

For a direct link to ArcIMS at ESRI go to the following url:

http://www.esri.com/software/arcims/index.html


Idea ArcIMS tutorial

Re: Question ArcIMS technical discussion (Tiffany C. Vance)
Date: 2001, Jul 25
From: Patrick Hayes <Patrick.J.Hayes@noaa.gov>


The USGS ArcIMS tutorial

The USGS has a ArcIMS tutorial page that includes:
  • ArcIMS Java and HTML Viewers (PDF)
  • ArcExplorer Java for ArcIMS (PDF)
  • ArcExplorer Java for ArcIMS Exercise 3

The url is:

http://webgis.wr.usgs.gov/arcims.htm


Idea ArcOnline by ESRI

Re: Question ArcIMS technical discussion (Tiffany C. Vance)
Date: 2001, Jul 25
From: Patrick Hayes <Patrick.J.Hayes@noaa.gov>


ESRI ArcOnline is the complete technical resource center for ArcGIS software.

You can access System Requirements, Downloads, Technical Papers, Developer help pages, and Data Models for ArcGIS Desktop (ArcView 8.1, ArcEditor, ArcInfo), and ArcSDE as well as ArcIMS, and ArcPad. You can also browse for answers to your technical questions in the Knowledge Base and participate in user-to-user Discussion Forums.

The url is:

http://arconline.esri.com/arconline/index.cfm?pid=6


Idea ArcIMS examples

Re: Question ArcIMS technical discussion (Tiffany C. Vance)
Date: 2001, Jul 25
From: Patrick Hayes <Patrick.J.Hayes@noaa.gov>


MetroGIS DataFinder

This ArcIMS site has different functionallity than what comes with the out of box for the ArcIMS html viewer. Examples are:

  • Has a different title than the standard "ArcIMS viewer"
  • Has metadata links
  • Has a header and footer
  • Tries to explain to the user that more layers are available as you zoom in. They use the Note: More layers may be available as you zoom in or out. expression.
  • This site uses its own colors
  • Put the Current Tool: in the lower left corner of the viewer - to indicate to the end user which tool is currently enabled.

The url is:

http://gis.metc.state.mn.us/website/DF_GeneralMap/viewer.htm?Title=MetroGIS


Idea ArcIMS examples

Re: Question ArcIMS technical discussion (Tiffany C. Vance)
Date: 2001, Jul 25
From: Patrick Hayes <Patrick.J.Hayes@noaa.gov>


USGS Snake River Corridor Project

This ArcIMS site has different functionallity than what comes with the out of box for the ArcIMS html viewer. Examples are:

  • Has a different title than the standard "ArcIMS viewer"
  • Has metadata links using the Layers Information Link in the upper right hand corner of the viewer.
  • Has a footer
  • This site uses its own colors
  • Has a different tool bar than the out of box viewer.

The url is:

http://idims.wr.usgs.gov/website/sr3beta/viewer.htm?Title=Snake%20River%20Corridor%20Project


Idea Generic out of the box ArcIMS sites

Re: Question ArcIMS technical discussion (Tiffany C. Vance)
Date: 2001, Jul 25
From: Patrick Hayes <Patrick.J.Hayes@noaa.gov>


Out of the box ArcIMS Sites

Here is some examples of what comes straight out of the box of ArcIMS for the html viewer. These sites basically took the out of the box approach without hardly any modifications for the html viewer in ArcIMS.

The url is:

http://205.169.141.11/website/basins/viewer.htm?Title=Mesa%20County%20Drainage%20Basins

Another one is:

http://map2.ngdc.noaa.gov/website/pkd/viewer.htm


Idea More ArcIMS examples

Re: Question ArcIMS technical discussion (Tiffany C. Vance)
Date: 2001, Jul 30
From: Patrick Hayes <Patrick.J.Hayes@noaa.gov>


GIS at Mesa County, Colorado

For the ArcIMS sites locates at Mesa County, click on any of the interactive maps section. They have over 15 different examples of ArcIMS sites they include:
  • Parcel Map Find
  • Mesa County Roadmap
  • Survey Information Map (SIMS)
  • Fire Protection Districts
  • Survey Automation
  • Sanitation Sewer Districts
  • Zoning Map
  • More Aerial Photos
  • Where You Vote
  • Satellite Imagery
  • Aerial Photos
  • Future Land Use Map
  • Septic System Information
  • Drainage Basins
  • 2000 Census Total Population
  • 2000 Census Population Density

There seems to be 2 main approches to view there data. One is use a select by some citeria such as: parcel, address or township and then bring up an ArcIMS site after the selection. The second approach is a direct link to the ArcIMS site with no select citeria done first.

I found that these are not always available and sometimes I couldn't connect to the database for that site and I'm not able to view the ArcIMS site.

The url is:
http://205.169.141.11/imd/gis/gis1.htm


Idea More ArcIMS examples

Re: Question ArcIMS technical discussion (Tiffany C. Vance)
Date: 2001, Jul 30
From: Patrick Hayes <Patrick.J.Hayes@noaa.gov>


National Marine Fisheries

This site has numerous examples of ArcIMS sites, most look like there the "out of the box" using the Html viewer for ArcIMS.

The url is: http://www.fakr.noaa.gov/arcims/


Idea Evaluation of Two Internet GIS Sites Using ArcIMS

Re: Question ArcIMS technical discussion (Tiffany C. Vance)
Date: 2001, Jul 30
From: Patrick Hayes <Patrick.J.Hayes@noaa.gov>


Evaluation of Two Internet GIS Sites Using ArcIMS

This site talks about the different approaches of these two sites using ArcIMS and ideas about what could make them better and what the author liked and disliked about each site.

The url is: http://www.geog.uno.edu/~dwelch/arcims1.htm


Idea ArcIMS – The Solution to Streamlining Data Collection, Modeling,

Re: Question ArcIMS technical discussion (Tiffany C. Vance)
Date: 2001, Jul 30
From: Patrick Hayes <Patrick.J.Hayes@noaa.gov>


ArcIMS – The Solution to Streamlining Data Collection, Modeling, Planning and Design.

This site talks about to use ArcIMS as a solution to your data needs.

The url is: http://www.esri.com/library/userconf/proc00/professional/papers/PAP591/p591.htm


Idea SpatialDirect™ plug-in adds data extraction and delivery to ArcIMS

Re: Question ArcIMS technical discussion (Tiffany C. Vance)
Date: 2001, Jul 30
From: Patrick Hayes <Patrick.J.Hayes@noaa.gov>


SpatialDirect™ plug-in adds data extraction and delivery to ArcIMS

Allows data to be retrieved to the desktop in user specified data format and projection.

The url is:

http://www.safe.com/press/arcims_june00.htm


Idea FAQ about GIS and ArcIMS from ESRI

Re: Question ArcIMS technical discussion (Tiffany C. Vance)
Date: 2001, Jul 30
From: Patrick Hayes <Patrick.J.Hayes@noaa.gov>


Answers to question about GIS and ArcIMs from ESRI

A random collection of questions about GIS and ArcIMS that ESRI put together to answer some questions.

Some example questions are:

Idea ArcIMS Demos from ESRI

Re: Question ArcIMS technical discussion (Tiffany C. Vance)
Date: 2001, Jul 30
From: Patrick Hayes <Patrick.J.Hayes@noaa.gov>


ArcIMS Demos

Esri has a demo of ArcIMS sites.

The url is:

http://eslims.esri.com/arcimsdemos.htm


Idea ArcIMS/ArcView IMS Server

Re: Question ArcIMS technical discussion (Tiffany C. Vance)
Date: 2001, Jul 30
From: Patrick Hayes <Patrick.J.Hayes@noaa.gov>


ESS ArcIMS/ArcView IMS Server

This site has helpful ideas about ArcView and ArcIMS

The url is:

http://wwwims1.gsc.nrcan.gc.ca/


None Prototype (or operational) ArcIMS Sites in NOAA

Re: None ESRI ArcIMS (Internet Map Server (Ted Habermann)
Date: 2001, May 23
From: Ted Habermann <Ted.Habermann@noaa.gov>


A number of groups in NOAA are experimenting with serving geospatial data on the web using ESRI's ArcIMS. This area has links to those sites. Questions (and answers) about the sites can posted to the threads as well!


None ArcIMS Prototypes at NGDC

Re: None Prototype (or operational) ArcIMS Sites in NOAA (Ted Habermann)
Date: 2001, May 23
From: Ted Habermann <Ted.Habermann@noaa.gov>


These map servers are running on NT and accessing data primarily in various SDE installations (Informix, DB2, and Oracle) at NGDC. John Cartwright is the technical wizard for these sites!


Idea How to do specific things in ArcIMS

Re: None ESRI ArcIMS (Internet Map Server (Ted Habermann)
Date: 2001, Jul 30
From: Patrick Hayes <Patrick.J.Hayes@noaa.gov>


This area is for people who have figured out how to do things in ArcIMS.


Idea Changing the title of your ArcIMS viewer

Re: Idea How to do specific things in ArcIMS (Patrick Hayes)
Date: 2001, Jul 30
From: Patrick Hayes <Patrick.J.Hayes@noaa.gov>


Changing the title

The title of the HTML Viewer can be set when creating the web site with ArcIMS Designer. The default title is ArcIMS 3.0 Viewer.

You can change the title after the HTML Viewer is created by editing the default.htm file. Change the following line to include your own title text string:

var theTitle = My Very Own Viewer;

For additional information, see the ESRI documentation about Customizing ArcIMS


Idea More than one way to do specific tasks in ArcIMS

Re: Idea Changing the title of your ArcIMS viewer (Patrick Hayes)
Date: 2001, Jul 31
From: Patrick Hayes <Patrick.J.Hayes@noaa.gov>


Different paths to achive similiar results in modifing ArcIMS

I didn't find the variable title in the file default.html, but I found it in the viewer.html file. All the .html files are located on the machine where you created your web site and the general stucture is /Base directory/website/name of ArcIMS site/ the html files are in the name of the ArcIMS site above. Or you could just search for the file.

These are ways I found to get things done in ArcIMS. There are more than one way to do things in ArcIMS and I'm showing the ones I found to work. If others find better ways to do these things please post them here in Hypernews. I am learning as are other folks and if we get a good list of how to do things in ArcIMS it will be alot easier for datamanagers to do things relatively easy.

The general way to do things in ArcIMS is use Author make your changes, save the file, go into ArcIMS Administrator click the refresh button and review the results of the change in your browser.


Idea Changing the name of the layer in your ArcIMS viewer

Re: Idea How to do specific things in ArcIMS (Patrick Hayes)
Date: 2001, Jul 30
From: Patrick Hayes <Patrick.J.Hayes@noaa.gov>


Changing the name of the layer

In ArcIMS Author:

  • Use the file open and select your .axl file for your site.
  • Click the layer tab
  • Click in the Active Layer - white area for the list of layers
  • Click on the layer you want to change - Administrative Boundary
  • select First button - Looks like a paintbrush
  • Click General Tab
  • Put in new name in Layer Name
  • click apply
  • click ok
  • Hit save project button
In ArcIMS Administrator:

  • Click the refresh button - Last Icon on tool bar
In Browser refresh page and see if changes are there.

For additional information, see the ESRI documentation about Customizing ArcIMS


Idea Deciding what fields get displayed and changing field names for a table to alias field names

Re: Idea How to do specific things in ArcIMS (Patrick Hayes)
Date: 2001, Jul 31
From: Patrick Hayes <Patrick.J.Hayes@noaa.gov>


Deciding what fields get displayed and changing field names to alias field names

Use an editor and open the file ArcIMSParam.js You can search for the file or it is generally in the following directory stucture:

All the .html and the ArcIMSParam.js files are located on the machine where you created your web site and the general stucture is /Base directory/website/name of ArcIMS site/ the html files and ArcIMSParam.js are in the name of the ArcIMS site above.

Or you could just search for the file.

Use an editor and open the file ArcIMSParam.js:

What fields get displayed

  • Go to the section Select Fields
  • set select Fields = "true"
  • put your new list of names in selfieldlist.

    Ex:

    selFieldList[6]=YEAR MO DA HR;

    This tells ArcIMS what fields to list for a specific layer.

    To limit the fields returned in a selection, query, or identify, change the value of the variable selectFields to set the fields you want displayed. The default value is #ALL#, which indicates all fields are displayed. Field names must be in upper case to match what the ArcIMS Spatial Server returns.

Putting in alias field names

  • set var usefieldalias="true"
  • Then set Layer[0]= this is the first item in the layers area.

    Then set Layer[1]=

    Note: Put fields with field alias corresponding to layer number in ArcIMS. For example, in the ArcIMS site I'm building I have 7 layers, the seventh layer is volcanoes. To modify the volcanoes area I need to modify the Layer[6]= because the array layer starts at zero not one.

  • The format is:

    Field name:Alias field name|

    Example: Yr:Year|MO:Month|Da:Day|

  • Save the file after all the modifications
  • Go the ArcIMS Administrator select the refresh button.
  • Go back to your browser with your ArcIMS site already running and click the Shift Reload Button.
  • Turn on the layer you just modified - volcanoes in my case.
  • Use Identify tool and click on any of the volcanoes and make sure the results come up the way you changed them.

The following is from the Esri documentation called Customizing ArcIMS

Limiting the fields displayed

To limit the fields returned in a selection, query, or identify, change the value of the variable selectFields to set the fields you want displayed. The default value is #ALL#, which indicates all fields are displayed. Field names must be in upper case to match what the ArcIMS Spatial Server returns.

Since query operations are typically done on the active layer, you probably want the field display to change when the active layer changes. To make this happen, set swapSelectFields to true. If swapSelectFields is true, then a list of field names must be created for each layer.

To create the list of fields for a layer, set the array variable selFieldList. Assign an element for each layer in this array, with the topmost layer set at index 0. Each line of the array is assigned like this:

selFieldList[2]=NAME #ID# #SHAPE# POP;

An element is required for each layer. The ID and Shape fields must be included in the list and must be surrounded by #s. This notation indicates that these fields are not in the database but instead are generated by the server. Image layers are assigned #ALL# since they have no attributes.

An example of the assignment of these three variables is shown in Chapter 3, ëThe HTML Viewer JavaScript Library, ArcIMSParams.js, Identify/Select/Query/Buffer parameters.


Idea ESRI write up on how to Using aliases for the field names

Re: Idea Deciding what fields get displayed and changing field names for a table to alias field names (Patrick Hayes)
Date: 2001, Jul 31
From: Patrick Hayes <Patrick.J.Hayes@noaa.gov>


Using aliases for the field names

To display an alias field name instead of its original name, set useFieldAlias to true. When useFieldAlias is true, a list of field names and their aliases must be created for each layer.

To create the list of field names and aliases for a layer, set the array variable fieldAliasList. Assign an element for each layer in this array, with the topmost layer set at index 0. The list is a string containing pairs of field names and their aliases, separated by a colon. Each pair is separated by a bar (|). Each element of the array is assigned like this:

fieldAliasList [0]=NAME:City Name|POP:Population;
fieldAliasList [1]=;

Because an element is required for each layer, if you donít want to assign aliases for a layer, set the element list to an empty string (î) as shown for element [1]. The viewer checks for an alias to use and only swaps the field name if it finds a name/alias pair for that layerís field in the list.

An example of this assignment is shown in the description for the useFieldAlias array in Chapter 3, The HTML Viewer JavaScript Library, ArcIMSParams.js, Identify/Select/Query/Buffer parameters.


None Full table names not required

Re: Idea Deciding what fields get displayed and changing field names for a table to alias field names (Patrick Hayes)
Date: 2001, Aug 16
From: <ted.habermann@noaa.gov>


The quotes around true are REQUIRED and the field names in this section do not need to be fully resolved:

// fields to be returned in identify/selection/query request. . . #ALL#=all fields
var selectFields = "true";
// swap out the list of returned fields? 
//If true, a list must be defined in selFieldList[n] for each layer to update selectFields
var swapSelectFields="true";
// array for each layer's returned fields if swapSelectFields=true
var selFieldList = new Array();
// sample set for world - if not #ALL#, id and shape fields required. Separate with a space
selFieldList[0]="FGDC_ID TITLE EMAIL #ID# #SHAPE#";
selFieldList[1]="NAME #ID# #SHAPE#";


Idea Changing the backgound image in ArcIMS

Re: Idea How to do specific things in ArcIMS (Patrick Hayes)
Date: 2001, Jul 31
From: Patrick Hayes <Patrick.J.Hayes@noaa.gov>


Changing the backgound image in ArcIMS

Task is to use my own background images in all the frames in ArcIMS. The frames are controlled by a series of html files.

See the ESRI documentation on: HTML Viewer frame layout available at:http://arconline.esri.com/arconline/documentation/ims_/HTMLViewer1.pdf?PID=6

All the .html files are located on the machine where you created your web site and the general stucture is /Base directory/website/name of ArcIMS site/ the html files are in the name of the ArcIMS site above. Or you could just search for the all the html files.

I changed the following line to point at my background image (Noaashield.gif)not the background image provided by ESRI:

...body... Background="/Images/Noaashield.gif">

I modified all the following files to get a consistent look in all the frames that comprize the ArcIMS site:

  • toolbar.html
  • header.html
  • tocframe.html
  • bottom.html
  • modeframe.html
  • JSfrom.html
  • textframe.html
Save the html files you modified, go into ArcIMS Administrator click the refresh button and review the results of the change in your browser.

Idea Using your own footer in ArcIMS

Re: Idea How to do specific things in ArcIMS (Patrick Hayes)
Date: 2001, Jul 31
From: Patrick Hayes <Patrick.J.Hayes@noaa.gov>


Using your own footer in ArcIMS

The way I found to get this to work is edit the file bottom.html.
  • Select your favorite editor and open the file bottom.html.

    I'm adding 3 links in the bottom.html file.
    They are:
    Return to the Global Natural Hazards Viewer Home
    NNDC Home
    Natural Hazard Home

    If you want a seperate browser window to appear for each link, put the following line in the "a href" line.

    Example, you need target="_blank"to be part of the a href to get a seperate browser window:

    A HREF="http://dudley.ngdc.noaa.gov/website/hazards/viewer.htm" target="_blank">Global Natural Hazards Viewer Home



A HREF="http://dudley.ngdc.noaa.gov/website/hazards/viewer.htm" target="_blank">Global Natural Hazards Viewer Home |
A HREF="http://nndc.noaa.gov/?home.shtml" target="_blank" ALT="NNDC Home">NNDC Home |
A HREF="http://www.ngdc.noaa.gov/seg/hazard/hazards.shtml" target="_blank">Natural Hazard Home

Save the file, go into ArcIMS Administrator click the refresh button and review the results of the change in your browser.

Note: Each frame is a predetermined size. If I put in a 2 line footer, the second line gets cut off. There is only room for a one line footer unless you change the size of the frame.


ESRI has a write up on headers and footers in the Customizing ArcIMS see pages 24-26 for information on this subject.


Idea Putting in the words "Current Tool" for the tool that is currently enabled

Re: Idea How to do specific things in ArcIMS (Patrick Hayes)
Date: 2001, Aug 01
From: Patrick Hayes <Patrick.J.Hayes@noaa.gov>


Putting in the words Current Tool: in the lower left hand corner of the ArcIMS viewer

I saw this capability on another ArcIMS site and I thought it was a nice feature. In the default html viewer for ArcIMS the tool name is displayed in the lower left corner. Some end users might not know what these words mean, so I put the words Current Tool: right before the name of the tool.

I did this by modifing the Modeframe.html file.

After the Body BGCOLOR line I put the line Current Tool: in the Modeframe.html file to accomplish this task.

BODY BGCOLOR="Silver" LEFTMARGIN=0 TOPMARGIN=0 BACKGROUND="images/noaashield.gif"
  
Current Tool:


Idea Tool bar help file

Re: Idea How to do specific things in ArcIMS (Patrick Hayes)
Date: 2001, Aug 01
From: Patrick Hayes <Patrick.J.Hayes@noaa.gov>


Putting in the link for the Tool bar help file

The USGS has a help page that descirbes how to use the tools in the toolbar for the ArcIMS viewer. The file contains the standard tools for standard ArcIMS html viewer. It was done nicely and the url is: http://idaho.usgs.gov/projects/sr3/help/index.html

I took the contents of that file and saved it locally to my PC. If you use other non-standard tools then you could just add them to this file or if you use less tools you could just take out the tools that are not available with your ArcIMS viewer.

I put a link directly below the tool bar called Tool Bar Help in my ArcIMS viewer. The way I achived this is to put the help file that I saved on my local pc in the ArcIMS /images directory and all the icons for the help file are already in that directory, so I didn't have to bring them all over to the /images directory.

Then I went and modified the Toolbar.html file. I put the following line right above the /body> and /html> tags:
A HREF="images/ARCIMS_help_file.html" target="_blank" ALT="Tool Bar Help">Tool Bar Help
/BODY>
/HTML>

To have a seperate window appear for the help file you must use the following line in your a href tag:

target="_blank"


Idea Layer's Area Help file

Re: Idea How to do specific things in ArcIMS (Patrick Hayes)
Date: 2001, Aug 01
From: Patrick Hayes <Patrick.J.Hayes@noaa.gov>


Putting in the link for the Layers Area Help file

I put a link directly below the Layers Area called Layers Area Help in my ArcIMS viewer. I created an Html page with a screen shot of my ArcIMS viewer. I saved the screen shot as a .gif file and put that file in the /images directory. Then in the html file I made a image link to the screen shot and then put text that I found on the web below the screen shot.

The contents of the Layers Area Help file can be viewed at:
http://dudley.ngdc.noaa.gov/website/hazards/images/gen_instr.html

Then I went and modified the Toc.html file.
I put the following line right above the /body> and /html> tags:
A HREF="images/gen_instr.html" TARGET="_blank"> Layer's Area Help
/BODY>
/HTML>

To have a seperate window appear for the help file you must use the following line in your a href tag:

target="_blank"


Idea Setting the scale factor (when to turn on a layer at a certain Zoom level)

Re: Idea How to do specific things in ArcIMS (Patrick Hayes)
Date: 2001, Aug 01
From: Patrick Hayes <Patrick.J.Hayes@noaa.gov>


Setting the scale factor

Here's an example of when you might want to turn a layer on when you zoom to a certain level. I have a site that I call Hazards and I have 3 science layers and a country outline layer. I turn the country layer on when they bring up ArcIMS, but people might be intereted in hazards and there location to major roads.

If I turned on major roads at the world level it wouldn't really help the end user and this layer could clutter up the Global view. The end user is looking at a world map and then zooms into the USA and then zooms to a state. At this level, I could turn on the Major roads layer automatically by setting the scale factor for the layer Major Roads.

This is done by doing the following:

Set scale factors

  1. Set the minimum scale at which you want a layer to display on your map by using the Zoom in or Zoom out tool in the main Author window.
  2. Click a layer in the legend to make it active.
  3. Right-click the layer and click Scale Factors.
  4. Click Set Minimum Scale Factor.
  5. Set the minimum scale for the layer to display on your map.
  6. Click a layer in the legend to make it active.
  7. Right-click the layer and click Scale Factors.
  8. Click Set Maximum Scale Factor.
  9. Set the maximum scale for the layer to display on your map. The layer will now only be displayed at the scales you set.

Remove scale factors

  1. Click a layer in the legend to make it active.
  2. Right-click the layer and click Scale Factors.
  3. Click Remove Scale Factors.
Tips

  1. If you want to type instead of zooming to scale factors, use the General tab. See Set general properties for more information.
  2. When a scale factor has been set on a layer, the layer will not appear in the legend once you go outside the specified scale range.
  3. You can find the scale of a map's current view in the scale bar in ArcIMS Author's main screen. Take note of your desired maximum and minimum scale factors before clicking Layer Properties or the Set scale dependent renderer button.

Also, the ESRI documentation called Using ArcIMS talks about this subject. I couldn't find a direct link to the documentation but I believe this book comes with ArcIMS.


Idea How to indicate to the end user that additional layers are available as you zoom in

Re: Idea How to do specific things in ArcIMS (Patrick Hayes)
Date: 2001, Aug 01
From: Patrick Hayes <Patrick.J.Hayes@noaa.gov>


How to indicate that additional layers are available as you zoom in

I saw a site that tried to tell the end user that additional layers are available as you zoom in. I don't think there an easy way to do this and I couldn't come up with a better suggestion than theres.

The site put a text statement that says:

Note:If you zoom in more layers could be available.

This text was put under the layers area as a statement with no links.

The way to do this is to add the following to the file toc.html above the end body and end html tag:

Note:If you zoom in more layers could be available.
</BODY>
</html>


Idea One of the best resources is the ESRI Book - Cutomizing ArcIMS 3.0 - html viewer

Re: Idea How to do specific things in ArcIMS (Patrick Hayes)
Date: 2001, Aug 02
From: Patrick Hayes <Patrick.J.Hayes@noaa.gov>


ESRI Book - Cutomizing ArcIMS 3.0 - html viewer

This book is the best one I've seen on how to do specific tasks in ArcIMS. It is not on the ESRI web site and to my knowledge it is only available when you buy the ArcIMS product. I will use there table of contents to show what topics they cover. The first 2 chapters are only 30 pages long but they are extremely helpful. I can't reproduce these page because they are copyrighted.


Chapter 1 Introducing the HTML Viewer 5

  • What is the HTML Viewer? - Page 6
  • HTML Viewer file organization - Page 7
  • HTML Viewer frames - Page 8
Chapter 2 Customizing the HTML Viewer - Page 11
  • Working with ArcIMSparam.js - Page 12
    • CheckParams function
    • Refreshing your web site to reflect changes
  • Working with MapServices and map layout - Page 13
    • Changing the map service
    • Changing the Overview Mapservice
    • Changing the starting map extent
    • Displaying the graphic legend at startup of the Layerlist
    • Setting an active layer
    • Replacing the animated graphics
  • Working with an acetate layer - Page 15
    • Changing the properities of the North Arrow
    • Changing the properities of the copyright element
    • Changing the properities of the scale bar
    • Adding a new element to an acetate layer
  • Modifying attribute data display - Page 16
    • Lmiting the fields displayed
    • Using aliases for the field names
  • Changing the title, logo, and colors - Page 17
    • Changing the title
    • Changing the logo and background on the topframe
    • Changing the color of the box used for zoom area
  • Working with tools and the toolbar - Page 18
    • Removing tools from the toolbar
    • Changing search tolerance for identify
    • Changing the pan and zoom factors
    • Changing the toolbar images and structure
  • Creating hyperlinks - Page 20
  • How the viewer and server communicate - Page 21
    • What happens when the mouse is clicked?
    • THe ArcXML Request/Response Cycle
    • The request
    • The Response
    • How the PostFrame form works
  • JavaScript function files - Page 27
  • Using the sample HTML Viewers - Page 28
    • Basic Map
    • Generic Map
    • Hyperlink
    • Thematic Map
    • Parcels
    • Tracker
    • Java Post

Some highlights in the book are:

Chapter 1
This chapter covers such things as:

  • What is the HTML viewer?
  • Considerations for choosing the HTML viewer
The HTML Viewer file organization - Page 7
These page really help the developer with the file organization and where to put files for ArcIMS.

The HTML Viewer frames - Page 8
Thes pages tell the developer what frames make up the ArcIMS viewer and which .html to edit to get a desired result.

Chapter 2
This is where the how to exsists. I'd highly recommend reading this whole chapter and ESRI attemped to cover alot of the common tasks a developer might want to do in the ArcIMS.


Idea Changing the background color in the main map area

Re: Idea How to do specific things in ArcIMS (Patrick Hayes)
Date: 2001, Aug 08
From: Patrick Hayes <Patrick.J.Hayes@noaa.gov>


Changing the background color in the main map area

I wanted to make the background for the Oceans Blue of the main map area, then I wanted the Country boundary layer on top of the Blue background.

This is done by a 2 step process:

  1. Modify the ArcIMSparam.js file

    Change the following line in the ArcIMSparam.js file:
    var mapbacklcolor = '0,0,255'; (this is the color for blue)

    save file with editor

  2. Go to ArcIMS Author - select (highlight) layer you want to overlay on the background color (single click in layer name - rectangle should draw around that layer)

    Select properties for that layer: (Double click on Layer name)

    change style to Solid fill
    change color to White (or to whatever color you want)

    Save file in Author

    Refresh the Map Service in ArcIMS Administrator (last button on tool bar)

    Reload the browser and see if the changes are present


Idea Changing the ESRI Copyright text on the main map area

Re: Idea How to do specific things in ArcIMS (Patrick Hayes)
Date: 2001, Aug 09
From: Patrick Hayes <Patrick.J.Hayes@noaa.gov>


Changing the ESRI Copyright text message in the main map window

ESRI has a statement at the bottom of the main map area window that says Map created with ArcIMS - Copyright 1992 - 2001 ESRI Inc.

The above statement can be changed to any other statement. I decided to take out the ESRI copyright statement and put in my own statement:
Map created by NGDC - 2001.

How do I achieve this?

Edit the file ArcIMSparam.js

  • I changed the following line from:

    var CopyrightText = "Map created with ArcIMS - Copyright 1992 - 2001 ESRI Inc.";

  • To:
    var CopyrightText = "Map created by NGDC - 2001";

  • Save the file in your editor.

Refresh the map service in ArcIMS Administrator (last button on the tool bar)

Reload your browser and see if changes are present.


Idea How to not display the Overview Map

Re: Idea How to do specific things in ArcIMS (Patrick Hayes)
Date: 2001, Aug 10
From: Patrick Hayes <Patrick.J.Hayes@noaa.gov>


How to get rid of the overview map.

This is a 2 step process to achieve this:

  • Edit the file ArcIMSparam.js and change the following line from true to false:

    var hasOVMap = true;

  • Edit the file Mapframe.html and change the following line from true to false:

    ovIsVisible = true;

    Save the files in your editor.

    Refresh your browser and see if the changes are there.


Idea Georeferenced tif

Re: Idea How to do specific things in ArcIMS (Patrick Hayes)
Date: 2001, Aug 13
From: Patrick Hayes <Patrick.J.Hayes@noaa.gov>


How to get a Georeferenced tif into ArcIMS

Etopo.tif is the file I want to Georeferenced.

You need to create an additional file for the tif image to be able to to georegister it. The file needs to be what ESRI call a World File with a .trw file extension.

The format for the ESRI World file is:

  • 20.17541308822119 - A
  • 0.000000000000000 - D
  • 0.000000000000000 - B
  • -20.17541308822119 - E
  • 424178.11472601280548 - C
  • 4313415.90726399607956 - F
  • A = x-scale dimension of a pixel in map units in x direction
  • B,D = Rotation terms
  • C,F = translation term: x,y map coordinates of the center of the upper-left pixel
  • E = negative of y-scale: dimension of a pixel in map units in y direction.

Example:
  • TIF File: Etopo.tif

Here's the World file created for the Global Bathemetry and topography tif file.

  • World file: Etopo.trw
  • Width = 720
  • Height = 360
  • 0.50000 - Heigth/WIdth (360/720 = .5) One pixel per .5 degrees
  • 0.00000 - Blank
  • 0.00000 - Blank
  • -0.50000 - (Negative of line one above)
  • -179.75000 - Center of cell
  • 89.75000 - Center of cell

After creating the .trw world file for the etopo.tif file, put these 2 files in the image directory for your ArcIMS site. Start up Author and the new layer (Etopo.tif) should be there.

Save in ArcIMS Author.

Refresh the Map service in ArcIMS Administrator.

Refresh your browser and check and make sure changes are there. Overlay vector files over image file to make sure registration is fine.


Idea Modifing the size and location of the image in the main map area

Re: Idea How to do specific things in ArcIMS (Patrick Hayes)
Date: 2001, Sep 05
From: Patrick Hayes <Patrick.J.Hayes@noaa.gov>


Modifing the size and location of the image in the main map area


Problem:

    I want my image to fill the full screen of the main map area in my ArcIMS viewer.

Solution:

    Modify lines in mapframe.html file.


To change the Size of the image

In Mapframe.html:

  • Orginal line - to change the size of the image
    var content = <img name="theImage" src="images/map.gif" hspace=0 vspace=0 border=0 width=' + mWidth + ' height=' + mHeight + '>;

    In the above line, the variables to change the size of the image are mWidth and mHeight

  • Modified line- (In the following line, I changed the width to 960 and the height to 480).
    var content = <img name="theImage" src="images/map.gif" hspace=0 vspace=0 border=0 width=' + 960 + ' height=' + 480 + '>;

When I changed these to 960 and 480 it was targeted to a 17 inch monitor. If you view it on a 14 inch monitor it doesn't resize the image to see the whole earth. It cuts off the earth on the right hand side of the image.

To change the location of where the image is displayed in the Map Area

In Mapframe.html:

  • Orginal line - to change where the image is displayed in the map frame.

    createLayer("theMap",0,0,sWidth,sHeight,true,content);

    The syntax for the Createlayer is:

    createLayer(name, left, top, width, height, visible, content)

    • name - string containing name of new style sheet/layer
    • left - Numeric representing pixel x-coordinate of left edge of name.
    • top - Numeric representing pixel y-coordinate of left edge of name.
    • width - Numeric representing width of name.
    • width - Numeric representing width of name.
    • visible - Boolean indicating initial state of the visibility of name.
    • content - String containing the content of name. This string constucts the style sheet/layer.

  • Modified line - (In the following line, I changed Left = -130 and top = -70)
    createLayer("theMap",-130,-70,sWidth,sHeight,true,content);
It seems that the map in the main map area doesn't start at the pixels 0,0, because the overview map is located in the uppper left hand corner. It seems that the map is drawn about a inch by an inch into the main map area. So I had to put in negative numbers (-130,-70) for the image to move up and left. You will have to experiment with setting these numbers to get a close fit. This write up doesn't cover every aspect of this, but is a starter of where to go to modify the size and location of the map in the main map area.


Note How to Set The Map's Initial Zoom Area

Re: Idea How to do specific things in ArcIMS (Patrick Hayes)
Date: 2001, Sep 24
From: Arjune Mirchandani <webmaster@arjune.net>




How to Set The Map's Initial Zoom Area
Authored By Arjune Mirchandani ( webmaster@arjune.net )

  • Problem:

    It seems that ArcIMS initially starts up so that the entire world map is visible. However, I would like to have only a portion of this map visible at startup, for example, just the North American Continent. How do I do it?

  • Solution:

    1. First, open the ArcImsParam.js file.

    2. Now find the following variable definitions:

      var startLeft = -160;
      var startRight = -30;
      var startTop = 80;
      var startBottom = 0;

      These variables define the bounding box of the starting Map extent and they relate to the latatude and logitude cordinates. Here are the meaning of each variable:

      startLeft - The Western Latitude Line
      startRight - The Eastern Latitude Line
      startTop - The Northern Latitude Line
      startBottom - The Southern Latitude Line

    3. Now just enter the cordinates of the starting bounding box to the disired amount.

    4. Save the ArcIMSParam.js file.

  • Notes:

    You may want to note that although you may specify a specific bounding box for the initial portion of the map that is visible, it may appear differently. This is because ArcIMS uses a "best-fit" algorithm that expands the latitude cordinates extents depending on the size of the map window. Remember that the Northern and Southern latitude cordinates take priority.

  • Reference:

    This help page was written by Arjune Mirchandani on September 24, 2001 working from the Marine Geology and Geophysics Department at the National Oceanic and Atmospheric Administration.

    Telephone:
    (303) 497-6339

    Email:
    webmaster@arjune.net




Idea Adding metadata links for the TOC fields

Re: Idea How to do specific things in ArcIMS (Patrick Hayes)
Date: 2001, Sep 25
From: Patrick Hayes <Patrick.J.Hayes@noaa.gov>


Adding metadata links for the TOC fields


Problem:
    In the ArcIMS table of contents area, I want to be able to click on the layer field name and get the metadata associated with that layer. How do I do this?

Solution:

    2 sections of code need to be added to 2 files.

    In toc.htm:
      replace

      document.writeln('<td><font face="Arial" size="-1">' + t.LayerName[i] + '</font></td>');

      with

      if (t.hrefLayer[i]) {
      document.writeln('<td><a href=' + t.hrefLayer[i] + 'target="_BLANK"><font face="Arial" size="-1">' + t.LayerName[i] + '</font></a></td>');
      } else {
      document.writeln('<td><font face="Arial" size="-1">' + t.LayerName[i] + '</font></td>');
      }


    In ArcIMSParam.js:

      add the following lines of code somewhere near the top of this file

      // href info for layers list in TOC
      var hrefLayer = new Array();
      hrefLayer[0] = '"put url here"';
      hrefLayer[1] = '"put url here"';
      hrefLayer[2] = '"put url here"';
      hrefLayer[3] = '"put url here"';
      hrefLayer[4] = '"put url here"';

      Example: hrefLayer[5] = '"http://map1.ngdc.noaa.gov/index.html"';

      NOTE: A common error is the single and double quotes are improperly placed. The format for the hreflayer line is single quote, double quote, url, double quote and single quote.

    In the above lines, substitute put url here with the metadata url that you want to reference. Fill out the array above with the url for each layer that you have in the TOC area. If a layer is turned off at the global level, the scale dependent layer needs to be a item in the array above.

    If you have six layers in the TOC area:

      The first layer corresponds to hrefLayer[0]
      The second layer corresponds to hrefLayer[1]
      The third layer corresponds to hrefLayer[2]
      The fourth layer corresponds to hrefLayer[3]
      The fifth layer corresponds to hrefLayer[4]
      The sixth layer corresponds to hrefLayer[5]

    When the end user clicks on the field name a separate window will appear with the associated metadata for that layer.


');
// I commented out the following lines to get rid of the legend and Overmap
// if ((parent.MapFrame.hasTOC) && (parent.MapFrame.aimsLegendPresent)) {
// // Legend toggle. . . requires aimsLegend.js
// document.write('');
// }
// if (parent.MapFrame.hasOVMap) {
// // Overview Map toggle . . . requires overview map
// document.write('');
// if (isSecond) document.write('');
// }

Then save the file toolbar.html and run your ArcIMS site and the tools should be taken out of the toolbar.


Idea Taking out the tools: Overview map and legend layer toggle button

Re: Idea How to do specific things in ArcIMS (Patrick Hayes)
Date: 2002, Jan 18
From: Patrick Hayes <Patrick.J.Hayes@noaa.gov>


Deleting out the tools: Legend and Overview Map from the Toolbar


Problem:
    I want to take out the tools Legend and Overview Map from the Toolbar. How do I do this?

Solution:

    Almost all the tools can be added or deleted in the ArcIMSparam.js file, by setting the tool = true to turn it on and tool = false to turn it off. But the legend and overview tool are not variables in the ArcIMSparam.js file. One need to comment out several lines in the Toolbar.html file.

    In toolbar.htm:
    comment out the following lines by placing "//" before the line.

    document.write('

');
// document.write(' ' + t.buttonList[14] + '');
// isSecond = !isSecond;
// document.writeln('
');
// document.write(' ' + t.buttonList[15] + '');
// isSecond = !isSecond;
// document.writeln('

Note Adding Stripes to The Layers List

Re: Idea How to do specific things in ArcIMS (Patrick Hayes)
Date: 2002, Apr 08
From: Arjune Mirchandani <webmaster@arjune.net>




Adding Stripes to The Layers List
Authored By Arjune Mirchandani ( webmaster@arjune.net )

  • Problem

    On the default interface, the layers in the TOCFrame are listed without any differentiation between entries. With multi-lined layer names and many layers, this can make the list hard to read. Alternating colors in the list will make the list easier to read.

  • Solution

    To fix this problem, this upgrade not only changes the font of the interface to a more readable size, but also switches between two colors for the entries and adds a separator between entries.

  • Required Files

    The following files will need to be modified for this upgrade:

    1. /toc.htm

  • toc.htm

    The only changes that you will make to this file is within the javascript. You can replace color1 and color2 with any color of your choice.

    Original Code
    var theCount = t.layerCount;
    
    for (var i=0;i<theCount;i++) {
    	if ((!t.hideLayersFromList) || ((t.hideLayersFromList) && (!t.noListLayer[i]))) {
    		if ((t.listAllLayers) || ((t.mapScaleFactor>=t.LayerMinScale[i]) && (t.mapScaleFactor<=t.LayerMaxScale[i]))) {
    			document.writeln('<tr><td>');
    			document.write('<input type="Checkbox" name="LayerVisible" value="' + i + '"');
    			if (t.LayerVisible[i] == 1)
    document.write(' checked');
    			document.writeln(' ></td>');
    			document.write('<td>');
    
    			if (t.LayerIsFeature[i]) {
    				document.write('<input type="Radio" onclick="setActiveLayer(' + i + ')" name="Active"');
    				if (t.ActiveLayerIndex==i) document.write(' checked');
    				document.write('>');
    			} else {
    				document.write(' ');
    			}
    			document.writeln('</td>');
    
    			document.writeln('<td><font face="Arial" size="-1">' + t.LayerName[i] + '</font></td>');
    			if (t.displayLayerInfoButton) {
    				document.write('<td><INPUT TYPE="Button" NAME="InfoButton" VALUE="' + t.buttonList[43] + '" onclick="showLayerInfo(' + i + ')"></td>');
    			}
    			document.writeln('</tr>');
    		}
    	}
    }
    
    


    Upgrade Code
    var theCount = t.layerCount;
    var color1="#bbbbcc";
    var color2="#ccccdd";
    var color1show=true;
    var colorshow="";
    
    for (var i=0;i<theCount;i++) {
    	if (( (!t.hideLayersFromList) || ((t.hideLayersFromList) && (!t.noListLayer[i])))) {
    		if ((t.listAllLayers) || ((t.mapScaleFactor>=t.LayerMinScale[i]) && (t.mapScaleFactor<=t.LayerMaxScale[i]))) {
    
    			if(color1show) {
    				colorshow=color1;
    			} else {
    				colorshow=color2;
    			}
    			color1show=!color1show;
    			document.writeln('<tr bgcolor='+colorshow+'><td bgcolor='+colorshow+' valign=middle>');
    
    			document.writeln('<input type="Checkbox" name="LayerVisible" value="' + i + '"');
    			if (t.LayerVisible[i] == 1) document.writeln(' checked');
    				document.writeln(' ></td>');
    				document.writeln('<td bgcolor='+colorshow+' valign=middle>');
    				if (t.LayerIsFeature[i] && t.LayerName[i] != 'Continents' && t.LayerName[i] != 'Lakes') {  //ARM:Remove specific active radioboxes
    				document.writeln('<input type="Radio" onclick="setActiveLayer(' + i + ')" name="Active"');
    
    				if (t.ActiveLayerIndex==i) {
    				document.writeln(' checked');
    
    				}
    				document.writeln('>');
    			} else {
    				document.writeln(' ');
    			}
    			document.writeln('</td>');
    			document.writeln('<td  valign=middle><font face="Arial" size="-2">' + t.LayerName[i] + '</font></td>');
    
    			if (t.displayLayerInfoButton) {
    				document.writeln('<td><INPUT TYPE="Button" NAME="InfoButton" VALUE="' + t.buttonList[43] + '" onclick="showLayerInfo(' + i + ')"></td>');
    			}
    			document.writeln('</tr><tr><td colspan="3"><img src="images/line.gif" width="150" height="1"></td></tr>');
    
    		}
    	}
    }
    


  • Reference:

    This help page was written by Arjune Mirchandani on September 24, 2001 working from the Marine Geology and Geophysics Department at the National Oceanic and Atmospheric Administration.

    Telephone:
    (303) 497-6339

    Email:
    webmaster@arjune.net




Note Adding The Legend/Layer Toggle Button

Re: Idea How to do specific things in ArcIMS (Patrick Hayes)
Date: 2002, Apr 08
From: Arjune Mirchandani <webmaster@arjune.net>




Adding The Legend/Layer Toggle Button
Authored By Arjune Mirchandani ( webmaster@arjune.net )

  • Problem

    The current button to toggle between the layers frame and the legend frame in the TOCFrame is within the toolbar as a small button. This layout may be counter-intuitive and also is a far distance from the actual frame. It would be nice to add a toggle button near the TOCFrame that can do the same function.

  • Solution

    This upgrade creates a new frame above the TOCFrame that contains a single toggle button. When the user clicks on this button, the same toggle function will be performed and the toggle button will change images accordingly.

  • Required Files

    The following files will need to be modified for this upgrade:

    1. /viewer.htm
    2. /switch_layer.htm
    3. /switch_legend.htm
    4. /javascript/aimsClick.js

  • viewer.htm

    You may have already made a couple of changes to the viewer.htm file at this point. For example, adding the static overview frame to the interface. However, the only requirement is that you have a frame named SwitchFrame in the interface and that it’s source is the switch_layer.htm file.


    Original Code
    
    <FRAME NAME="TOCFrame" SRC="TOCFrame.htm" MARGINWIDTH="0" MARGINHEIGHT="0" SCROLLING="Auto" FRAMEBORDER="Yes" RESIZE="YES">
    


    Upgrade Code
    
    <FRAMESET ROWS="40,*" BORDERCOLOR="#000099" FRAMEBORDER="No" LEFTMARGIN="0" TOPMARGIN="0" FRAMESPACING="0" BORDER="0">
    
    <FRAME NAME="SwitchFrame" SRC="switch_layer.htm" MARGINWIDTH="0" MARGINHEIGHT="0" SCROLLING="NO" FRAMEBORDER="NO" RESIZE="NO">
    
    <FRAME NAME="TOCFrame" SRC="TOCFrame.htm" MARGINWIDTH="0" MARGINHEIGHT="0" SCROLLING="Auto" FRAMEBORDER="Yes" RESIZE="YES">
    


  • switch_layer.htm

    The switch_layer.htm file really just contains the buttons that switches the frame. Most of the code in the frame is just for show. Here is the code for the switch_layer.htm file.


    Original Code
    
    NONE
    


    Upgrade Code
    
    <html>
    <head>
    <title>switch layer</title>
    </head>
    <body marginwidth="0" marginheight="0" border="0" bgcolor="#ccccdd">
    <div align=center>
    <a href="javascript:parent.MapFrame.clickFunction('legend');"><img src="images/legendup.gif" width="80" height="20" border="0"></a><img src="images/layersdown.gif" width="80" height="20">
    </body>
    </html>
    


  • switch_legend.htm

    The switch_legend.htm file is just like the switch_layer.htm file, except for it shows up when the legend is visible. It too contains a button image, however, this image is the toggle of the previous one.


    Original Code
    
    NONE
    


    Upgrade Code
    
    <html>
    <head>
    <title>switch legend</title>
    </head>
    <body marginwidth="0" marginheight="0" border="0" bgcolor="#ccccdd">
    <div align=center>
    <img src="images/legenddown.gif" width="80" height="20"><a href="javascript:parent.MapFrame.clickFunction('legend');"><img src="images/layersup.gif" width="80" height="20" border="0"></a>
    </body>
    </html>
    


  • javascript/aimsClick.js

    Now we need the function that switches the TOC frame to also switch the button frame. This is done by adding a few lines of code in the aimsClick.js file.


    Original Code
    
    if (legendVisible) {
    	legendVisible=false;
    	parent.TOCFrame.document.location=appDir+"toc.htm";
    } else {
    	legendVisible=true;
    	getLegend();
    }
    


    Upgrade Code
    
    if (legendVisible) {
    	legendVisible=false;
    	parent.TOCFrame.document.location=appDir+"toc.htm";
    	parent.SwitchFrame.document.location=appDir+"switch_layer.htm";
    } else {
    	legendVisible=true;
    	parent.SwitchFrame.document.location=appDir+"switch_legend.htm";
    	getLegend();
    }
    


  • Reference:

    This help page was written by Arjune Mirchandani on April 8, 2002 working from the Marine Geology and Geophysics Department at the National Oceanic and Atmospheric Administration.

    Telephone:
    (303) 497-6339

    Email:
    webmaster@arjune.net




Note Making the Continents Layer Unactivable

Re: Idea How to do specific things in ArcIMS (Patrick Hayes)
Date: 2002, Apr 08
From: Arjune Mirchandani <webmaster@arjune.net>




Making the Continents Layer Unactivable
Authored By Arjune Mirchandani ( webmaster@arjune.net )

  • Problem

    On most interfaces, the continents layer is used to help the viewer associate latitudes and longitudes with other layers. However, the continents layer in many cases should not be active since there can be no query on the continents layer.

  • Solution

    The solution is to make additional boolean checks on wether or not to add a checkbox to a layer. This modification is quite quick.

  • Required Files

    The following file will need to be modified for this upgrade:

    1. /toc.htm

  • toc.htm

    The only changes that you will make to this file is within the javascript. You can replace the name ‘Continents’ with any other layer name, or also add other names if you want more then one layer unactiveable.


    Original Code
    
    if (t.LayerIsFeature[i]) {
    


    Upgrade Code
    
    if (t.LayerIsFeature[i] && t.LayerName[i] != 'Continents') {
    


  • Reference:

    This help page was written by Arjune Mirchandani on April 8, 2002 working from the Marine Geology and Geophysics Department at the National Oceanic and Atmospheric Administration.

    Telephone:
    (303) 497-6339

    Email:
    webmaster@arjune.net




Note Adding The Overview Frame

Re: Idea How to do specific things in ArcIMS (Patrick Hayes)
Date: 2002, Apr 12
From: Arjune Mirchandani <webmaster@arjune.net>




Adding The Overview Frame
Authored By Arjune Mirchandani ( webmaster@arjune.net )

  • Problem

    By default, the overview map overlays the main mapframe. There is also a toggle in the toolbar that allows a user to toggle the visibility of the overview map. However, in many cases, a user may want to view the overview map concurrently with the main map frame.

  • Solution

    This change creates a new frame within the interface which contains the overview map. It also removes the overview map toggle from the toolbar.

  • Required Files

    The following files will need to be modified for this upgrade:

    1. /viewer.htm
    2. /ovblank.htm
    3. /overview.htm
    4. /toolbar.htm
    5. /ArcIMSparam.js

  • viewer.htm

    These changes will add the overview frame to the layout.


    Original Code
    
    <FRAME NAME="TOCFrame" SRC="TOCFrame.htm" MARGINWIDTH="0" MARGINHEIGHT="0" SCROLLING="Auto" FRAMEBORDER="Yes" RESIZE="YES">
    


    Upgrade Code
    
    <FRAMESET ROWS="130,*" BORDERCOLOR="#000099" FRAMEBORDER="No" LEFTMARGIN="0" TOPMARGIN="0" FRAMESPACING="0" BORDER="0">
    
    <FRAMESET ROWS="10,80,10,30" BORDERCOLOR="#000099" FRAMEBORDER="No" LEFTMARGIN="0" TOPMARGIN="0" FRAMESPACING="0" BORDER="0">
    
    <FRAME SRC="ovblank.htm" MARGINWIDTH="0" MARGINHEIGHT="0" SCROLLING="No" FRAMEBORDER="No" BORDER="0" RESIZE="No">
    
    <FRAMESET COLS="10,160,10" BORDERCOLOR="#000099" FRAMEBORDER="No" LEFTMARGIN="0" TOPMARGIN="0" FRAMESPACING="0" BORDER="0">
    
    <FRAME SRC="ovblank.htm" MARGINWIDTH="0" MARGINHEIGHT="0" SCROLLING="No" FRAMEBORDER="No" BORDER="0" RESIZE="No">
    
    <FRAME NAME="OverviewFrame" SRC="overview.htm" MARGINWIDTH="0" MARGINHEIGHT="0" SCROLLING="No" FRAMEBORDER="No" BORDER="0" RESIZE="No">
    
    <FRAME SRC="ovblank.htm" MARGINWIDTH="0" MARGINHEIGHT="0" SCROLLING="No" FRAMEBORDER="No" BORDER="0" RESIZE="No">
    
    </FRAMESET>
    
    <FRAME SRC="ovblank.htm" MARGINWIDTH="0" MARGINHEIGHT="0" SCROLLING="No" FRAMEBORDER="No" BORDER="0" RESIZE="No">
    
    <FRAME NAME="SwitchFrame" SRC="switch_layer.htm" MARGINWIDTH="0" MARGINHEIGHT="0" SCROLLING="No" FRAMEBORDER="No" BORDER="0" RESIZE="No">
    
    </FRAMESET>
    
    <FRAME NAME="TOCFrame" SRC="TOCFrame.htm" MARGINWIDTH="0" MARGINHEIGHT="0" SCROLLING="Auto" FRAMEBORDER="No" BORDER="0" RESIZE="No">
    
    </FRAMESET>
    
    </FRAMESET>
    


  • ovblank.htm

    Now that we have added the frames to the layout, we have to create the new html documents. The first one we’ll create is ovblank.htm. This page is simply a blank html page with a background color (of your choice of course).


    Original Code
    
    NONE
    


    Upgrade Code
    
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    
    <html>
    
    <head>
    <title>ovblank</title>
    </head>
    
    <body BGCOLOR="#ccccdd" LEFTMARGIN="0" TOPMARGIN="0">
    </body>
    
    </html>
    


  • overview.htm

    Next, we have to create the actual overview page. This page is a bit more complicated. Here is the code for this page.


    Original Code
    
    NONE
    


    Upgrade Code
    
    <html>
    <head>
    	<title>Overview</title>
    	<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
    
    		// size of Overview Map image
    		var i2Width = 80;
    		var i2Height = 130;
    
    		// setup test for Nav 4.0
    		var isIE = false;
    		var isNav = (navigator.appName.indexOf("Netscape")>=0);
    		var isNav4 = false;
    		var isIE4 = false;
    		var is5up = false;
    		//alert(navigator.appVersion);
    		if (isNav) {
    
    			if (parseFloat(navigator.appVersion)<5) {
    				isNav4=true;
    				//alert("Netscape 4.x or older");
    			} else {
    				is5up = true;
    			}
    		} else {
    			isIE4=true;
    			isIE=true;
    			if (navigator.appVersion.indexOf("MSIE 5")>0) {
    				isIE4 = false;
    				is5up = true;
    				//alert("IE5");
    			}
    		}
    
    		var zoomBoxColor = '#ff0000';
    
    // Create a DHTML layer
    function createLayer(name, inleft, intop, width, height, visible, content) {
    	  var layer;
    	  if (isNav4) {
    	    document.writeln('<layer name="' + name + '" left=' + inleft + ' top=' + intop + ' width=' + width + ' height=' + height +  ' visibility=' + (visible ? '"show"' : '"hide"') +  '>');
    	    document.writeln(content);
    	    document.writeln('</layer>');
    	  } else {
    	    document.writeln('<div id="' + name + '" style="position:absolute; overflow:hidden; left:' + inleft + 'px; top:' + intop + 'px; width:' + width + 'px; height:' + height + 'px;' + '; z-index:1; visibility:' + (visible ? 'visible;' : 'hidden;') +  '">');
    	    document.writeln(content);
    	    document.writeln('</div>');
    	  }
    }
    
    // get the layer object called "name"
    function getLayer(name) {
    	  if (isNav4)
    	    return(document.layers[name]);
    	  else if (isIE4) {
    	    layer = eval('document.all.' + name + '.style');
    	    return(layer);
    	  } else if (is5up) {
    		var theObj = document.getElementById(name);
    		return theObj.style
    	  }
    	  else
    	    return(null);
    }
    
    function setLayerBackgroundColor(name, color) {
      	var layer = getLayer(name);
     	 if (isNav4)
        	layer.bgColor = color;
      	//else if (document.all)
    	else
        	layer.backgroundColor = color;
    }
    
    function getOVImageXY(e) {
    	if (isNav) {
    		parent.MapFrame.mouseX=e.pageX;
    		parent.MapFrame.mouseY=e.pageY;
    	} else {
    		parent.MapFrame.mouseX=event.clientX + document.body.scrollLeft;
    		parent.MapFrame.mouseY=event.clientY + document.body.scrollTop;
    	}
    	// subtract offsets from page left and top
    	parent.MapFrame.mouseX = parent.MapFrame.mouseX-parent.MapFrame.ovHspc;
    	parent.MapFrame.mouseY = parent.MapFrame.mouseY-parent.MapFrame.ovVspc;
    }
    
    // get click on OVmap and move display there
    function ovMap2Click(e) {
    	getOVImageXY(e);
    	parent.MapFramezooming=false;
    	parent.MapFramepanning=false;
    	parent.MapFrameselectBox=false;
    	parent.MapFrame.ovMapClick(parent.MapFrame.mouseX,parent.MapFrame.mouseY);
    }
    
    </SCRIPT>
    </head>
    
    <body BGCOLOR="#ccccdd" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0" LINK="#ff0000" VLINK="#ff0000" ALINK="#ff0000">
    <IMG SRC="images/blank.gif" WIDTH="158" HEIGHT="75" HSPACE="0" VSPACE="0" BORDER="1" ALT="Overview Map" ID="ovImage" name="ovImage" onmousedown="ovMap2Click(event)">
    
    <SCRIPT LANGUAGE="JavaScript1.2" TYPE="text/javascript">
    		var content = '<img name="zoomOVImageTop" src="images/pixel.gif" width=1 height=1>';
    		createLayer("zoomOVBoxTop",0,0,160,130,false,content);
    		setLayerBackgroundColor("zoomOVBoxTop", zoomBoxColor);
    		content = '<img name="zoomOVImageLeft" src="images/pixel.gif" width=1 height=1>';
    		createLayer("zoomOVBoxLeft",0,0,160,130,false,content);
    		setLayerBackgroundColor("zoomOVBoxLeft", zoomBoxColor);
    		content = '<img name="zoomOVImageRight" src="images/pixel.gif" width=1 height=1>';
    		createLayer("zoomOVBoxRight",0,0,160,130,false,content);
    		setLayerBackgroundColor("zoomOVBoxRight", zoomBoxColor);
    		content = '<img name="zoomOVImageBottom" src="images/pixel.gif" width=1 height=1>';
    		createLayer("zoomOVBoxBottom",0,0,160,130,false,content);
    		setLayerBackgroundColor("zoomOVBoxBottom", zoomBoxColor);
    </SCRIPT>
    
    </body>
    </html>
    


  • toolbar.htm

    Now that the overview frame is always visible, we no longer require the toggle overview button in the toolbar. The following change will remove the toggle button from the toolbar.


    Original Code
    
    if (parent.MapFrame.hasOVMap) {
    	// Overview Map toggle . . . requires overview map
    	document.write('<td align="center" valign="middle">');
    	document.write('<img src="images/overview_html.gif" width=16 height=16 hspace=1 vspace=0 border=0 alt=" ' + t.buttonList[15] + '" name="refmap" onmousedown="parent.MapFrame.toggleOVMap();" onmouseover="window.status=\' ' + t.buttonList[15] + '\'">');
    	isSecond = !isSecond;
    	document.writeln('</td>');
    	if (isSecond) document.write('</tr><tr>');
    }
    


    Upgrade Code
    
    REPLACE WITH NOTHING
    


  • ArcIMSparam.js

    Finally, we need to let the interface know that the location of the overview image has changed. The following code will do that for us.


    Original Code
    
    // global for overview map. . . change if not on same frame as Map
    ovImageVar = document.ovImage;
    


    Upgrade Code
    
    // global for overview map. . . change if not on same frame as Map
    ovImageVar = parent.OverviewFrame.document.ovImage;
    


  • Reference:

    This help page was written by Arjune Mirchandani on April 8, 2002 working from the Marine Geology and Geophysics Department at the National Oceanic and Atmospheric Administration.

    Telephone:
    (303) 497-6339

    Email:
    webmaster@arjune.net




None Adding The Overview Frame

Re: Note Adding The Overview Frame (Arjune Mirchandani)
Date: 2003, Jul 22
From: Kavi <kmaddula@bemsys.com>


Hi,

I was able to add a new frame for Overview map. But there is a extent box for overview map present in Mapframe. Can you help me to get rid of it?

Thanks, Kavi


Note Relocating the Refresh Map Button

Re: Idea How to do specific things in ArcIMS (Patrick Hayes)
Date: 2002, Apr 12
From: Arjune Mirchandani <webmaster@arjune.net>




Relocating The Refresh Map Button
Authored By Arjune Mirchandani ( webmaster@arjune.net )

  • Problem

    The refresh map button is currently located in the TOCFrame, right under the listing of the layers in the interface. This is fine when there are just a few layers in the interface. However, when there are 20 or more layers in an interface, the user is forced to scroll down to view the refresh map button every time they change the visibility or active layer in the interface.

  • Solution

    This problem is solved by extracting the refresh button from this frame and putting it in it’s own frame below the TOCFrame. This allows the Refresh Map button to be visible at all times.

  • Required Files

    The following files will need to be modified for this upgrade:

    1. /viewer.htm
    2. /toc.htm
    3. /TOCBottom.htm
    4. /LegendBottom.htm
    5. /javascript/aimsClick.js

  • viewer.htm

    You may have already made a couple of changes to the viewer.htm file at this point. For example, adding the static overview frame to the interface. However, the only requirement is that you have a frame named TOCBottom in the interface and that it’s source is the TOCBottom.htm file.


    Original Code
    
    NONE
    


    Upgrade Code
    
    <FRAMESET ROWS="*,40" BORDERCOLOR="#000099" FRAMEBORDER="No" LEFTMARGIN="0" TOPMARGIN="0" FRAMESPACING="0" BORDER="0">
    
    <FRAME NAME="TOCFrame" SRC="TOCFrame.htm" MARGINWIDTH="0" MARGINHEIGHT="0" SCROLLING="Auto" FRAMEBORDER="Yes" RESIZE="YES">
    
    <FRAME NAME="TOCBottom" SRC="TOCBottom.htm" MARGINWIDTH="0" MARGINHEIGHT="0" SCROLLING="NO" FRAMEBORDER="NO" RESIZE="NO">
    


  • toc.htm

    The only change that needs to be done is to remove the code that creates the Refresh Map button.


    Original Code
    
    document.writeln('	<TD ALIGN="center" COLSPAN="3">');
    document.writeln('		<HR WIDTH=90%>');
    document.writeln('		<INPUT TYPE="button" NAME="refreshButton" VALUE="' + t.buttonList[44] + '" onClick="updateLayers()">');
    document.writeln('	</TD>');
    


    Upgrade Code
    
    NONE
    


  • TOCBottom.htm

    The TOCBottom.htm file consists of mainly just the Refresh Map button.


    Original Code
    
    NONE
    


    Upgrade Code
    
    <html>
    <head>
    <script>
    var re_image_off=new Image();
    var re_image_on=new Image();
    var re_link='javascript:parent.TOCFrame.updateLayers()';
    var re_title='Refresh The Main Map Now';
    re_image_off.src='images/refresh_map_off.gif';
    re_image_on.src='images/refresh_map_on.gif';
    </script>
    </head>
    <body bgcolor="#ccccdd">
    <table width="100%" height="100%" cellspacing="0" cellpadding="0">
    <tr>
    <td height="50%" width="100%" valign="bottom" align="center">
    <script>document.writeln('<a href="'+re_link+'" title="'+re_title+'" onmouseover="document.re_image.src=re_image_on.src;self.status=re_title;return true;" onmouseout="document.re_image.src=re_image_off.src;self.status=\'\';return true;"><img name=re_image src="'+re_image_off.src+'" width=130 height=20 border=0></a><br><img src=images/blank.gif width=10 height=10></td></tr>')</script>
    </table>
    </body>
    </html>
    


  • LegendBottom.htm

    We need to remember that when the legend frame is visible, the refresh map button should not be visible. We can make this fix by creating a new html file called LegendBottom.htm that really consists of nothing except for the look and feel of the interface.


    Original Code
    
    NONE
    


    Upgrade Code
    
    <html>
    <head>
    <title>legend bottom</title>
    </head>
    <body bgcolor="#ccccdd">
    <table width="100%" height="100%" cellspacing="0" cellpadding="0">
    <tr>
    <td width=5><img src="images/blank.gif" width="5" height="5"></td><td height="50%" width="100%" valign="bottom" align="center">
    </td></tr>
    </table>
    </body>
    </html>
    


  • /javascript/aimsClick.js

    We need to remember that when the legend frame is visible, the refresh map button should not be visible. We can make this fix by creating a new html file called LegendBottom.htm that really consists of nothing except for the look and feel of the interface.


    Original Code
    
    if (legendVisible) {
    	legendVisible=false;
    	parent.TOCFrame.document.location=appDir+"toc.htm";
    } else {
    	legendVisible=true;
    	getLegend();
    }
    


    Upgrade Code
    
    if (legendVisible) {
    	legendVisible=false;
    	parent.TOCFrame.document.location=appDir+"toc.htm";
    	parent.TOCBottom.document.location=appDir+"TOCBottom.htm";
    } else {
    	legendVisible=true;
    	parent.TOCBottom.document.location=appDir+"LegendBottom.htm";
    	getLegend();
    }
    


  • Reference:

    This help page was written by Arjune Mirchandani on April 8, 2002 working from the Marine Geology and Geophysics Department at the National Oceanic and Atmospheric Administration.

    Telephone:
    (303) 497-6339

    Email:
    webmaster@arjune.net




Note Adding the Shapefile Extractor Capability

Re: Idea How to do specific things in ArcIMS (Patrick Hayes)
Date: 2002, Apr 16
From: Arjune Mirchandani <webmaster@arjune.net>




Adding the Shapefile Extractor Capability
Authored By Arjune Mirchandani ( webmaster@arjune.net )

  • Problem

    The ArcIMS Interface is a great way to view data. However, it would be nice to be able to not only view the data, but to extract specific data and extract it into a Shapefile. The ArcIMS Interface allows us to do this with the following upgrades.

  • Solution

    The extractor can extract any data from a point or polygon spatially enabled database. The extraction will be made from all visible layers in a given viewing extent. Extracting queried data is possible as well. Once the data to be extracted is chosen by the user, the extractor will then create a shapefile for each of the visible layers and selected points. The extractor will then pack these shapefiles into a zip file, save it to the output directory on the server, then allow the user to download this file onto their local hard drive.

  • Required Files

    The following files will need to be modified for this upgrade:

    1. /ArcIMSparam.js
    2. /mapservice.axl
    3. /aimsExtractResource.js
    4. /javascript/aimsExtract.js

  • ArcIMSparam.js

    This change will add the extract button to the toolbar.


    Original Code
    
    var useExtract=false;
    


    Upgrade Code
    
    var useExtract=true;
    


  • mapservice.axl

    The mapservice.axl file is really just the AXL file that you are using for your image map service. Within this axl file, you have defined one or more layers that will be associated to your ArcIMS Interface. To add extraction capability, simply add the following tag within each layer that you want to be extracted from.


    Original Code
    
    <LAYER type="featureclass" name="Continents" visible="true" id="1">
    	<DATASET name="ESRI.CONTINENT" type="polygon" workspace="sde_ws-56" />
    	<SIMPLERENDERER>
    		<SIMPLEPOLYGONSYMBOL boundarycolor="0,102,0" boundarytransparency="1.0" filltransparency="1.0" fillcolor="102,204,102" boundarycaptype="round" />
    	</SIMPLERENDERER>
    </LAYER>
    


    Upgrade Code
    
    <LAYER type="featureclass" name="Continents" visible="true" id="1">
    	<DATASET name="ESRI.CONTINENT" type="polygon" workspace="sde_ws-56" />
    	<SIMPLERENDERER>
    		<SIMPLEPOLYGONSYMBOL boundarycolor="0,102,0" boundarytransparency="1.0" filltransparency="1.0" fillcolor="102,204,102" boundarycaptype="round" />
    	</SIMPLERENDERER>
    	<EXTENSION type="extract" >
    		<EXTRACTPARAMS clip="true" />
    	</EXTENSION>
    </LAYER>
    


  • aimsExtractResource.js

    This is a new file that you will need to add to your directory. Add this file to the directory that contains all the .htm files.


    Original Code
    
    NONE
    


    Upgrade Code
    
    // aimsExtractResource.js
    /*
    *  JavaScript resource file for ArcIMS HTML Viewer - Extract Sample
    *		arrays containing display text
    * 		This file can be swapped out with appropriate language translation
    */
    
    var extractList = new Array();
    var extractButton = new Array();
    
    extractList[0] = "Extract Layers";
    extractList[1] = "Layers to be extracted:";
    extractList[2] = "Extract";
    extractList[3] = "No extractable layers are visible.<br>";
    extractList[4] = "No extractable layers available for this extent.<br>";
    extractList[5] = "Extent: ";
    extractList[6] = "Zip File now available for downloading. . .";
    extractList[7] = "Download";
    extractList[8] = "Unable to extract layers.";
    extractList[9] = "";
    extractList[10] = "";
    


  • javascript/aimsExtract.js

    This is another file that you will need to add to your directory. Add this file into the javascript directory.


    Original Code
    
    NONE
    


    Upgrade Code
    
    // aimsExtract.js
    
    aimsExtractPresent=true;
    
    var totLayers = 0;
    var xLayers = new Array();
    
    // this variable added for Extract MapService
    var imsExtractURL = imsURL + "&CustomService=Extract";
    
    
    
    // extract layers to download
    	// overrides function in aimsCustom.js
    function extractIt() {
    	hideLayer("measureBox");
    	//alert("Extract function here");
    	totLayers = 0;
    	xLayers.length = 0;
    	for (var i=0;i<LayerVisible.length;i++) {
    		if ((mapScaleFactor>=LayerMinScale[i]) && (mapScaleFactor<=LayerMaxScale[i])) {
    			if (LayerIsFeature[i]) {
    				if (LayerVisible[i]) {
    					xLayers[totLayers] = i;
    					totLayers++;
    				}
    			}
    		}
    	}
    	//if (totLayers>0) {
    		var Win1 = parent.TextFrame;
    		var theFrame = "parent.MapFrame";
    		if ((useExternalWindow) || (!useTextFrame)) {
    			Win1 = window.open("","ExtractWindow","width=575,height=120,scrollbars=yes,resizable=yes");
    			theFrame = "opener";
    			if (parent.MapFrame!=null) theFrame = "opener.parent.MapFrame";
    		} else {
    			Win1 = parent.TextFrame;
    			Win1.document.open();
    		}
    		Win1.document.open();
    		Win1.document.writeln('<html><meta http-equiv="Content-Type" content="text/html; charset=' + charSet + '"><head><title>' + extractList[0] + '</title></head>');
    		Win1.document.writeln('<body bgcolor="' + textFrameBackColor + '" text="' + textFrameTextColor + '" link="' + textFrameLinkColor + '" vlink="' + textFrameLinkColor + '" LEFTMARGIN=10 TOPMARGIN=5 onload="window.focus()">');
    		Win1.document.writeln('<FONT FACE="Arial" SIZE="-1"><b>' + extractList[1] + '</b><br>');
    		Win1.document.writeln('<DIV ALIGN="center"><table width="90%" border="0" cellspacing="2" cellpadding="2" nowrap bgcolor="' + tableBackColor + '">');
    
    		if (xLayers.length>0) {
    			Win1.document.writeln('<form>');
    			Win1.document.writeln('<tr><td><FONT FACE="Arial" SIZE="-1">');
    			var exCount = 0;
    			for (var i=0;i<xLayers.length;i++) {
    				var exNum = parseInt(xLayers[i]);
    				if (LayerVisible[exNum]==1) {
    					Win1.document.writeln(LayerName[exNum] + '<br>');
    					exCount++;
    				}
    			}
    			if (exCount>0) {
    				Win1.document.writeln('</font></td><td>');
    				Win1.document.writeln('<input type="button" value="' + extractList[2] + '" onclick="' + theFrame + '.extractTheLayers()">');
    			} else {
    				Win1.document.writeln(extractList[3]);
    
    			}
    			Win1.document.writeln('</td></tr>');
    			Win1.document.writeln('</form>');
    		} else {
    			Win1.document.writeln('<tr><td><FONT FACE="Arial" SIZE="-1">');
    			Win1.document.writeln(extractList[4]);
    			Win1.document.writeln('</font></td></tr>');
    		}
    		Win1.document.writeln('</table>');
    		Win1.document.writeln('</DIV>');
    		Win1.document.writeln(extractList[5] + eLeft + ',' + eBottom + ',' + eRight + ',' + eTop + '<br>');
    		Win1.document.writeln('</font></body></html>');
    		Win1.document.close();
    
    		//alert(totLayers + " layers:\n" + xLayers.toString());
    	//} else {
    	//	alert("No extractable layers are visible.");
    	//}
    }
    
    
    
    function writeExtractXML() {
    	var eString = '<ARCXML version="1.1">\n';
    	eString += '<REQUEST>\n<GET_EXTRACT>\n<PROPERTIES>\n';
    	eString += '<ENVELOPE minx="' + forceComma(eLeft) + '" miny="' + forceComma(eBottom) +'" maxx="' + forceComma(eRight) + '" maxy="' + forceComma(eTop) + '" />\n';
    	eString += '<IMAGESIZE height="' + iHeight + '" width="' + iWidth + '" />\n';
    	eString += '<LAYERLIST>\n';
    	/*
    	for (var ex=0;ex<xLayers.length;ex++) {
    		var exNum = parseInt(xLayers[ex]);
    		eString += '<LAYERDEF id="' + LayerID[exNum] + '" ';
    		if (LayerVisible[exNum]==1) {
    			eString += 'visible="true"';
    		} else {
    			eString += 'visible="false"';
    		}
    		if (exNum==ActiveLayerIndex) {
    			var addString = addSelectToExtractRequest();
    			if (addString!="") {
    				eString += '>\n' + addString + '</LAYERDEF>\n';
    			} else {
    				eString += '/>\n';
    			}
    		} else {
    			eString += '/>\n';
    		}
    	}
    
    	*/
    	for (var j=0;j<LayerID.length;j++) {
    		eString += '<LAYERDEF id="' + LayerID[j] + '" ';
    		var k=-1;
    		for (var m=0;m<xLayers.length;m++) {
    			if (parseInt(xLayers[m])==j) k=j;
    		}
    		if (k>-1) {
    			eString += 'visible="true"';
    			if (k==ActiveLayerIndex) {
    				var addString = addSelectToExtractRequest();
    				if (addString!="") {
    					eString += '>\n' + addString + '</LAYERDEF>\n';
    				} else {
    					eString += '/>\n';
    				}
    			} else {
    				eString += '/>\n';
    			}
    		} else {
    			eString += 'visible="false"/>\n';
    		}
    	}
    	eString += '</LAYERLIST>\n';
    	eString += '</PROPERTIES>\n</GET_EXTRACT>\n</REQUEST>\n';
    	eString += '</ARCXML>\n';
    	return eString;
    }
    
    function extractTheLayers() {
    	//alert("Extract stuff here.");
    	showRetrieveData();
    	var theString = writeExtractXML();
    	alert(theString);
    	sendExtractRequest(theString, 4001)
    
    }
    
    function addSelectToExtractRequest() {
    	var selString = "";
    	var sFactor = (eRight-eLeft) / iWidth
    	if ((sFactor>=LayerMinScale[ActiveLayerIndex]) && (sFactor<=LayerMaxScale[ActiveLayerIndex]) && (LayerVisible[ActiveLayerIndex]==1)) {
    		if (selectCount>0) {
    			if (selectionMode==1) {
    				selString +='<SPATIALQUERY  where="' + setQueryString + '"';
    				if (useLimitExtent) {
    					// keep this within the limitExtent
    
    					selString +='>\n<SPATIALFILTER relation="area_intersection">\n';
    					selString +='<ENVELOPE maxx="' + forceComma(limitRight) + '" maxy="' + forceComma(limitTop) + '" minx="' + forceComma(limitLeft) + '" miny="' + forceComma(limitBottom) + '" />\n';
    					selString +='</SPATIALFILTER>\n';
    					selString +='</SPATIALQUERY>\n';
    				} else {
    				selString +='/>\n';
    				}
    
    			} else {
    				selString +='<SPATIALQUERY>\n';
    				selString +='<SPATIALFILTER relation="area_intersection" >\n';
    				if (selectionMode==2) {
    					selString +='<ENVELOPE ' + selectEnvelope + ' />\n';
    				} else {
    					if ((shapeSelectBuffer) && (shapeBufferDistance>0)) {
    					//if (shapeBufferDistance>0) {
    						// do a buffer around the shape before selecting
    						var smoothEdge = shapeBufferDistance  * 0.01;
    						selString += '<BUFFER distance="' + forceComma(shapeBufferDistance) + '" ';
    						//selString += 'smoothedges="' + smoothEdge + '"';
    						selString += ' bufferunits="' + ScaleBarUnits + '"';
    						selString += ' />\n';
    					}
    					if (clickType==2) {
    						selString +='<POLYLINE>\n<PATH>\n';
    					} else if (clickType==3) {
    						selString +='<POLYGON>\n<RING>\n';
    					} else {
    						selString +='<MULTIPOINT>\n';
    					}
    					if (clickType==1) {
    						selString +='<POINT x="' + forceComma(clickPointX[clickCount-1]) + '" y="' + forceComma(clickPointY[clickCount-1]) + '" />\n';
    					} else {
    						for (var i=0;i<clickCount;i++) {
    							selString +='<POINT x="' + forceComma(clickPointX[i]) + '" y="' + forceComma(clickPointY[i]) + '" />\n';
    						}
    					}
    					if (clickType==3) {
    						//selString +='<POINT x="' + clickPointX[0] + '" y="' + clickPointY[0] + '" />\n';
    						selString +='</RING>\n</POLYGON>\n';
    					} else if (clickType==2) {
    						selString +='</PATH>\n</POLYLINE>\n';
    					} else {
    						selString +='</MULTIPOINT>\n';
    					}
    				}
    				selString +='</SPATIALFILTER>\n';
    				///*
    				if (useLimitExtent) {
    					// keep this within the limitExtent
    					selString +='<SPATIALFILTER relation="area_intersection">\n';
    					selString +='<ENVELOPE maxx="' + forceComma(limitRight) + '" maxy="' + forceComma(limitTop) + '" minx="' + forceComma(limitLeft) + '" miny="' + forceComma(limitBottom) + '" />\n';
    					selString +='</SPATIALFILTER>\n';
    				}
    				//*/
    				selString +='</SPATIALQUERY>\n';
    			}
    		}
    	}
    	return selString;
    }
    
    function showExtractURL(theReply) {
    	hideRetrieveData();
    	//alert(theReply);
    	var Win1 = parent.TextFrame;
    	var theFrame = "parent.MapFrame";
    	if ((useExternalWindow) || (!useTextFrame)) {
    		Win1 = window.open("","ExtractWindow","width=575,height=120,scrollbars=yes,resizable=yes");
    		theFrame = "opener";
    		if (parent.MapFrame!=null) theFrame = "opener.parent.MapFrame";
    	} else {
    		Win1 = parent.TextFrame;
    		Win1.document.open();
    	}
    	Win1.document.open();
    	Win1.document.writeln('<html><meta http-equiv="Content-Type" content="text/html; charset=' + charSet + '"><head><title>' + extractList[0] + '</title></head>');
    	Win1.document.writeln('<body bgcolor="' + textFrameBackColor + '" text="' + textFrameTextColor + '" link="' + textFrameLinkColor + '" vlink="' + textFrameLinkColor + '" LEFTMARGIN=10 TOPMARGIN=5 onload="window.focus()">');
    	Win1.document.writeln('<form><FONT FACE="Arial" SIZE="-1"><b>');
    	var pos = theReply.indexOf("OUTPUT");
    	var theURL = "";
    	if (pos != -1) {
    		Win1.document.writeln(extractList[6] + '    ');
    		theURL = getInsideString(theReply,'url="',dQuote,pos,0,false);
    		Win1.document.writeln('<a href="' + theURL + '">' + extractList[7] + '</A>');
    	} else {
    		Win1.document.writeln(extractList[8]);
    	}
    	Win1.document.writeln('</b></font></form></body></html>');
    	Win1.document.close();
    
    
    }
    
    // send custom XML request. . . set up custom response handler
    function sendExtractRequest(XMLRequest, theType) {
    	var theFunction = "parent.MapFrame.processExtractXML";
    	var theForm = parent.PostFrame.document.forms[0];
    	theForm.JavaScriptFunction.value = theFunction;
    	sendToServer(imsExtractURL,XMLRequest,theType)
    }
    
    function processExtractXML(theReplyIn) {
    	theReplyIn = replacePlus(theReplyIn);
    	var theReply = unescape(theReplyIn);
    	//alert(theReply);
    	okToSend = true;
    	if (debugOn>2) alert(msgList[13] + theReply);
    	var theError = getXMLErrorMessage(theReply);
    	if (XMLMode == 4001) {
    		//alert("XMLMode=4001\n" + theReply);
    		showExtractURL(theReply);
    
    	}
    	if (XMLMode == 4002) {
    		alert("XMLMode=4002");
    
    	}
    }
    


  • Reference:

    This help page was written by Arjune Mirchandani on April 8, 2002 working from the Marine Geology and Geophysics Department at the National Oceanic and Atmospheric Administration.

    Telephone:
    (303) 497-6339

    Email:
    webmaster@arjune.net




Note Adding The External Viewer

Re: Idea How to do specific things in ArcIMS (Patrick Hayes)
Date: 2002, Jun 03
From: Arjune Mirchandani <webmaster@arjune.net>




Adding The External Viewer
Authored By Arjune Mirchandani ( arjune.mirchandani@colorado.edu )

  • Problem

    The current version of the ArcIMS interface only allows a user to view queried data within a frame of the interface. However, it would be nice to have the choice of having the data open in a window of it's own.

  • Solution

    ArcIMS has a built in feature that allows an external window to be opened for the data. However, the interface currently can either have it or it can't. This upgrade will add an external window toggle button to the toolbar allowing the user to choose to have the data viewed within the interface or in an external window.

  • Required Files

    The following files will need to be modified for this upgrade:

    1. /toolbar.htm
    2. /mapframe.htm
    3. /arcIMSparam.js
    4. /javascript/aimsIdentity.js
    5. /javascript/aimsBuffer.js

  • toolbar.htm

    These changes will add the external viewer button to the toolbar.


    Original Code
    
    document.writeln('</tr>');
    document.writeln('</table>');
    
    </SCRIPT>
    
    
    


    Upgrade Code
    
    document.writeln('</tr>');
    	document.writeln('</table>');
    
    	// IMAGE DECLARATINON FOR THE QUERY TOGGLE WINDOW..................................
    	var ext_off=new Image();
    	ext_off.src="images/externalresultsoff.gif";
    	var ext_lit=new Image();
    	ext_lit.src="images/turnonextview.gif";
    	var int_off=new Image();
    	int_off.src="images/externalresultson.gif";
    	var int_lit=new Image();
    	int_lit.src="images/turnoffextview.gif";
    
    	// FUNCTION THAT TOGGLES THE EXTERNAL AND INTERNAL QUERY WINDOW....................
    	function changeImage(srcButton,updateState,isMouseOver) {
    		if(updateState) {
    		    if(parent.isShowExternalWindow()) {
    		    	parent.setShowExternalWindow(false);
    				alert("External Data Viewer Disabled.");
    			} else {
    		    	parent.setShowExternalWindow(true);
    				alert("External Data Viewer Enabled.");
    			}
    		}
    
    		if(parent.isShowExternalWindow()) {
    			if(isMouseOver) {
    	  			srcButton.src=int_lit.src;
    	  			self.status="Do Not Show Query Results in External Window";
    	  		} else {
    	  			srcButton.src=int_off.src;
    	  			self.status="";
    	  		}
    	  	} else {
    			if(isMouseOver) {
    	  			srcButton.src=ext_lit.src;
    	  			self.status="Show Query Results in External Window";
    	  		} else {
    	  			srcButton.src=ext_off.src;
    	  			self.status="";
    	  		}
    	  	}
    	 	return true;
    	}
    
    //LINE THAT ADDS THE TOGGLE EXTERNAL/INTERNAL RESULTS WINDOW.........................
    	document.writeln("<br><img name='extButton' src='images/externalresultsoff.gif' width=38 height=33 hspace=0 
    
    vspace=0 border=0 alt='Toggle Show Query Results in External Window' onmousedown='return 
    
    changeImage(document.extButton,true,false)' onmouseover='return changeImage(document.extButton,false,true)' 
    
    onmouseout='return changeImage(document.extButton,false,false)'><br>");
    
    </SCRIPT>
    
    


  • mapframe.htm

    These changes add the javascript functions required to switch the External Viewer on and off.


    Original Code
    
    <SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript">
    
    // Designer will set the next variable - theTitle
    
    


    Upgrade Code
    
    <SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript">
    
    function simpleWin(url,width,height) {
    	var simplewin = 
    
    window.open(url,"LinkWindow","width="+width+",height="+height+",menubar=yes,toolbar=yes,scrollbars=yes,status=yes,menubar=yes
    
    ,resizable=yes,location=yes");
    	simplewin.focus();
    }
    
    function setShowExternalWindow(state) {
    	MapFrame.extFrameOn=state;
    }
    
    function isShowExternalWindow() {
    	if(MapFrame.extFrameOn)
    		return true;
    	else
    		return false;
    }
    
    // Designer will set the next variable - theTitle
    
    


  • /arcIMSparam.js

    These changes add the javascript variable setFrameOn.


    Original Code
    
    // Anywhere in code.......................
    
    


    Upgrade Code
    
    // Variable that makes query data is displayed in an internal or external window......
    var extFrameOn=false;
    
    


  • /javascript/aimsIdentity.js

    There are several changes that need to be made to this script.

    1. First, we need to add some variables that the upgrade will use.


      Original Code
      
      // Anywhere in code.......................
      
      


      Upgrade Code
      
      // EXTERNAL WINDOW PARAMETERS..................................................
      var ExternalWindowName="ExtWindow";
      var ExternalWindowRender="width=" + hyperlinkWindowWidth + ",height=" + hyperlinkWindowHeight + 
      
      ",menubar=yes,scrollbars=yes,resizable=yes"
      var LinkWindowName="LinkWindow";
      var SimpleWinScript='<script>function simpleWin(url,width,height) {var 
      
      simplewin=window.open(url,"'+LinkWindowName+'","width="+width+",height="+height+",menubar=yes,toolbar=yes,scrollbars=yes,stat
      
      us=yes,menubar=yes,resizable=yes,location=yes");simplewin.focus();}</script>';
      var LinkWindowRender = "width=" + hyperlinkWindowWidth + ",height=" + hyperlinkWindowHeight + 
      
      ",menubar=yes,toolbar=yes,scrollbars=yes,status=yes,menubar=yes,resizable=yes,location=yes";
      
      


    2. Next, we need to add the extFrameOn variable to the designated places. There will be three places in the code where this change needs to be made.


      Original Code
      
      if ((useExternalWindow) || (!useTextFrame)) {
      Win1 = window.open("","QueryWindow","width=575,height=120,scrollbars=yes,resizable=yes");
      
      


      Upgrade Code
      
      if ((extFrameOn) || (useExternalWindow) || (!useTextFrame)) {
      Win1 = window.open("",ExternalWindowName,ExternalWindowRender);
      
      


  • /javascript/aimsBuffer.js

    There are several changes that need to be made to this script.

    1. First, we need to add some variables that the upgrade will use.


      Original Code
      
      // Anywhere in code.......................
      
      


      Upgrade Code
      
      // EXTERNAL WINDOW PARAMETERS..................................................
      var ExternalWindowName="ExtWindow";
      var ExternalWindowRender="width=" + hyperlinkWindowWidth + ",height=" + hyperlinkWindowHeight + 
      
      ",menubar=yes,scrollbars=yes,resizable=yes"
      var LinkWindowName="LinkWindow";
      var SimpleWinScript='<script>function simpleWin(url,width,height) {var 
      
      simplewin=window.open(url,"'+LinkWindowName+'","width="+width+",height="+height+",menubar=yes,toolbar=yes,scrollbars=yes,stat
      
      us=yes,menubar=yes,resizable=yes,location=yes");simplewin.focus();}</script>';
      var LinkWindowRender = "width=" + hyperlinkWindowWidth + ",height=" + hyperlinkWindowHeight + 
      
      ",menubar=yes,toolbar=yes,scrollbars=yes,status=yes,menubar=yes,resizable=yes,location=yes";
      
      


    2. Next, we need to add the extFrameOn variable to the designated places. There will be three places in the code where this change needs to be made.


      Original Code
      
      if ((useExternalWindow) || (!useTextFrame)) {
      Win1 = window.open("","QueryWindow","width=575,height=120,scrollbars=yes,resizable=yes");
      
      


      Upgrade Code
      
      if ((extFrameOn) || (useExternalWindow) || (!useTextFrame)) {
      Win1 = window.open("",ExternalWindowName,ExternalWindowRender);
      
      


  • Reference:

    This help page was written by Arjune Mirchandani on September 24, 2001 working from the Marine Geology and Geophysics Department at the National Oceanic and Atmospheric Administration.

    Telephone:
    (303) 497-6339

    Email:
    arjune.mirchandani@colorado.edu




Question Legend Truncated

Re: Idea How to do specific things in ArcIMS (Patrick Hayes)
Date: 2003, Feb 12
From: <mjohnston@dot.state.ny.us>


ArcIMS 4.0 truncates the lower part of the legend. How do I prevent it from doing so?


Question I don't want to switch between Legend and Layer

Re: Idea How to do specific things in ArcIMS (Patrick Hayes)
Date: 2003, Aug 19
From: Delahaye fanien <mr.foxy@wanadoo.fr>


Hello,

I want to know if it's be possible to display the legend of each layer and the layer menu in a same HTML frame (the legend at the left of each layer and the active and visible button at the right of the name of the layer) Thanks a lot for help me.


Question Zoom limit in arcIMS

Re: Idea How to do specific things in ArcIMS (Patrick Hayes)
Date: 2003, Aug 20
From: Colin Booth <boothc@u.washington.edu>


I'm trying to constrain zooming so that you can't get any closer then 1" = 500' since thats approximately the zoom depth that the hillshade and DOQQ graphics that I'm using become unviewable due to pixelation. Anyway, I've been trying to find a way to have a lower limit set on zooming without having to re-write large portions of aimsClick.js, aimsCommon.js and/or aimsNavigation.js.

Any clues as to how to go about this would be fabulous.

Cheers
-Colin

None Setting variables for hyper links in ArcIMSparam.js files

Re: None ESRI ArcIMS (Internet Map Server (Ted Habermann)
Date: 2001, Aug 28
From: Josh Klaus <jklaus@ngdc.noaa.gov>


I have sections of the code for the ArcIMSparam.js files and the AimsIdentify.js files. This code details the modifications that were successful in activating hyper links to fields when an Identify command has been operated.

This is the sections in the ArcIMSparam.js file that directs which fields are selected when an Identify operation has been run as well as how to turn those fields into hyperlinks:



// fields to be returned in identify/selection/query request. . . #ALL#=all fields
var selectFields= "true";
//var selectFields= "#ID# #SHAPE#";
// swap out the list of returned fields?
//If true, a list must be defined in selFieldList[n] for each layer to update selectFields
var swapSelectFields=true;
// array for each layer's returned fields if swapSelectFields=true
var selFieldList = new Array();
// sample set for world - if not #ALL#, id and shape fields required. Separate with a space
selFieldList[0]="SDE_USER.MAR_SEDS.MGGID #ID# #SHAPE#";
selFieldList[1]="SDE_USER.MAR_SEDS.MGGID #ID# #SHAPE#";
selFieldList[2]="#ALL#";
selFieldList[3]="#ALL#";
selFieldList[4]="#ALL#";
selFieldList[5]="NAME CONTINENT #ID# #SHAPE#";
selFieldList[6]="#ALL#";

// use the field alias in the data display?
//If true, a list must be defined in fieldAliasList[n] for each layer defining aliases for those fields needing them
var useFieldAlias=false;
// array for aliases for each layer's returned fields if useFieldAlias=true
var fieldAliasList = new Array();
// sample set for world - fieldname:alias pairs separated by a bar (|)... if no aliases, use empty string ("")
fieldAliasList[0]="SDE_USER.MAR_SEDS.URL|URL";
fieldAliasList[1]="SDE_USER.MAR_SEDS.URL|URL";
fieldAliasList[2]="";
fieldAliasList[3]="";
fieldAliasList[4]="";
fieldAliasList[5]="NAME:CountryName";
fieldAliasList[6]="";

// Hide the ID field display? The ID Field must be included in field list, but we don't have to show it.
var hideIDFieldData = true;
// Hide the shape field display? The Shape Field must be included in field list, but we don't have to show it.
var hideShapeFieldData = true;


// parameters for setting up hyperlinks in data display
var hyperLinkLayers = new Array(); // layers to have hyperlink
var hyperLinkFields = new Array(); // field in those layers to be used for hyperlink
var hyperLinkPrefix = new Array(); // prefix (if any) to place before field value to make hyperlink url
var hyperLinkSuffix = new Array(); // suffix (if any) to place after field value to make hyperlink url
hyperLinkLayers[0] = "Marine Geology Station Locations";
hyperLinkFields[0] = "SDE_USER.MAR_SEDS.MGGID";
hyperLinkPrefix[0] = "http://oas.ngdc.noaa.gov/mgg/plsql/geolin.set_expand?v_mggid=";
hyperLinkSuffix[0] = "";

None modification to aimsIdentify.js file to correct hyperlinkprefix and hyperlinksuffix

Re: None ESRI ArcIMS (Internet Map Server (Ted Habermann)
Date: 2001, Aug 31
From: Josh Klaus <jklaus@ngdc.noaa.gov>


There seemed to be an error in the default code in the aimsIdentify.js file. We made a correction to one line of code at line 256. Here is the corrected code:

if (showHyper) {
   for (var s1=0;s1<hyperLinkFields.length;s1++) {
   if (hyperLinkFields[s1]==fName1[f]) {
  var theLinkURL = hyperLinkPrefix[s1] + fValue1[f] + hyperLinkSuffix[s1];
      Win1.document.write('<a href="' + theLinkURL + '" target="_blank">');
  isHyper=true;


Note Reasoning for ArcIMS defaulting to JPEG instead of GIF files

Re: None ESRI ArcIMS (Internet Map Server (Ted Habermann)
Date: 2001, Sep 04
From: Josh Klaus <jklaus@ngdc.noaa.gov>


I found this on the ArcIMS e-mail discussion forum site. It explains why ESRI cannot allow the generation of the GIF format, but does for JPEG files.



The GIF Format:

GIF was developed to provide a highly compressed raster format for interchanging images across slow speed telephone lines and is thus excellent for use on the Internet. The LZW compression scheme relies on the fact that many computer generated images contain large areas of identical colors. These repeating sequences of colors can be represented by much smaller code sequences. For this reason, it is best to use GIF for simple to moderately complex images typical of maps and diagrams. LZW is a "lossless" type of compression so the resultant images never suffer from image artifacts or quality degradation associated with "lossy" techniques like JPEG. LZW is founded on the use of Palettes and is limited to 256 simultaneous colors. Since the GIF format utilizes the LZW compression technology patented by Unisys Corporation, you must establish a licensing agreement with Unisys before you can obtain GIF support from ESRI.

Solid colors in GIF images sometimes appear dithered in some web browsers, but this dithering can be removed by using the 'safety palette', a 216 color palette used for web raster graphics that ensures that they don't appear dithered when displayed on a wide range of browser types and platforms.

The JFIF (JPEG) Format:

It is commonly believed that JPEG is an image format, however JPEG is actually a compression format and not a file format. The JPEG File Interchange Format (JFIF) is a standard file format, which uses JPEG compression technology, a 24-bit compression technique for storing full color and gray scale images. JPEG was created out of the need to shrink the storage requirements of photo realistic images and therefore is optimized to work with natural scenes and portraits, which are dominated by slow shifts in color frequency and relatively low contrast. This is exactly where GIF performs poorly since there are few repeating sequences to encode. JPEG compression produces files four times larger on average than LZW for diagram-like images but can produce significantly smaller images than LZW when used for complex images like satellite photos.

Unlike GIF/LZW, JPEG is royalty free and does not require a special licensing agreement for its use. JPEG can encode images with up to 16.7 million colors. You should avoid framing your images, using dense grids, or any graphical techniques which introduce abrupt changes in contrast for optimum image quality. Compression "artifacts," small distortions in colors which may appear as blotchy regions are common in diagram type images when using JPEG.

The PNG Format:

The PNG graphics format was defined during 1995-96 to overcome the problems with the copyright issues of GIF/LZW. The compression of PNG (where all the copyright issues started with) is based on the zlib algorithms from Mark Adler e.o., which is free software donated to the public domain. PNG's compression is fully lossless--and it can support up to 48-bit truecolor or 16-bit grayscale.

For more information: http://www.freesoftware.com/pub/png

Two file size comparisons:

Image1 JPEG - 94K GIF - 20K PNG - 14K (8Bit) PNG - 17K (24BIT)

Image2 JPEG - 109K GIF - 197K PNG - 170K (8Bit) PNG - 433K(24BIT)



(http://forums.esri.com/forums/Index.cfm?CFApp=64&Message_ID=64617)


Question Hyperlink problems

Re: None ESRI ArcIMS (Internet Map Server (Ted Habermann)
Date: 2001, Oct 22
From: Ian May Ian


Dear All

I have set up hyperlinks from some layers within ArcIMS 3.1
with both the Prefix and Suffix functions. Now those layers
with hyperlinks cannot be identified with the identify button.

Any ideas would be greatly appreciated 

Best Wishes

Ian May

Feedback Hyperlink issues

Re: Question Hyperlink problems (Ian May)
Date: 2001, Oct 22
From: Josh Klaus <josh.klaus@noaa.gov>


Ian:
I am not sure about the specifics of your problem. Would you repost your problem with the actual code from your ArcIMSparam.js and aimsidentify.js files. All I need to look at are lines 250-260 in aimsidentify.js file and lines 285-335 in the ArcIMSparam.js file. Feel free to e-mail me directly at josh.klaus@noaa.gov.

Josh


None Hyperlink to new window problem

Re: Feedback Hyperlink issues (Josh Klaus)
Date: 2002, Dec 09
From: George <georgechen@singapore.com>


Hi! Recently, I have a problem with my browser. When i click on a hyperlink that links me to a new window, a new window appears and gets stuck there... I could only see the title bar and menu bar of the new window only. I have tried reinstalling and repair Internet Explorer6 SP1, but was no use... Please tell me how to troubleshoot this problem. Your help is greatly appreciated. George


Agree Same problem

Re: None Hyperlink to new window problem (George)
Date: 2003, Apr 11
From: Danny Truxaw <truxaw@earthlink.net>


I am having exactly the same problem. hyperlinks that should open new windows in explorer or email cycle and fail.


None ArcIMS@NOAA: The Video Conference

Re: None ESRI ArcIMS (Internet Map Server (Ted Habermann)
Date: 2001, Nov 26
From: Ted Habermann <Ted.Habermann@noaa.gov>


The second NOAA-wide ArcIMS Video Conference will be held between 12:00 noon and 2 PM (EST) on December 7, 2002. The conference will provide a forum for learning about applications of ArcIMS within NOAA. The conference will center around informal presentations by ArcIMS users from a number of groups in NOAA. Information about the conference will be posted inthis discussion thread.

None Presentations

Re: None ArcIMS@NOAA: The Video Conference (Ted Habermann)
Date: 2001, Nov 26
From: Ted Habermann <Ted.Habermann@noaa.gov>


Presentations that will be given during the conference:


None Using ArcIMS to Improve Metadta Quality

Re: None Presentations (Ted Habermann)
Date: 2001, Nov 26
From: Ted Habermann <Ted.Habermann@noaa.gov>


Ted Habermann, Josh Klaus, and Todd Pearce (NESDIS)

We are exploring ArcIMS as a tool for examining and improving spatial metadata for NOAA datasets. Our initial prototype is designed as a tool for metadata managers. We will discuss several potentially interesting steps in our process:
  1. Extracting spatial information from NOAAServer
  2. Ingesting that information into a geospatial database
  3. Using SQL views as layers in ArcIMS

None NOAA Data Shoreline Explorer

Re: None Presentations (Ted Habermann)
Date: 2001, Dec 05
From: Craig Larrimore <Craig.Larrimore@noaa.gov>


NOAA Data Shoreline Explorer
The National Geodetic Survey ArcIMS application
for extracting and displaying U.S Coastal Shoreline
shapefiles.

None NgsMap2

Re: None Presentations (Ted Habermann)
Date: 2001, Dec 05
From: Craig Larrimore <Craig.Larrimore@noaa.gov>


NgsMap2
The National Geodetic Survey's ArcIMS
application for realtime display of
survey control points in the U.S.

Note CSC ArcIMS ActiveX Template Code Base

Re: None Presentations (Ted Habermann)
Date: 2001, Dec 06
From: Ruffin Bailey <Ruffin.Bailey@Noaa.gov>


Although a number of organizations use ArcIMS sites to serve data, many only employ ArcIMS's “out of the box” functionality. A template for ArcIMS applications developed by the National Oceanic and Atmospheric Administration Coastal Services Center provides a standardized, fully featured code base that ArcIMS ActiveX Connector programmers can use to quickly create and customize new ArcIMS sites. The template provides a uniform look and feel for Internet mapping services and allows complex customizations that include integration with ArcObjects and ArcSDE. This presentation highlights the features particular to the Center’s template and methods for easy customizations by other ArcIMS programmers.

Examples of how the template has been used in Center products, including a raster and vector data distribution system, as well as an interactive tutorial for teaching the process of identifying and visualizing coastal hazards and their potential risks, will also be quickly demonstrated.

Everyone is encouraged to download a copy of the associated Powerpoint presentation, found at the following URL: http://astrolabe.csc.noaa.gov/Presentation/template.html


Question How put the mouse coordinates into a TXT file

Re: None ESRI ArcIMS (Internet Map Server (Ted Habermann)
Date: 2001, Dec 09
From: Luis Ladeira <lladeira@yahoo.com>


Hello,

   I need to get the X and Y coordinates of a mouse click into the map, as put them to a TXt file.
   Anyone can help me?

 Thanks
 Luis Ladeira


None ArcIMS Administration

Re: None ESRI ArcIMS (Internet Map Server (Ted Habermann)
Date: 2003, Jan 31
From: Ken Tanaka <Ken.Tanaka@noaa.gov>


Here's a place to discuss ArcIMS administration issues.

One good discussion forum is at ESRI: http://support.esri.com/ choose the ArcIMS link on the left navbar, and then the "Discussion Forum" link on the main page that follows.

There is a new page that covers details of NGDC's administration approach at http://hypernews.ngdc.noaa.gov/HyperNews/get/doc-arcims-admin.html


Feedback Free 3D Viewer - Geospatial Explorer

Re: None GeoSpatial Tools (Ted Habermann)
Date: 2002, May 16
From: Tim <timsmith_s@hotmail.com>


Regarding your post on tools, www.cyze.com/download has a free 3D Viewer. It was based on their initial implementation used by the US EPA FIELDS team.

Geospatial Explorer (Win32 Application)

HTH

TS


Question ArcIMS technical discussion

Date: 2000, Dec 06
From: Tiffany C. Vance <vance@pmel.noaa.gov>

None GeoSpatial Data in the NOAA Line-Offices

Date: 2000, Dec 08
From: Ted Habermann <Ted.Habermann@noaa.gov>


This section of the forum provides information about GeoSpatial activities in NOAA's Line Offices.


None NESDIS

Re: None GeoSpatial Data in the NOAA Line-Offices (Ted Habermann)
Date: 2000, Dec 08
From: Ted Habermann <Ted.Habermann@noaa.gov>


This section of the forum provides information about GeoSpatial activities in NESDIS.


None National Ocean Service

Re: None GeoSpatial Data in the NOAA Line-Offices (Ted Habermann)
Date: 2000, Dec 08
From: Ted Habermann <Ted.Habermann@noaa.gov>


This section of the forum provides information about GeoSpatial activities in the National Ocean Service.


None National Weather Service

Re: None GeoSpatial Data in the NOAA Line-Offices (Ted Habermann)
Date: 2000, Dec 08
From: Ted Habermann <Ted.Habermann@noaa.gov>


This section of the forum provides information about GeoSpatial activities in the National Weather Service.


None Office of Atmospheric Research

Re: None GeoSpatial Data in the NOAA Line-Offices (Ted Habermann)
Date: 2000, Dec 08
From: Ted Habermann <Ted.Habermann@noaa.gov>


This section of the forum provides information about GeoSpatial activities in the Office of Atmospheric Research.


None National Marine Fisheries Service

Re: None GeoSpatial Data in the NOAA Line-Offices (Ted Habermann)
Date: 2000, Dec 08
From: Ted Habermann <Ted.Habermann@noaa.gov>


This section of the forum provides information about GeoSpatial activities in the National Marine Fisheries Service.


None Science means compare and contrast

Date: 2000, Dec 13
From: Ted Habermann <Ted.Habermann@noaa.gov>


Comparing and contrasting pictures is an important tool in the quest for scientific understanding. Many of the systems we looked at lead to a single picture. The Web Image Spreadsheet Tool allows users to interactively create tables of images.


Idea VENTS Seismicity Maps

Re: None Science means compare and contrast (Ted Habermann)
Date: 2000, Dec 13
From: Ted Habermann <Ted.Habermann@noaa.gov>


The VENTS project at PMEL brings together a wide variety of geospatial data relevant to hydrothermal vents on the seafloor. Their site includes a page with a set of thumbnails that can be clicked to see maps of the seismicity of the NE Pacific each quarter. The same gifs can be displayed in a WIST that provides a very flexible user interface that allows comparison of maps for different time periods. Check "Control Panel" and change the display to fit your needs!

None Metadata

Date: 2001, Jan 04
From: Ted Habermann <Ted.Habermann@noaa.gov>


High quality Metadata is an important part of an data system. Use this section of the forum for discussing Metadata issues.


Idea NGDC Metadata Workshop Feb. 7-9, 2001

Re: None Metadata (Ted Habermann)
Date: 2001, Jan 08
From: Ted Habermann <Ted.Habermann@noaa.gov>


At the GeoSpatial / Metadata workshop in Silver Spring during December representatives of all NOAA Line Offices agreed that existing NOAA metadata can be improved in many ways. It was also agreed that increased communication within the NOAA metadata community would be an important step in the process of improving metadata management and quality. NGDC will host a metadata workshop February 7-9, 2001 as a step toward increasing that communication. The workshop is designed for people who are actively working with NOAA metadata and metadata management tools.

The first day of the workshop will feature detailed discussion of NOAA metadata quality and management. This discussion might include topics like: 1. Application of the FGDC Metadata Content Standard to NOAA data, i.e. what information goes in which sections of the FGCD, NOAA Supplemental Fields. 2. The process of updating NOAA metadata in NOAAServer: existing process and potential for automation. 3. The NOAAServer interface, simple vs. advanced searches, hierarchical theme keywords. 4. Other topics that might emerge from this group prior to the workshop. Please use the web-based discussion group at http://hypernews.ngdc.noaa.gov/HyperNews/get/geospatial/6/1.html to contribute topics or comments on existing topics.

The second day of the workshop will begin with a focus on metadata management tools. The Data Centers are using COTS management tools developed by Blue Angel Technologies (http://www.blueangeltech.com). These tools are broad enough to address metadata management problems throughout NOAA and flexible enough to apply to NOAA data management needs in many other areas. Technical representatives from Blue Angel will introduce these tools on the morning of the second day and describe user case-studies that demonstrate several different applications of the tools. Specific questions that you might like Blue Angel to address can be posted at http://hypernews.ngdc.noaa.gov/HyperNews/get/geospatial/6/1.html.

The afternoon of the second day offers several possibilities: more general discussion of specific NOAA Metadata problems, or more technical discussion of the Blue Angel tools. Either of these topics could be addressed in a plenary session or breakouts could support both topics.

The third day is optional and will focus on specific technical aspects of using the Blue Angel tools. This day is designed as an advanced technical support day for NGDC staff that are working with these tools. We will cover installation and configuration of the tools, advanced aspects of data entry page design, display of metadata using XSL stylesheets and applications of the Blue Angel Software Development Kit (SDK). This SDK will support populating metadatabases directly from data processing systems.

This message is being sent to potential metadata contacts throughout NOAA as a way to identify people that might be interested in attending the workshop. Please share this announcement with others that might be interested in attending and let me know if you plan to attend so that I can plan accordingly!

-- Ted Habermann Information Architect NOAA, National Geophysical Data Center V: 303.497.6472 F: 303.497.6513 Ted.Habermann@noaa.gov


None Discussion Topics: NOAA Metadata

Re: Idea NGDC Metadata Workshop Feb. 7-9, 2001 (Ted Habermann)
Date: 2001, Jan 08
From: Ted Habermann <Ted.Habermann@noaa.gov>


Use this section of the forum to contribute discussion topics or to comment on existing topics.


None Ideas for integrating metadata and data access

Re: None Discussion Topics: NOAA Metadata (Ted Habermann)
Date: 2001, Jan 24
From: Ted Habermann <Ted.Habermann@noaa.gov>


At the GeoSpatial/Metadata Workshop I presented several ideas for integrating metadata and data access systems in order to improve the effectiveness of NOAA's metadata. The ideas were Spatial Surrogates, Hierarchical Keywords, Spatially Enable Metadata, Lineage Tracking, Attribute Ranges / Inventory. Since the workshop I have added Keywords to <meta> tags to the list. Full resolution gifs from my talk are available at http://www.ngdc.noaa.gov/seg/talks/GSDWorkshop/habermann-2. Smaller versions are reproduced in this section of the forum. Feedback on these ideas would be great and identification of partners in implementing pilot projects would be incredible.


None Spatial Surrogates

Re: None Ideas for integrating metadata and data access (Ted Habermann)
Date: 2001, Jan 24
From: Ted Habermann <Ted.Habermann@noaa.gov>


The Idea:

The Implementation:


None Hierarchical Keywords

Re: None Ideas for integrating metadata and data access (Ted Habermann)
Date: 2001, Jan 24
From: Ted Habermann <Ted.Habermann@noaa.gov>


The Idea:

The Implementation:


None Keywords to <meta> tags

Re: None Ideas for integrating metadata and data access (Ted Habermann)
Date: 2001, Jan 24
From: Ted Habermann <Ted.Habermann@noaa.gov>


The Idea:

The Implementation:


None Spatially Enable Metadata

Re: None Ideas for integrating metadata and data access (Ted Habermann)
Date: 2001, Jan 24
From: Ted Habermann <Ted.Habermann@noaa.gov>


The Idea:

The Implementation:


None Lineage Tracking

Re: None Ideas for integrating metadata and data access (Ted Habermann)
Date: 2001, Jan 24
From: Ted Habermann <Ted.Habermann@noaa.gov>


The Idea:

The Implementation:


None Attribute Ranges / Inventory

Re: None Ideas for integrating metadata and data access (Ted Habermann)
Date: 2001, Jan 24
From: Ted Habermann <Ted.Habermann@noaa.gov>


The Idea:

The Implementation:


None Metadata Management Tools - Web Interfaces

Re: None Discussion Topics: NOAA Metadata (Ted Habermann)
Date: 2001, Jan 25
From: Ted.Habermann


There are many metadata management tools available from many sources that might be helpful for NOAA Metadata Managers. This section of the forum is the place to share information about those tools.


None FGDC Metadata Tools Page

Re: None Metadata Management Tools - Web Interfaces
Date: 2001, Jan 25
From: Ted Habermann <Ted.Habermann@noaa.gov>


The FGDC Metadata Tools page is at http://www.fgdc.gov/metadata/toollist/metatool.html


None Web-based metadata entry tool from CCRS

Re: None Metadata Management Tools - Web Interfaces
Date: 2001, Jan 30
From: Ted Habermann <Ted.Habermann@noaa.gov>


The Canadian Center for Remote Sensing (CCRS) web-based metadata entry tool.


None Review by Andrew Rushin (NOS Metadata Specialist)

Re: None Web-based metadata entry tool from CCRS (Ted Habermann)
Date: 2001, Jan 30
From: Ted Habermann <Ted.Habermann@noaa.gov>


Andrew's review is available at http://meridian.ngdc.noaa.gov/intranet/Metadata/webBasedToolReview.htm


Agree We need versitile metadata management foundations

Re: None Review by Andrew Rushin (NOS Metadata Specialist) (Ted Habermann)
Date: 2001, Jan 31
From: Ted Habermann <Ted.Habermann@noaa.gov>


Andrew makes some great points that. I particularly support his idea that a single web-based tool is not going to satisfy all of our needs. More details are available at: http://meridian.ngdc.noaa.gov/intranet/Metadata/accesspaths.html


None webtool discussion

Re: None Web-based metadata entry tool from CCRS (Ted Habermann)
Date: 2001, Feb 01
From: Andrew Rushin <Andrew.Rushin@noaa.gov>


Dear Andrew,

The issues you raise are quite familiar to me. I developed a metadata standard before FGDC for an integrated global database (http://www.ngdc.noaa.gov/seg/fliers/se-2006.shtml). If you look at that, you will see that my metadata concept fits your second purpose - to thoroughly document the dataset. Also, because of the importance of metadata for (a) operational software, such as GIS; and (b) scientific documentation, I incorporated the metadata into the product in a fully integrated way. In fact, the on-line interface (follow the links) requires the user to go THROUGH the metadata to access files for download, and some of the metadata actually resides in operational GIS header files to fulfill an operability requirement (which provides quality assurance). Hence, users obtain data from within the frame of reference (context) of the documentation and integration concept, which is important (or critical) to understanding its use. The datasets as a whole are thus packaged with the metadata record for the dataset, including all lower-level documentation in appropriate system files. The idea is to ensure that they are never separate.

Enter FGDC. We now have the concept of SEPARATING data from metadata for search purposes; a bad idea from the very beginning. I got a $40k grant from FGDC to explore the problem of optimal storage taking into account built-in hierarchies (integrated data products), such that one can PRODUCE (not store) FGDC records from a more optimal documentation structure. The problem to be solved, that FGDC did not even consider, is that metadata for related products have tremendous overlap and are inseparable from data for maintenance and archive purposes. The approach I explored would resolve those overlaps for a given integrated product and dynamically produce FGDC records on demand (at the level of interest). This approach is needed in complex databases because there literally could be thousands of FGDC records depending on the level at which the report is generated; however it cannot be left to an external system to accomplish because it needs to be part of the archive data product. The simplest solution is to generate the thousands of flat FGDC files and store them with the product (disk space is cheap and they're not really that big). But still, one needs a system to generate them in the first place, not through hand entry but capturing already coded information in system files.

That strongly reinforces the issues you mentioned, that search and documentation are different things. Also, search does not require a full record (except in someone's Orwellian nightmere). That being the case, and given archival requirements for data and metadata (together) it only makes sense that the product metadata, maintained by the scientist or data specialist, should be the primary authority. That means that updates and corrections must propagate from the product to the search system, not the other way around.

Now, the Blue Angel approach is still organized along the concept of individual FGDC flat records for an "FGDC data thing" (FDT). There are no relationships encoded between FDT's, i.e., no way to capture the hierarchies I mentioned above. The metadata are not stored as flat files, but in a different structure that allows for repeat information and lookup fields. This is designed to ease construction of a metadata record de novo. Ted is working on a capability to read in a flat file so it doesn't all have to be hand keyed. But there is no way the Blue Angel system can deal with the fundamental problem of hierarchical relationships in related datasets (or within datasets with multiple layers). The entity-attribute repeat entries were an attempt to capture the detailed sub-hierarchies, but there are too many built-in assumptions about how these are related to the overall record for it to work generally.

My conclusion is that there must be two systems. There is the system the data producer/manager uses to develop data products and accompanying metadata (automated or not), and there is a separate clearinghouse search system. The first must be the primary authority for information and it must feed reports to the clearinghouse by whatever means works. Naturally, an automated connection is desired. Hence I am interested in building stand-alone data products that can produce FGDC records on demand (or have them prepared in advance by whatever system is used to create and edit them, and stored on the archive product). In that scenario, not all the FGDC information need be accessed for search purposes, or it could be delivered at different levels of detail as needed. In my more cynical moments, I suggest that all we really need at the national search level is a MARC record format, produced from archive data/metadata products. In other words, the FGDC approach has seriously confused these two purposes and produced a standard that is good for documentation but not for distributed search, while building a distributed clearinghouse system that really demands a simpler search record.

All the best.

John Kineman

Andrew Rushin wrote:

> 
> Attached is a review of the web-based metadata entry tool from CCRS.  I found it to be a very nifty idea that if
> properly executed, could solve some problems.  However, the FGDC standard is complicated; and I have not yet seen a
> web-based tool that adequately handles that complexity.  I have not been able to access Blue Angel's metadata entry
> tool.  (Ted Habermann is working on a firewall issue.)  I am interested to see how they have decided to approach it.
> If you have any comments, please send them my way!
> 


None Managing Metadata in HTML

Re: None Discussion Topics: NOAA Metadata (Ted Habermann)
Date: 2001, Jan 27
From: Ted Habermann <Ted.Habermann@noaa.gov>


HTML and associated tools like javascript, cascading style shttes, and extensible stylesheet language bring us unprecedented capabilities to display metadata in informative and accessible ways. These capabilities also come with some new challenges that are specifically related to limitations of these approaches.


Idea Newlines

Re: None Managing Metadata in HTML (Ted Habermann)
Date: 2001, Jan 27
From: Ted Habermann <Ted.Habermann@noaa.gov>


Newline characters do not exist in HTML text. They are represented by <br> tags or associated with other tags (H1, H2,..., P, LI). Blocks of text that include newline characters will, therefore, have the words at the end of the lines crunched together with those at the beginning of the next line. The last line will look like "of thenext line".

This also effects things like addresses in metadata. They must be comma separated rather than appearing on multiple lines.

Of course, newlines included in preformatted sections (<pre>....</pre>) will be displayed, but this eliminates the capability to take advantage of HTML formatting within those sections. Usually this is not the desired look.


None Managing Metadata in Relational Databases

Re: None Discussion Topics: NOAA Metadata (Ted Habermann)
Date: 2001, Jan 28
From: Ted Habermann <Ted.Habermann@noaa.gov>


Relational database systems are powerful tools for managing data of many kinds. The client-server architecture supported by those systems is particularly useful for groups managing data collections using web interfaces. Aspects of metadata management in RDBMS can be discussed here.


Idea Metadatabase Design

Re: None Managing Metadata in Relational Databases (Ted Habermann)
Date: 2001, Feb 01
From: Ted Habermann <Ted.Habermann@noaa.gov>


The design of the database for holding metadata is very different from the design that you might imagine or that you might create with only a small amount of database experience. It took me quite awhile to figure it out, but, once you do, it is incredibly simple and powerful. It is what I call the Attribute / Value design. One table holds definitions of all of the attributes that can exist. In the FGDC case these definitions include whether or not the attribute can be repeated and some other stuff. Another table holds the values of those attributes. A simple example:

Attribute Table:

IDName
1Title
2Author
3Publication Date

Value Table:

Record IDAttribute IDValue
11Why Metadata
12Andrew Rushin
132000
21How Metadata
22Ted Habermann
232000

In this case we are using an attribute value approach for a book database. It contains the titles, authors, and publication dates for the two classic works on metadata. The titles are identified in the value table as rows that have Attribute ID = 1. The authors have Attribute ID = 2. If we want all of the fields for your book, we select rows from the value table where Record ID is 1. If a book has two authors, you just add another row to the value table for that record.

What is confusing about this is that each "record" is actually spread out over many records in the value table, one for each attribute. What is cool about it is that I can add any number of attributes without changing the database design and there are no empty fields for attributes that some records do not have. Actually there are a bunch of cool things in addition to this. One of them is that Blue Angel can use this simple design for almost any sort of data that you can imagine in addition to metadata. This is what makes Blue Angel such a powerful tool for us to get to know.

I can explain this more if you are interested. An example of a simple implementation for software documentation is available.


None Discussion Topics: Questions for Blue Angel

Re: Idea NGDC Metadata Workshop Feb. 7-9, 2001 (Ted Habermann)
Date: 2001, Jan 08
From: Ted Habermann <Ted.Habermann@noaa.gov>


Use this section to post questions about metadata management tools to be addressed by technical representatives from Blue Angel Technologies (or others).


Question BAT support for the Biological Data Profile

Re: None Discussion Topics: Questions for Blue Angel (Ted Habermann)
Date: 2001, Feb 02
From: Donald Collins <Donald.Collins@noaa.gov>


Does the BAT database (is it still called 'Repository'?) support the FGDC Biological Data Profile? The BDP is an FGDC-approved profile that includes several elements specifically related to biological data that have a geospatial component. More information about the BDP is available at http://www.nbii.gov/datainfo/metadata/standards/index.html

NODC and other NOAA components have a growing number of biological data sets being described using the National Biological Information Infrastructure [NBII] metadata creation tool 'metamaker', which supports a version of the BDP. We want to include all of the BDP extensions in one of our record sets, preferably without going through the hassle of redefining the template to accommodate this standard profile. Is this profile already created in the database?


Question BAT support for multiple theme (and other) keyword thesauri

Re: None Discussion Topics: Questions for Blue Angel (Ted Habermann)
Date: 2001, Feb 02
From: Donald Collins <Donald.Collins@noaa.gov>


In the MS Access version of Repository, I can identify multiple keyword thesauri, but it is not clear how to make a link to each thesaurus as a picklist of choices. For example, I made an xml file with 'nodc sea area names' to use as place keywords. I also want to use the somewhat different GCMD Place keyword list as a second choice of thesaurus for keywords. I can manually identify and type in each thesaurus, but I don't know how to make this a repeatable 'two-tiered' selection: first tier: choose a thesaurus from one or more thesauri; second tier: choose one or more terms from the selected thesaurus; repeat as needed.

A more realistic example of this requirement: NODC is developing a keyword dictionary from which a thesaurus will be derived. We want one 'theme keyword thesaurus' to be the NODC list. The NOAA Central Library uses the Library of Congress Subject Headings as their authoritative 'theme keyword thesaurus' so a second choice is this list. NGDC has advocated use of the GCMD Keyword lists, which represent a third keyword thesaurus. Many individual data collection projects have their own keyword lists.

To be most useful to different customer groups, the data describer may decide to use more than one of these lists. Does the oracle version of 'Repository' provide this capability?


Question BAT support for multiple record sets for a single data center in Oracle version

Re: None Discussion Topics: Questions for Blue Angel (Ted Habermann)
Date: 2001, Feb 04
From: Donald Collins <Donald.Collins@noaa.gov>


In the MS Access version of Repository, I have multiple record sets (standard products, non-standard products, nndcserver products, etc.). Will NODC and the other data centers be able to maintain multiple record sets of our own data in the Oracle version of Repository?


None Participants

Re: Idea NGDC Metadata Workshop Feb. 7-9, 2001 (Ted Habermann)
Date: 2001, Jan 26
From: Ted Habermann <Ted.Habermann@noaa.gov>


The present list of participants for the meeting is available at http://lithophyte.ngdc.noaa.gov/~haber/Participants.htm


None Agenda

Re: Idea NGDC Metadata Workshop Feb. 7-9, 2001 (Ted Habermann)
Date: 2001, Jan 28
From: Ted Habermann <Ted.Habermann@noaa.gov>


No hidden agenda's here. This meeting has two sections and potentially two tracks. Wednesday is a day for NOAA Metadata Specialists to discuss the present NOAA Metadata Management System and the future of that system. Topics for discussion can be entered into the Discussion Topics section of this forum. This discussion can continue on Thursday afternoon if need be.

Our colleagues from Blue Angel have put together a plan for the technical track of the meeting that starts on Thursday morning. This plan is designed for people interested in the more technical aspects of the Blue Angel Tools. It includes an overview and introductory segments that will allow those people to come up to speed quickly. That plan is presented in this section. Questions for Blue Angel can be posted above.


None Thursday Morning

Re: None Agenda (Ted Habermann)
Date: 2001, Jan 28
From: Ted Habermann <Ted.Habermann@noaa.gov>


  • Blue Angel Introduction: This presentation provides a brief introduction to Blue Angel Technologies, including Blue Angel's background, customer base, vision statement, and future directions.
  • MetaStar Case Studies: The Case Studies presentation provides an in-depth look at some existing Blue Angel customers and their application of the MetaStar tool suite.
  • MetaStar Overview: The MetaStar Overview presentation describes the process steps that are encountered in information management (i.e., capture, organize, access, discover and use) and provides an overview of how the Blue Angel MetaStar product suite relates to it. The overview includes a high-level description of each tool, and shows how each tool addresses the various steps in the information management process. This overview is intended to provide a high-level framework on which the remaining training sessions are based.

None Thursday Afternoon

Re: None Agenda (Ted Habermann)
Date: 2001, Jan 28
From: Ted Habermann <Ted.Habermann@noaa.gov>


  • MetaStar Repository: This tutorial introduces the MetaStar Repository for information management. The tutorial begins by introducing concepts that are central to the Repository, including metadata templates, record sets, elements, repeatability, and element hierarchy. Next, the tutorial instructs users on the core functionality provided by the MetaStar Repository, and provides hands-on training exercises. The topics that are covered include:
  • Building a metadata template
  • Creating and maintaining lists of controlled terms (dictionaries)
  • Importing, entering, and maintaining records
  • Exporting records to the MetaStar server and to files in XML format
  • MetaStar Data Entry: This tutorial provides an overview to the architecture of the Data Entry system, and how it operates in conjunction with the MetaStar Repository, Server, and Gateway. It describes the data entry operations available to Web users, and how records are managed through the workflow process. Next, the tutorial covers how to install, configure, and customize MetaStar Data Entry. The tutorial provides the system administrator with all the necessary information for configuring the Data Entry system. Additional special topics to be discussed include: record validation, and customizing the data entry (insert and update) of FGDC records over multiple web pages.

None Friday

Re: None Agenda (Ted Habermann)
Date: 2001, Jan 28
From: Ted Habermann <Ted.Habermann@noaa.gov>


  • Web Browse Tree Generation: This tutorial explains how to use the MetaStar Repository to generate a Web Browse Tree. This tutorial introduces the concept of the Web Browse Tree for providing users with the ability to browse a customized HTML display of Repository records, and provides hands-on training exercises. The topics covered include:
  • Selecting and using a navigational record element.
  • Designing navigational and data templates.
  • Constructing a Web Browse Tree using the Repository.
  • MetaStar Data Entry Software Development Kit (SDK): This tutorial section provides an informal introduction to the MetaStar Data Entry SDK. An example program using the SDK to perform record inserts, updates, and deletes is also described. Topics of special interest include how to update specific fields of an existing record.
  • Special Topics: Additional topics that are of interest to attendees will also be addressed. Suggested topics include:
  • MetaStar usage of XML as an interchange format.
  • Use of XSL (XML style sheets) in MetaStar.
  • Additional functionality needed by the NOAA community (such as identifying changed fields in records).
  • Other MetaStar tools (MetaStar Server, Gateway, Harvester, etc.).

None Proposed Agenda for Wednesday

Re: None Agenda (Ted Habermann)
Date: 2001, Feb 06
From: Ted Habermann <Ted.Habermann@noaa.gov>


Possible time slots for discussion


None 8:30 - 8:45 Welcome / Logistics

Re: None Proposed Agenda for Wednesday (Ted Habermann)
Date: 2001, Feb 06
From: Ted Habermann <Ted.Habermann@noaa.gov>


We will discuss logistics and welcome participants to the workshop!


None 8:45 - 10:00 FGDC Metadata Content Standard -What is it and how do/can we use it?

Re: None Proposed Agenda for Wednesday (Ted Habermann)
Date: 2001, Feb 06
From: Ted Habermann <Ted.Habermann@noaa.gov>


The FGDC provides a broad content standard for metadata that cannot be applied to specific types of data without some interpretation. Different groups in NOAA have interpreted some sections in slightly different ways. These differences, while minor, cause difficulties in managing and accessing the metadata. If we can agree on those interpretations it will simplify the metadata management task and enable us to take advantage of system developments across NOAA.

The FGDC includes some sections that may support powerful capabilities that we are not presently taking advantage of. These include spatial keywords, lineage tracking, attribute definitions and ranges, and others.


None 10:15 - 11:00 FGDC Metadata Content Standard -Why we can't use it.

Re: None Proposed Agenda for Wednesday (Ted Habermann)
Date: 2001, Feb 06
From: Ted Habermann <Ted.Habermann@noaa.gov>


One of the most common conclusions reached about the FGDC content standard is that it doesn't fit my data (despite the fact that it is so broad). This conclusion is the jumping off point from which the development of stovepipe metadata systems is justified. It is important that we understand aspects of NOAA data that are not addressed by FGDC. Are these common across many groups in NOAA?


None 11:00 - 12:00 Metadata System Requirements - What do we need this system to do?

Re: None Proposed Agenda for Wednesday (Ted Habermann)
Date: 2001, Feb 06
From: Ted Habermann <Ted.Habermann@noaa.gov>


If we lived in a perfect world what would the NOAA metadata management infrastructure look like and do? Do we need such an infrastructure? Would it consist of a myriad of specialized systems? Would it be centralized? Would it be made up of nodes? How would the system be searched? Would it connect to the NSDI? Would it be GeoSpatial? Who would operate the system? Who would manage the metadata content? What would Napster look like if it were a metadata system? Who pays for the system?


None 1:00 - 2:00 NOAAServer - Under the hood

Re: None Proposed Agenda for Wednesday (Ted Habermann)
Date: 2001, Feb 06
From: Ted Habermann <Ted.Habermann@noaa.gov>


NOAAServer provides a metadata search mechanism that is presently used by a number of NOAA groups. How does the present system work at the metadata production nodes and at the hub? How is the content transferred to NOAAServer? What does it look like when it is transferred? What happens when it gets there? How is it indexed? How is the index searched?


None 2:00 - 3:00 NOAAServer - Interfaces

Re: None Proposed Agenda for Wednesday (Ted Habermann)
Date: 2001, Feb 06
From: Ted Habermann <Ted.Habermann@noaa.gov>


The present interface to NOAAServer was initially developed several years ago. It provides keyword, spatial extent, and temporal extent search interfaces. Other interfaces might be useful and might extend the metadata search capability in new ways. Options might include direct URL interfaces, keyword hierarchies, spatial hierarchies, ….


None 3:15 - 4:00 Metadata Management / Discovery Alternatives

Re: None Proposed Agenda for Wednesday (Ted Habermann)
Date: 2001, Feb 06
From: Ted Habermann <Ted.Habermann@noaa.gov>


There are many alternative approaches to managing metadata and to using metadata in the data discovery process. As the amount of metadata increases our metadata management / discovery systems may need to evolve. What are present systems and alternative systems? What are the advantages and disadvantages of these alternatives? Do we need NOAAServer? GCMD Portals? FGDC Clearinghouse Nodes? How do metadata and HTML searches compare?


None 4:00 - 5:00 Conclusions / Recommendations

Re: None Proposed Agenda for Wednesday (Ted Habermann)
Date: 2001, Feb 06
From: Ted Habermann <Ted.Habermann@noaa.gov>


What have we learned today? Are there topics that we will continue to discuss over the next two days? Are there conclusions or recommendations that we can make? Who do we make them to?


None Meeting Report

Re: Idea NGDC Metadata Workshop Feb. 7-9, 2001 (Ted Habermann)
Date: 2001, Feb 13
From: Ted Habermann <Ted.Habermann@noaa.gov>


The Metadata Workshop in Boulder brought together a diverse collection of people from throughout NOAA with very different metadata experience and needs. This section summarizes some of the interchanges.


None What we like and dislike about metadata

Re: None Meeting Report (Ted Habermann)
Date: 2001, Feb 13
From: Ted Habermann <Ted.Habermann@noaa.gov>


We started the meeting with all participants describing what they liked and disliked about metadata. A few of the thoughts:

What I like about Metadata
  • The FGDC Metadata Content Standard is broad enough that you can make it do anything
  • Metadata helps people find data
  • Metadata eases the process of distributing data
  • Metadata makes it possible to search, discover, distribute, display and organize data
  • Standards help documentation
  • Metadata enables data sharing
  • Metadata helps classify things
  • Metadata makes it possible to bring disparate datasets together
What I dislike about Metadata
  • Standard is Complex
  • Difficult to maintain and amount of metadata increasing
  • More metadata means more work
  • Forcing people to use standards
  • Metadata is a chore
  • Human factors make metadata difficult
  • Management is cumbersome
  • Too much editing of data to fix errors in metadata
  • Management of increasing amount of changing metadata is difficult
  • Hard to maintain and update
  • Hard to learn

None What is Metadata

Re: None Meeting Report (Ted Habermann)
Date: 2001, Feb 13
From: Ted Habermann <Ted.Habermann@noaa.gov>


Anne Ball suggested that we agree on what metadata is before we discuss it further. Some suggestions:
  • Part of your data - Good Science
  • Any description of your data and what it means
  • If your data is a table, the column headings are metadata
  • Methods used to collect and process the data
  • Many levels of detail:
  • Directory Level (NOAAServer)
  • More detailed inventory level information
  • Metadata required to actually use the data
  • Where is the data located and who documented it
  • Metadata must include standard elements

Date: 2001, Sep 19
From: <Anonymous>



Question Shape File of Power Plants?

Date: 2001, Dec 21
From: Donna McNamara <donna.mcnamara@noaa.gov>


I'm looking for a source for US power plant locations in shape file format. Would like to use it to filter hot spots detected on satellite data for our wildfire program. Anyone know of a source?

Thanks in advance!


None NGDC Geospatial Data Services Group Minutes

Date: 2002, Apr 02
From: Ted Habermann <Ted.Habermann@noaa.gov>


The NGDC Geospatial Data Services Group meets occasionally to discuss their activities. This is where minutes of those meetings are kept.


More April 3, 2002

Re: None NGDC Geospatial Data Services Group Minutes (Ted Habermann)
Date: 2002, Apr 02
From: Ted Habermann <Ted.Habermann@noaa.gov>


Topics discussed during the April 3, 2002 meeting go here.


Question Plans / Templates

Re: More April 3, 2002 (Ted Habermann)
Date: 2002, Apr 02
From: Ted Habermann <Ted.Habermann@noaa.gov>


I have been trying to improve my understnding and implementation of project management as part of my work on CLASS. Chas Schirmer (who works with Eric) has made a rather strong recommendation for the ideas presented by Steve McConnell's book "Software Project Survival Guide". We have a copy of this book that is available for the group. The website for this book is at http://www.construx.com (click on the survival guide website link).

That site includes templates for a number of plans. I am experimenting those templates to see if they might help this group understand what we are doing. Examples of a project plan and an architecture plan are in the DDSS directory on our intranet (http://meridian.ngdc.noaa.gov/intranet/Geospatial/DDSS/).

What do we need to add/subtract from these templates to make them useful?


None CVS Client Overview

Re: More April 3, 2002 (Ted Habermann)
Date: 2002, Apr 03
From: Travis Stevens <Travis.Stevens@noaa.gov>


Setup:

To use CVS, you need an account on cave.ngdc.noaa.gov (contact linux-admin@rt.ngdc.noaa.gov) and you need to belong to the group nndccvs.

You need software to run CVS.  The command line cvs tool is part of the linux distribution, however there are more convenient guid clients.  For linux there is cervisia located at http://cervisia.sourceforge.net

For windows and mac you can use something from the cvs gui project: http://cvsgui.sourceforge.net/

tortois also looks interesting: http://www.tortoisecvs.org/


once you have the above set up you will need no know the cvsroot.  In our case the cvsroot is ":pserver:cave-username@cave.ngdc.noaa.gov:/cvs/projects/nndc"
This means we are using cvs's password server, as the user the machine cave.ngdc.noaa.gov and the project home directory is /cvs/project/nndc

here are some links for tutorials and such:

Miros page I think you should read the basic concepts page.

a nice tutorial from me....(using command line cvs)
first one must login if your cvshome is set, all should be fine here.  

>cvs login

now we will create a place on the local machine to put cvs files
>mkdir CVS
>chdir CVS

now to check something out
>cvs checkout tutorial/files

notice how this creates the entire directroy structure.
now change to the directroy tutorial/files and edit the users.txt file to include your name and save the file
now check it back in
>cvs commit

now the file on cave is up to date...
if you are done and do not need the files anymore then i recommend releasing the files

change back to the CVS directory
>cvs release -d tutorial

it says you have 0 files changed (which is good because your file was updated).

that is a sample session...

Now I will tell you how to import your files on cvs.  first use the guidelines page to determine the proper directory structure on cvs.  This is important because it is a pain to change once created.  Then change to the directory that you have files and/or directories in you want to import.  Now type the command 
>cvs import -m "some cvs log message" module/directory      ngdc start

your files are now in cvs.

For a better tutorial and documentation go to cvs home documentation.

dont forget to read the cvs guidelines page, this is not a final document or anything, it needs comments and questions and such guidelines doc



Feedback meeting notes 4-3-2002 on Gravity

Re: More April 3, 2002 (Ted Habermann)
Date: 2002, Apr 03
From: Patrick Hayes <Patrick.J.Hayes@noaa.gov>


Gravity project progress
  • Converted gravity from mysql to oracle using the tool mysql2oracle
  • Put in FGDC_ID in the Data_info table
  • run sde on all files using Arc Catalog
  • Create ArcIMS site for the Gravity datasets
  • test kris code to automatically update metadata files
  • News Spatial Snapshots

    Re: None NGDC Geospatial Data Services Group Minutes (Ted Habermann)
    Date: 2002, Apr 03
    From: Dan Kowal <dan.kowal@noaa.gov>


    Goal: To create snapshots of GLOBE (School) data as once done by Ken Tanaka and spatially-enable them using Mark's dbms->sde program.

    Highlights: Tom Gaines and I will work with Ken Tanaka's old sde_school.sql procedures to do: 1)Create a database link from nndc to fsl's gdbd production machine; 2)Create a materialized view (snapshot) of GLOBE observation data--with special interest to grab "firstReport, lastReport" data inorder to create the timeline histograms for fyp. 3)Have this view refresh once/week. 4)Develop a trigger and/or Oracle Job that will take the snapshot and spatially enable it using Mark's dbms->sde. The aim is to execute this process in Oracle without having to use a cronjob to run a shell script.


    None April 9, 2002

    Re: None NGDC Geospatial Data Services Group Minutes (Ted Habermann)
    Date: 2002, Apr 11
    From: <ted.habermann@noaa.gov>


    The regular time for these meetings has been moved to 9:00 AM on Tuesdays. At this meeting Ted discussed application of the plans that he has been working on for CLASS to projects in this group. He showed examples of a project plan (http://meridian.ngdc.noaa.gov/intranet/Geospatial/DDSS/Data%20Discovery%20Support%20System%20Project%20Plan.htm) and an architecture plan (http://meridian.ngdc.noaa.gov/intranet/Geospatial/DDSS/Data%20Discovery%20Support%20System%20Architecture.htm)

    Ted also discussed a propose task list for NGDC in the CLASS project.


    None June 11, 2002

    Re: None NGDC Geospatial Data Services Group Minutes (Ted Habermann)
    Date: 2002, Jun 19
    From: James Barkley <james.barkley@colorado.edu>


    Meeting Minutes



    Geospatial Data Group weekly meeting on June 11, 2002



    Attendee List: John Cartwright, Mark Ohrenschall, Dan Kowal, Thomas Gaines, Kris Nuttycombe, Josh Klaus, Travis Stevens, Ted Habermann, James Barkley, Karen Horan

    Meeting Location: WADI room (1B307)

    Meeting time: 3:00 - 3:40

    Minutes recorded by: James Barkley

    None minute items

    Re: None June 11, 2002 (James Barkley)
    Date: 2002, Jun 19
    From: James Barkley <james.barkley@colorado.edu>


    1. Karen talked about Metadata standards in the gridded data sets she was working on loading. This opened up some discussion about how to make people care about metadata.

    2. Jimmy talked about the WIST tool which is currently being revamped by Herbert and Jimmy. Their goal is to have the WIST configuration files in an XML structure and have the processing in java.

    3. Seven copies of "The Elements of Java Style" have been purchased for the group in order to increase coding standards in accordance with the FSA results.

    4. There was some talk about eliminating the test layer of the IDB.

    5. Josh has put a hazards viewer with shape files on NVDS.


    Note June 18, 2002

    Re: None NGDC Geospatial Data Services Group Minutes (Ted Habermann)
    Date: 2002, Jun 26
    From: James Barkley <james.barkley@colorado.edu>


    Meeting minutes for June 11, 2002 Geospatial Data Group weekly meeting

    Attendee list: John Cartwright, Mark Ohrenschall, Dan Kowal, Thomas Gaines, Kris Nuttycombe, Josh Klaus, Travis Stevens, Ted Habermann, James Barkley, Karen Horan.

    Meeting location: WADI room (1B307)

    Meeting time: 9:05 - 10:15

    Minutes record by: James Barkley

    There was some discussion about improving the OSEI fire hazard layer. It was suggested that they be changed to circles but it was decided that this would confuse the users since hurricane events are also circles. It was decided that they will stay as rectangles but will increase in size.

    We received a copy of NNVL's MySQL database, from which Ted extracted 1112 lat/lon items. There was some discussion about having interns get images from the NNVL database.

    There was a lot of discussion on the Satellite Metadata Characterization Project. Ted gave a top-down explanation of the project which prompted a number of important questions. Jimmy has crated an XML characterization of the level 1b file headers and is working on getting it into Blue Angel. Kris has created a schema as a Blue Angel Template for describing our comprehensive metadata model. There are potential issues with the namespace element. Tom has been working on characterizing the metadata from the DMSP database. Kris has reviewed FGDC's remote sensing extensions in order to see how well our metadata model fits with FGDC's.

    Minutes from last meeting were approved.

    Tom is working to automate the process of spatially enabling layers; if he is successful this will yield a large windfall.

    Progress is being made with the hurricane tracking as far as getting geotiffs and putting them into map services.

    There was some discussion about group communication. Ted lended some instruction on presenting and explaining to others.


    Note June 25, 2002

    Re: None NGDC Geospatial Data Services Group Minutes (Ted Habermann)
    Date: 2002, Jul 08
    From: James Barkley <james.barkley@colorado.edu>


    Meeting minutes for June 25, 2002 Geospatial Data Group weekly meeting

    --------------------------------------------------------------

    Attendee list: John Cartwright, Mark Ohrenschall, Dan Kowal, Thomas Gaines, Kris Nuttycombe, Josh Klaus, Travis Stevens, James Barkley

    Absentee list: Ted Habermann, Karen Horan.

    Meeting location: WADI room (1B307)

    Meeting time: 11:00 - 11:50

    Minutes record by: James Barkley

    --------------------------------------------------------------

    FYP

    ---

    FYP was discussed. Kris has rewritten hierarchy server code in JSP. This has improved code readability and also yielded a significant efficiency gain. The oracle statistics are setup for FYP. However, there are data integrety issues with FYP as well as interest to get more up to date data. There has been some criticism from Paleo about the reliability of the data.

    AUTO-SPATIAL ENABLE (GLOBE, NNVL, OSEI)

    -----------------------------------

    One of Marc's programs is the best candidate for using to auto-spatially enable data. Tom and Marc are going to design a model for the spatially enabling system. Tom will modify some daemons that will fit into this model.

    NNVL -> FGDC

    -----------

    Josh took 600 of the 1000 or so images from NNVL and produced them as a layer on the map server. They can be seen displayed at http://map.ngdc.noaa.gov/website/stp/hurricanes/ (they are the yellow dots).

    COLLECTION MAP SERVICES

    ----------------------

    This would be a capability foundation for a wide variety (all?) map services. The biggest problem is pulling spatial data from Blue Angel.

    SATELLITE METADATA CHARACTERIZATION PROJECT

    ------------------------------------------

    Ted, Jimmy, and Kris decided to use a relational database to implement the metadata crosswalk model. This will increase search capabilities. An Oracle database has been created on cheetah for this project, and all of the SAA information has been loaded into it. The 1b file header information should be in the database soon, too. Jimmy and Kris are collaborating to develop a web interface for the database.

    GRIDDED METADATA MODEL

    -----------------------

    Marc has been working on gravity grids the ecosystems in LAS/DODS. There are a few small problems, such as displaying large sets in ferret.

    HAZARDS YEARBOOK

    ----------------

    Dan has put the tsunamis,tsunami runups, and earthquakes in the hazards yearbook, but there are still volcanoes and hot springs. Tom has been cleaning up the hazards data.

    MINUTES APPROVAL

    ----------------

    Last meetings' minutes were approved by the group.

    CVS

    ---

    There was some discussion about CVS, and some debate about a collective model versus a project-based model. No consensus was reached.


    Note Meeting minutes for July 02, 2002

    Re: None NGDC Geospatial Data Services Group Minutes (Ted Habermann)
    Date: 2002, Jul 12
    From: James Barkley <james.barkley@colorado.edu>


    Meeting minutes for July 02, 2002 Geospatial Data Group weekly meeting

    --------------------------------------------------------------

    Attendee list: John Cartwright, Mark Ohrenschall, Dan Kowal, Thomas Gaines, Kris Nuttycombe, Josh Klaus, Travis Stevens, James Barkley

    Absentee list: Karen Horan.

    Meeting location: WADI room (1B307)

    Meeting time: 9:00 - 10:15

    Minutes record by: James Barkley

    --------------------------------------------------------------

    Sharon Meesnick from NCDDC visited.

    WCS is an emergeing specification for delivering data that could possibly be used on top of DODS.

    Resource Description Framework (RDF) is another interesting technology that is emerging but there is no clear place for it in our projects.

    John Muller is retiring.

    The satellite characterization metadata project is coming along - most of the datasets are in the database and the interface for doing crosswalks is in place.

    the SRID in FYP is not getting written to the metadata tables. We have started thinking about the user interface for FYP. Dan is in the process of making sure all the FYP search looks and display looks are working.

    Tom has deployed the WAR file on nndc2.

    the "Meta-tool" is on metadata1 instead of redbull.

    The IDB Metadata Connection has been run on some gravity sets. We should think about what new machines are coming in and what needs to be on them.


    Note July 9, 2002

    Re: None NGDC Geospatial Data Services Group Minutes (Ted Habermann)
    Date: 2002, Jul 31
    From: James Barkley <james.barkley@colorado.edu>


    Meeting minutes for July 09, 2002 Geospatial Data Group weekly meeting

    --------------------------------------------------------------

    Attendee list: Karen Horan, Travis Stevens, Josh Klaus, Thomas Gaines, Kris Nuttycombe Ted Habermann, Marc Ohrenschall, James Barkley

    Absentee List: John Cartwright, Dan Kowal

    Meeting location: WADI room (1B307)

    Meeting time: 9:15 - 10:30

    Minutes record by: James Barkley

    --------------------------------------------------------------

    The Satellite Metadata Characterization project is progressing rapidly. The interface for doing the crosswalks has been completed and is being used to create crosswalks. It still may need some fine-tuning. All of the data has been streamlined and put in the database. Tom suggested adding a "note" option to the crosswalk tool in order for one to attach a note to a crosswalk. Kris, Tom, Travis, and Jimmy should be thinking about general documentation for this project, as well as a homepage for the project. The datasets still missing are the CDML satellite statistics and the DMSP.

    People have been using the metadata comparison tool at http://metadata.ngdc.noaa.gov/metadata/login.jsp.

    Ted suggested we investigate the possiblity of a geodedic datablade which works in polar coordinates - not grids.

    One of our values is to fill up metadata field as much as possible.

    Ted will email the CLASS vision statement to the group.

    Everyone was given a list of "ilities" to keep in mind when considering project development. There was a lengthy discussion on some of them. The items that were heavily focused on included useability, manageability, testability, and security. Ted has asked us to rank these ourselves giving each item either a "high", "low", or "medium" ranking.

    Travis, Jimmy, Kris, and Ted will be on travel in Washington D.C. from the 21st through the 26th. Tom, Marc, and John will be on travel in Washington D.C. the 23rd through the 26th.

    Thanks for the bagels Karen!


    Note Minutes 7/30

    Re: None NGDC Geospatial Data Services Group Minutes (Ted Habermann)
    Date: 2002, Aug 08
    From: James Barkley <james.barkley@colorado.edu>


    Meeting minutes for July 30, 2002 Geospatial Data Group weekly meeting

    --------------------------------------------------------------

    Attendee list: Karen Horan, James Barkley, Mark Ohrenschall, John Cartwright, Dan Kowal, Travis Stevens, Kris Nuttycombe, Ted Habermann, Josh Klaush, Tom Gaines *Joe Zajic arrived at 9:30

    Meeting location: WADI room (1B307)

    Meeting time: 9:10 - 10:10

    Minutes record by: James Barkley

    --------------------------------------------------------------

    The CLASS talk from the senate hearing on NOAA's satellite systems said that NOAA does not have their act together in their future planning.

    The group had a successful trip to D.C.

    NNVL The lat/lon was added to the database. This changes the transfer process. Ran perl scripts to populate the lat/lon columns and modified interface for adding the images to include lat/lon. This means that all future images should have lat/lon in them.

    OSEI Ted argued the architecture of their metadata system. Ted's argument was that it is important to get the data into the database as soon as possible and then quality checking becomes an ongoing process. In a plan to implement an area sort Ted and others will attempt to come up with some suggested keywords for Theme keywords (science words) and place keywords (GIS). We should be able to determine place keywords in an automated way. Aurora has already completed 700 images. OSEI says they have 10,000 images, but Ted thinks this is a "brutal over-estimate."

    DBMS2SDE A where clause needs to be added in DBMS2SDE otherwise an estimated 10% downtime occurs from dropping tables and re-creating them.

    COASTWATCH Ted's coastwatch talk was wall received. The coastwatch images are getting extensive metadata generated for each of their geotiffs. Unfortunately the Satellite Active Archive (SAA) does not keep this metadata when the images are transferred to them.

    SOURCEFORCE Joe Zajic visited us. He has lots of project management experience in software development and is excited to set up a source forge for lots of different groups including ours, IP. CLASS, CoRIS, and others. This "NOAAForge" has many advantages including better user-development interaction, communication among collaborating groups, and project management.

    METADATA At OSEI we talked about the metadata tools and how they might be refined. Grouping and "batch" operations on groups was discussed along with many other suggestions for an improved interface. Having the OSEI website on top of the IDB or BAT would be an interesting programming task.

    SMC MARC was added and Kris will add the hierarchical info while Karen populates it. Someone needs to send an email to Tom Passin to dump the database and interface on CD and send it to us.

    ARCIMS NMFS and the Climate References Network want JSP and ARCIMS development from us.

    CLASS A white paper on accessing gridded data to be able to deal with custom raster data is now available. This could be an interesting aspect of the netCDF study. One of the largest potential problems with was CLASS that it had only dataset dependant features. Eric Kihn wants to get an AIX box from IBM and set up an informix gridded datablade for the CLASS project.


    News ArcIMS Training / Workshop at NGDC October 2002

    Date: 2002, Oct 28
    From: <ted.habermann@noaa.gov>


    Information presented at the meeting and questions / answers go here.


    None Presentations

    Re: News ArcIMS Training / Workshop at NGDC October 2002
    Date: 2002, Oct 28
    From: <ted.habermann@noaa.gov>



    Idea The Big Geospatial Picture

    Re: None Presentations
    Date: 2002, Oct 28
    From: <ted.habermann@noaa.gov>


    This is Ted Habermann's Presentation: http://www.ngdc.noaa.gov/seg/talks/TheBigGeospatialPicture_files/frame.htm


    NOAA GeoSpatial Data


    Add Message to: "NOAA GeoSpatial Data"

    Members Subscribe Admin Mode Show Frames Help for HyperNews at HyperNews.ngdc.noaa.gov 1.10
    Using this forum For information on this forum contact: Ted Habermann