Veröffentlicht in: LORUP, E. und J. STROBL (1996): IDRISI GIS 96 = Salzburger Geographische Materialien, Heft 25. Selbstverlag des Instituts für Geographie der Universität Salzburg.

Database management using IDRISI for DOS: some examples

Jüri ROOSAARE

Institute of Geography, University of Tartu, ESTONIA
E-mail: jyri@aino.geo.ut.ee

INHALT

Gesamtinhalt - Einleitung


1. Introduction

A full-scale GIS should have data query capabilities both from attributive databases to spatial data, as well as vice versa. Typical of the first one is an inquiry like 'show me on a map the attributes I selected in a table!', and the opposite like 'show me the attributes of objects I pick out in a map!'. In the systems which are more oriented to spatial data analysis than to data presentation, as Idrisi is, the prevailing data exchange occurs between program modules in order to transmit intermediate results of calculation. A hybrid GIS may use different software for attribute data management and for spatial data management. Idrisi for DOS provides XBase (dBase, FoxBase, FoxPro, Clipper etc.) for the first one. Since DOS itself does not have appropriate interactive tools, another possibility (in addition to the menu system of Idrisi) is to use the user environment of a DBMS package and run there spatial analysis modules as external programs.

The current paper is on coupling Idrisi 4.1. with the FoxPro 2.x. which provides a user-friendly environment and advanced programming language to develop data input, file and project management dialog, and to use Idrisi meta-programming together with other programs. Without such an environment it may be difficult to ensure consistency of large projects with hundreds of files in tens of directories.

One may say that Idrisi for DOS is more suitable for analysis of limited-size spatial data and for learning of raster GIS, and that Idrisi for Windows should be used for more advanced tasks. Some examples described subsequently were started in 1992. At that time the Idrisi (donated for us by UNITAR) was the only GIS package we had. Therefore we were also forced to use the vector capabilities of Idrisi/Tosca more then it would be optimal (for desktop mapping, for example). However, several tools are in use also today and for the sake of its flexibility and relative ease similar approach may be useful for someone other.

Our choice to use FoxPro was also due to situation in Estonia with environmental, demographic and other data with the potential to be spatially referenced. The majority of these were managed using FoxPro, even a map data viewer was later developed in FoxPro (see Footnote 19). In the following sections short description of one of the interfaces and some examples from different projects will be presented.

Inhalt


2. User interface

Standard data exchange in Idrisi (Eastman, 1992, p.63-66 etc.) between attribute data files and images is made via .val (values) files. The Idrisi’s module DBIDRIS transfers data to/from .dbf for one attribute during one run. Data extraction from .dbf does not have filtering capabilities, therefore some data preparation in the DBMS is needed anyway and the XBase command COPY TO...TYPE DELIMITED WITH BLANK is more flexible. The main shortage is that created in such a way .val file will not have his document file (.dvl). Although basic tools of Idrisi (ASSIGN, "f" command in PLOT) work without .dvl, there may be troubles in that case (for example, DBIDRIS does not export data to .dbf properly).

During the export of data into a .dbf file DBIDRIS is able to the selective update of records (if identificator matches with the key field). A similar operation in FoxPro needs a set of commands to perform two operations: APPEND FROM... to import a .val fail into a temporary .dbf, and UPDATE ON... to update records of main database.

Attribute values of spatial objects selected in a .val file are transformed to the corresponding image by the ASSIGN module. The result, having zero background values, may be used as a mask for further spatial data analysis. Vector files may be PLOT-ted according to .val files if attribute values can be interpreted as color codes (objects not included in the .val file will be plotted with background color). Precise analogue to ASSIGN for vector files is missing in Idrisi/Tosca1 and is therefore made by users2.

The main power of Idrisi's spatial data management consists in its ability to extract data from raster image to .val file (modules EXTRACT, AREA, PERIM, PROFILE). Specific data output produce QUERY and SAMPLE. An analogue of EXTRACT for vector files is missing. Necessary operations could be made via intermediate rasterization (for spatial selection) or by other programs3.

To run external programs in FoxPro enough conventional memory must be free. If needed, this can be gained by a special tool of FoxPro, FOXSWAP.COM but problems may arise with the Idrisi's modules COLORxxx and PLOT. Especially the last one requires up to 570 Mb which in case of several necessary drivers (for LAN and CD, for example) may be difficult to achieve.

The ordinary use of FoxPro consists in pre- and post-processing of Idrisi's data. In addition to non-spatial queries we used programs written in FoxPro to compile scripts for different carto-diagrams4. Also, marker symbols offered by PLOT are very limited both by their type and size. Therefore, a subroutine helping to calculate the proper viewport for each symbol polygon according to its attribute value and marker location is added5.

Table 1. Structure of the file topics.dbf

Data field Type Width Dec Field description
TOPIC C 25 Title of topic (for topic selection menu)
REGION_ID N 4 0 Region identificator
MAP_FILE C 12 Name of the .img, .vec, or .scr file to be displayed (this field should be not empty and the file should exist in region’s catalog in order to activate ‘Map view’ menus
CREATE_PRG M 10 A FoxPro command to be executed in order to create (or unpack, import etc.) the map file; may be a call to a batch file or to an another subroutine of FoxPro
VIEW_PRG M 10 A FoxPro command to be executed in order to display an image, 3D orthographic perspective or a plot; may be started with BYMOUSE procedure
DBASE_PRG M 10 A FoxPro command to be executed in order to activate necessary for this topic data (open tables, set relations, filters, screen formats etc.)
DESCRIPTIO M 10 Description of this topic to be displayed in special window (may be very long)

To manage different files (e.g. which databases, screen forms, output images, palettes, symbols, scripts etc. are needed for a given task) the next natural step is to create the resource tables (.dbf files) for different theme(s)6. FoxPro provides tools to generate menus, windows, on-line help and other requisites of good end-user interface. After some interim programs for the home-use, such an interface was completed by Tiia Prass (Prass, 1994; Roosaare et al., 1995) for a project, described in section 57. This interface is named GIS and it works with FoxPro 2.5 runtime version8.

To allow a single spatial data query by mouse from an image or plot, a small custom-made program is used which interrupts display on a mouse click and imparts to FoxPro the information on selection in order to find necessary data record(s)9.

For our user interface we decided on the following main organization of resources:

GIS has two levels for the user:

To initialize new regions and create new databases one should work in ordinary regime of FoxPro.

Inhalt


3. GIS to analyze problems of the North-East Estonia (NEE)

The area under investigation is the North-Eastern corner of Estonia (Figure 3.1), covering 2500 km2. The only urban agglomeration in the Baltic States that sprang up on the basis of mining industry is located here. There are two thermal power plants there considered to be among the biggest point polluters in Europe. NEE possesses a substantial part of Estonia’s mineral resources (>90% of the mineable oil-shale, turf, limestone, clay) and produces most of Estonia’s pollution. High concentration of industry leads to critical ecological situation (Figure 3.2). The basement also contains phosphorite and radioactive compounds (uranium and molybdenum in the Dictyonema Shale), the mining and utility of which is still regarded as impossible due to unresolved environmental problems.

Figure 3.1. North-East Estonia with its impact on environment

(Original: 19,6 KB)

In addition, NEE is the most boggy region in Estonia (Figure 3.3); the half territory are forest lands, nature protection areas embrace 8%. NEE lies on the traffic route connecting two large centers - Tallinn and St. Petersburg.

Figure 3.2. More than 9770 ha of the land has been spoilt by open-pit mining. During the reclamation it has been mainly forested later. (Author’s photo)

(Original: 261 KB)

Figure 3.3. Most of the protected areas in NEE are bog landscapes with thousands of bog pools. (Author’s photo)

(Original: 342 KB)

During the whole Soviet period the in-migration from the other regions of the Soviet Union predominated due to extensive development of industry12. The difficulties of economic transition (after Estonia regained its independence) have been felt especially strongly here, where leading branches of industry were essentially oriented to the Soviet market. Output has decreased dramatically, several enterprises have gone bankrupt and have closed. This results in social conflicts interlaced with ethnic problems.

NEE is an interesting and relatively well studied area to be used as a spatial modeling site. Numerous investigations have been made, including also maps on conflicting areas and environmental management13. The first attempts to use elements of GIS14 in practice were made in Estonia for this region (Meiner et al., 1990). A M.Sc. Thesis is published (Roose, 1993) which uses Idrisi to analyze different data by 1x1 km2 grid. Several pollution models have territorial data output, one of them (Kaasik, 1994) uses Idrisi. Two other samples are described below:

Changes in settlement pattern in NEE were described by (Marksoo and Roosaare, 1995). Data analysis shows that the population growth rate of the towns is directly dependent on the growth rate of industry. In the years 1945-1959 the growth rate was highest in the settlements based on oil-shale industry, first and foremost in the Kohtla-Järve agglomeration, later the growth was accelerated in Narva and Sillamäe15.

Irretrievable changes have taken place also in rural settlement of North-East Estonia. These changes are partly concerned with the official policy of the Soviet order to concentrate housing construction and the production units into central settlements of collective and state farms. But in the given region the restructuring of rural settlement has been severely affected by mining and towns, too. On the one hand, this influence has had a concentrating effect on the population: formation of several industrial townships and growth of the number of population in the adjoining villages, where there are situated various institutions "evacuated" from towns. On the other hand, industry has also played the role of an extruder of rural settlement: several villages in the mining area have partly or fully been stamped out. Apart from that, life in some villages died out just because their men-folk went to work in the mines.

Figure 3.4. Population in the rural settlements of NEE in 1959 (borders of current parishes are depicted).

(Original: 12,2 KB)

Figure 3.5. Population in the rural settlements of NEE in 1992.

(Original: 11,5 KB)

To sum up, alongside of the general decrease in the number of rural population in the rural settlements of North-East Estonia there has been a marked concentration (Figures 3.4 and 3.5).

Figure 3.6. Dynamics of rural population in NEE in the settlements of different levels: 1 - residential villages without any dominant activities, 2 - villages dealing with agriculture and forestry, 3 - centers of the large farms, 4 - industrial townships, 5 - rural local centers

(Original: 8,8 KB)

The population and economic activities have concentrated (or been preserved) in the rural local centers and industrial townships (Figure 3.6, level 5 and 4) and the large farm centers (level 3). As for the other villages, they mostly deal with agriculture and forestry (level 2), or are just residential villages without any dominant activities (level 1) and have retained less than half of their population.

Figure 3.7. The growing rural settlements of NEE in 1959-1970.

(Original: 11 KB)

Figure 3.8. The growing rural settlements of NEE in 1970-1992.

(Original: 10,6 KB)

At the same time, the number of the cores of concentration has decreased. For instance, in 1959-1970, in the industrial northern part of Ida-Viru county the number of population showed growth in 26 rural settlements, in 1970-1992 the number of growing rural settlements was reduced by half (Figures 3.7 and 3.8).

Quite a number of the settlements under discussion are but formally rural settlements, in fact they are small urban places. Considering the present slumps in industry it is probable that in the nearest future they will be losing part of their population.

Multicriteria land allocation (Eastman et. al., 1993) was another task for which Idrisi was used (Roosaare, 1995).

Figure 3.9. Main land use in NEE

(Original: 24,9 KB)

The actual land as an Idrisi’s image is depicted in the Figure 3.9. In this case study the file management is aided by FoxPro because the data preparation and all decision process (Figure 3.10) is quite complex. It seems to be difficult to make an end-user interface for whole process16 but even some mechanization is useful. The command line length in DOS is limited, that is why MOLA and WEIGHTS should be able to read some parameters from data files17.

Figure 3.10. Flow-chart of spatial decision-making process using Idrisi

(Original: 19,6 KB)

Our case study was education-oriented and therefore the situation and the criterion choice were simplified (Table 2). Also, in the real situation one land allocation (for example, an allocation for open pit mining,) may dramatically modify the suitability map for another objective (for recreation which needs to be possibly more distant from pits). Another requirement is that in some cases an allocated land unit should have a minimal size18.

Table 2: Criteria used for NEE case study

(Original: 25,2 KB)

Running MOLA with the suitability maps (Figures 3.11 - 3.13) and different land need parameters indicates where territorial conflicts are located and how conflicts’ resolution changes when areal needs change. General strategies at our case (Figure 3.14) are:

1) existing peat production should expand southward using the Bog Puhatu up to buffer zones of nature conservation areas; these areas will be sufficient for the near future,

2) for the hunting the western periphery is suggested (it may be misleading without taking into account the conditions in the neighboring area!), as well as the landscape in Kauksi-Alajõe-Iisaku region.

3) forestry should concentrate around Avinurme and expand northward depending on the areal needs and on the possible mitigation of constraints,

Figure 3.11. Suitability map for peat production (the darker the more suitable).

(Original: 20,1 KB)

Figure 3.12. Suitability map for hunting (the darker the more suitable).

(Original: 18 KB)

Figure 3.13. Suitability map for forestry (the darker the more suitable).

(Original: 17,7 KB)

Figure 3.14. Result of the multi-objective land allocation. For peat production us allocated 250 km2, for forestry 500 km2, and for hunting 750 km2.

(Original: 8 KB)

Inhalt


4. Analysis of population and food shops distribution in Tartu

Figure 4.1. In familiar talk, Tartu is called “Emajôe Ateena” (Athens of the Mother River) although the winter days may be sometimes rather arctic than Mediterranean. (Author’s photo)

(Original: 298 KB)

Tartu (population ca 100 000, area 40 km2) as an university town is one of the main centers of innovation and education in Estonia (Figure 4.1). Studies on urban geography were started here by Edgar Kant (Kant 1926), who was awarded the annual Edouard Gaudy prize in 1928 by the Society of Commercial Geography in Paris for this investigation. During the Soviet rule the research projects were oriented according to principles of 'socialist economy' but useful work was done to fix the factual situation. In the eighties commerce was very centralized. There were a few catering establishments, and small groceries were missing altogether. After Estonia gained its independence and started the economic transition towards the market economy, the number of small private enterprises increased rapidly. Today this sector is quite variable and dynamic, and economic competition for purchasers is remarkable in some places (Figure 4.2).

Figure 4.2. Idrisi’s image of the central part of Tartu. Some layers of the digital map are rasterized and catering establishments added as squares of different size and color. (Data 1994)

(Original: 80,5 KB)

Figure 4.3. Population density in Tartu calculated by means of moving average and presented therefore in relational units. (Population’s point data are rasterized using a 10x10m grid. To create a continuous field of population density a manifold filtering is used which results are better than results of interpolation.

(Original: 48,8 KB)

Potentiality to research this process using GIS is based upon databases created in the city council of Tartu. In 1991 the digital map of the city was created (at first by AutoCAD) using 1:2000 map sheets. FoxPro was used as the DBMS, including also different user interfaces made in Information Department of Tartu City Council19. The list of population in Tartu and in the county of Tartu (ca 150 000 records) includes geocodes. Among other databases there exist the list of trade permits (LTP) with ca 1500 records. The city government was so kind to allow us to use these data for research (Salundi, 1995).

Figure 4.4. Population density as a 3D orthographic perspective view. City regions with different types of buildings could be easily differentiated (see also Fig.4.2 and 4.3).

(Original: 17,2 KB)

Both the digital map and population database were converted from .dbf to .vec format and connected to each other20. This allows us to investigate the distribution of population in Tartu (Figure 4.3, and 4.4).

It was more difficult to do the address matching of LTP with the digital map21 due to many errors in the address fields of the LPT and due to the absence of booths in the map database22. The matching result was 93% of all food and catering enterprises. Locational maps (Figure.4.2) were used to analyze 'service points' in conjunction with population (Figures 4.5). At first, the Thiessen polygons were used as first approximation for 'service zones'.

Figure 4.5. Distribution of customers per grocery in Tartu 1994. Customers’ number is EXTRACT-ed from the population density map using the Thiessen polygons of groceries (trivial distance) as a feature definition image.

(Original: 3,2 KB)

We had a discussion with urban geographers about, how important it might be to take into account the non-trivial distance. First of all, to measure the distance of a purchaser from a shop in time, including the network of bus routes and bus-stops in this calculation. This is in progress now.

Inhalt


5. Digital map of Estonian landscape types

Figure 5.1. Due to the postglacial tectonic uplift of the Earth’s crust the landscapes formed on hundreds of small islands in West-Estonia are very young. The Vaika Islands, west from Saaremaa Island, are under protection as a birds’ sanctuary since 1910.

(Original: 344 KB)

Landscape synthesis in Estonian geography is highly influenced by the German and Russian Schools of Landscape Science (Roosaare, 1994). Every landscape is understood as a geo(graphical) complex in which a change in one of its components23 will alter the whole of the complex and make it develop in a new, entirely different direction (Figure 5.1). Landscapes are considered to be open systems with fuzzy borders. For example, the transition zone between landscape regions in Estonia (Figure 5.2) varies from few meters (cliffs of the North-Estonian Glint) up to several kilometers (the transition from the North-West Estonian Plateau to the Pärnu Lowland).

First detailed landscape regionalization of Estonia was made by J.G. Granö (1922) who analyzed large-scale topographic maps (using these as map overlays) and distinguished landscapes of two, three, or four elements as well as border zones (up to 10 km wide) of different levels. Many investigations developed later were either quite indetail, or local, or limited with a landscape component24. At the same time, new potentialities of the digital cartography offer tools to put together a thematic map depicting landscape borders with the knowledge about landscape components and their interrelations. Therefore, in 1994 a project was started in order to form the digital map of Estonian locality types (working scale 1:100,000), to create data bases on landscape information and to integrate results into a GIS.

Figure 5.2. Landscape regions of Estonia. This is a clickable map used in the GIS interface to select a region.

(Original: 6,8 KB)

Figure 5.3. Locality types of Saaremaa Island: a simplified map to be displayed on the screen. (The legend is common for all areas of the pilot study)

(Original: 23,4 KB)

A pilot study for three landscape regions (Figure 5.2) was made by means of Idrisi/Tosca and FoxPro25. The source hardcopy maps were compiled by I. Arold using soil maps, topographic maps, geologic maps and expert knowledge. A special task was to transform the soil map to the right geodetic base26. To allow data modification the digital map exists as a set of arcs27 but for the GIS individual polygons of localities are used and their information (ID, type, area etc.) stored in a .dbf file. As an example of such a landscape map, a simplified image of locality types of the Saaremaa Island is depicted in Figure 5.3, and a detail of the digital map in Figure 5.4. There are 406 units of 20 different types28 in Saaremaa Island.

Figure 5.4. A detail of the digital map of localities (their taxonomic level corresponds to the subtype - the main criterion to discriminate between subtypes is the content of carbonates in soils). Color palette is chosen in order to have normal printed colors (there is a considerable difference between nice colors for the screen and for a printer)

(Original: 30,2 KB)

Figure 5.5. Menus and windows of the GIS interface (as a screen dump with explanations in English added later)

(Original: 43 KB)

Figure 5.6. Some examples of spatial queries on the Pleistocene cover types (depicted as red) using the orthographic perspective view of Digital Elevation Model of Hiiumaa Island.

DEM (hmax=68m) till mire sediments
(Original: 6,5 KB) (Original: 7,3 KB) (Original: 7,2 KB)

(the screen dumps were slightly edited)

Other data tables in the GIS contain information on types of localities (typical relief forms, soils, materials of Pleistocene cover, dominating forest site types, and plant communities). Since the descriptions of component types are saved in separate databases, and an auxiliary table ‘plant-locality’ will be generated, too, the .dbf files form the relational model of all landscape information. Using a system of thematic windows, different textual queries are possible (Figure 5.5) and the GIS may be applied as a electronic tutor on landscapes. The territorial queries may use Idrisi’s operations of map algebra. Results can be saved as the new topics, which allows us a quick reproduction of more complicated images (Figure 5.6). Also, these data allow us to derive hypothetic maps of other landscape components29.

Inhalt


6. Is this out-of-date?

Different people with different aims having different tools would have different answers to this (rhetoric) question.

Probably, the weakest part of the construction “Idrisi for DOS - FoxPro” are the output modules COLORxxx, ORTHOxxx, and PLOT which require too much conventional memory and may easily run into conflicts with other programs. Analysis tools as a set of quite independent modules (unified by common ideology) which may EASILY be coupled with user's applications will still have a good perspective in the academic society. It would be good for many model builders to have an "Idrisi's subroutine library" ("Idrisi's runtime library") enabling linking of spatial analysis modules to their home-made ones as it is in Windows30. Also, program modules could allow more flexible data exchange because the command line length limitation is quite inconvenient sometimes31.

Inhalt


7. References

Arold, I. (1993), Estonian Landscapes. Tartu.

Eastman, R.J. (1992), IDRISI Version 4.0 rev.1. User’s Guide. Clark University, Worcester.

Eastman, R.J., Kyem, A.K. , Toledano, J., and Jin, W. (1993), GIS and Decision Making. Explorations in Geographic Information Systems Technology, 4, UNITAR, Geneva

Housing and communal economy in Estonia 1992 (1992), ESA, Tallinn (in Est.)

Granö, J.G. (1922), Landscape units of Estonia.- Loodus 2, 4-5, p. 105-123, 194-214, 257-281 (in Est.)

IDRISI News (1993), V.5, N.1.

Jagomägi, J. and Mardiste, H. (1994), Maps and Mapping in Estonia. - GeoJournal, , 33.1, p.81-90

Kaasik, M. (1994), Air pollution transport and deposition model AEROPOL, In: Land and Soil Protection. Proceedings of Symposium, pp. 222-232. Tallinn

Kant, E. (1926), Tartu. Étude d'un Environment et Organisme Urbain. Tartu (in Est. with French. sum.)

Marksoo, A., and Roosaare, J. (1995), Changing Settlement Patterns in North-East Estonia - a Region of Polluted Environment and Political Conflicts, Geographia Polonica, 64, pp. 147-166

Meiner, A., Saare, L., Roosaare, J., Roose, A. (1990), Geographic information system for nature management in the industrial region of North-East Estonia/USSR, In: J.Harts, e.a. (eds.), Proceedings of the First European Conference on GIS, 2, Amsterdam, pp. 756-761.

Prass, T. (1994), GIS on Landscapes of Hiiumaa. Tartu. (in est. with Eng. summ.)

Roosaare, J. (1994), Physical Geography in Estonia: Bridging Western and Eastern Schools of Landscape Synthesis. - GeoJournal, , 33.1, p.27-36.

Roosaare, J. (1995), Computer-aided learning of spatial reasoning and decision-making, In: H. Kremers, and W. Pillmann (eds.), Space and Time in Environmental Information Systems. 9th International Symposium on Computer Science for Environmental Protection CSEP’95, 1, pp.478-485. Metropolis-Verlag, Marburg

Roosaare, J., Arold, I., and Prass, T. (1995), Digital Map and Geographical Information System of Estonian Landscapes. - Report of ETF grant No.698. Tartu (in Est.)

Roose, A. (1993), Data Management and GIS applications for environmental-economic appraisal - a case study of the Estonian oil shale basin. M.Sc. Dissertation. Tartu

Salundi, A. (1995), Pattern and dynamics of food and catering matters in Tartu 1991-1994. Tartu (a Student's working paper in Est.)

Scheme for Environmental Protection of the North-East Estonia. Summary maps. (1984), Tallinn (in Russian)

Inhalt


8. Endnotes