next up previous contents index
Next: 5.9 Collector interface description: Up: 5.8 Using different index/search Previous: Using Verity as

Using GRASS as an indexer

As a demonstration of Harvest's flexibility, we have created a broker for spatial data. This broker uses the GRASS GIS packagegif as its indexer.

A Gatherer was customized to extract coordinate and other information from DLG ``tar'' files available from the National Wetlands Inventory FTP sitegif. Each DLG file retrieved by the gatherer was imported into a GRASS database with the v.in.dlg program. Next a summary (SOIF template) was generated from the output of the GRASS v.stats command.

Only the eleven `` index.c'' interface functions needed to be changed in the broker. A grassindex program was written which took the brokers SOIF templates and generated a GRASS vector map. The vector map consists of a set of Minimum Bounding Rectangles (MBRs). There is one MBR for each SOIF template.

We provided two ways to query this database. The first was to find all MBRs which intersected another named area. We used US States as the named areas. This allowed the user to find all wetlands data for Alabama, for example. Additionally, an HTTP ``imagemap'' was set up so that the user could click inside a state to generate the query.

The second query provided was to find all datafiles within two arc-degrees of a given coordinate. Again an HTTP imagemap was used to generate the coordinate request. The image coordinates were converted to lat/lon and given to a custom-written GRASS program. This program located all MBRs with centers within two arc-degrees of the given coordinate.

A demonstration of this Broker is available.

The `` index.c'' for using GRASS as an indexer is distributed with the Version 1.3 source code. Numerous support programs and scripts used with our demo broker are available. The gatherer is also available.

Note that the provided support code will not work ``out-of-the-box.'' It was quickly assembled as a demonstration. In order to make it work you need to have good working knowledge of both Harvest and GRASS.



next up previous contents index
Next: 5.9 Collector interface description: Up: 5.8 Using different index/search Previous: Using Verity as



Duane Wessels
Wed Jan 31 23:46:21 PST 1996