Subject: | |
From: | |
Reply To: | |
Date: | Mon, 13 May 1996 14:34:43 EDT |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
----------------------------Original message----------------------------
I have designed a database which contains spatial data using Dbase IV
for DOS 2.0. I have written three programs in the Dbase IV programming
language to assist in extracting information from this database and then
importing it into a GIS. I have found that Dbase IV is more difficult to
learn for my employees and interns, so I have decided to begin using
Microsoft's Access 2.0 for Windows RDBMS. I am familiar with most aspects of
Access. Here is where I need some assistance. I am in the process of
learning AccessBasic. I have written all of my Dbase IV programs in
AccessBasic except one. I realize that this may not be completely related to
GIS, but it does have something to do with managing spatial data prior to
displaying/analyzing it with a GIS. Here is what the below mentioned program
written in Dbase IV language does: I use a database named temp1.dbf and I
want the information that has been processed to be transferred to year93.dbf .
Select 1
Use temp1 index temp1
Select 2
Use year93
Select 1
Go Top
DO WHILE .not. eof()
Store 0 to Freq
Store Grid to xy
Do While .not. eof()
if Grid = xy
Store Freq + 1 to Freq
else
exit
endif
skip
EndDo
Select 2
append blank
replace MapGrid with xy, Frequency with Freq
Select 1
ENDDO
What this program does is count the number of times a grid number (e.g.
432A7, 543H9, 213K1, ...) occurs in the field GRID in the temp1.dbf then it
saves this information to the year93.dbf as two fields MapGrid (e.g. 425E2,
254H9, 673D1, ...) and Frequency (343, 78909, 1213, ...). Frequency will
show the total number of times each grid number occurs in temp1.dbf. I hope
someone can help me (or show me how to) translate this program into
AccessBasic. Thank you.
Sincerely
Timothy S. Hayes
Chief Cartographer
Medical GIS Consulting Services
[log in to unmask]
|
|
|