Washington State Department of Natural Resources
WINDIG
 
A PC Digitizing Solution
 
 

Hui Jin

Computer Software Specialist
Washington State Department of Natural Resources

hui.jin@wadnr.gov
Phone: 360-902-1537
 
Last Modified: March 30, 1998
 
 
 
 

Abstract

WINDIG makes it possible to connect a digitizer to a UNIX ArcInfo host via a regular PC with Windows95/NT and an X-emulation software.  The ArcInfo host can communicate with the PC and the digitizer via a TCP/IP network.  A digitizer is used to convert maps and aerophotos into digital format so that they can be used for GIS analysis.  Currently for UNIX ArcInfo users, a digitizer has to be physically connected to a UNIX workstation or a X-terminal which is a special hardware designed to only display GIS graphics.   The first method limits the location a digitizer can be placed, usually within 20 ft of the UNIX workstation.  The second method of connecting a digitizer via a X-terminal overcomes the limitation on digitizer physical location but requires purchase of expensive X-terminal.     WINDIG software provides an elegant and inexpensive solution to this problem.
 



Table of Contents

 

Introduction

Components

Download and Installation

Usage

Frequently Asked Questions and Support

Acknowledgements

Copyrights




Introduction

WINDIG is developed to use a PC and replace X-terminal in connecting a digitizer to ArcInfo on a UNIX host.

To use a digitizer with ArcInfo on a UNIX host, you would normally have to either directly plug the digitizer's cable into a serial port on a UNIX host or purchase a Tektronix X-terminal and connect your digitizer to it and make the digitizer work with ArcInfo on a UNIX host.

Connecting a digitizer directly to a serial port on a UNIX host limits the physical location of the digitizer. You can not place a digitizer away from a UNIX host in more than 20 ft. in most cases. The second connection method overcomes that limitation. You can place the X-terminal anywhere has network connection. But the cost of an X-terminal usually ranges between $4,000 and $8,000.

This software product would save the X-terminal purchase cost and provide the same and sometimes more capabilities. All you need is a regular PC with Windows95 operating system and a TCP/IP network protocol configured correctly. Any X-window emulation software (costs about $50 to $400) will give you a X-window display capability right on your PC screen. Even in places where no network connection is available, WINDIG will give you access to ArcInfo digitizing capability via dial-up ppp networking.

Back to Table of Contents



Components

There are 3 components in WINDIG. The first component is a client software "digiconn" running on your PC. (image on left) It will capture the signal generated by pushing a digitizer button and send the signal to a UNIX host through a TCP/IP socket. The second part is a server software "digi_server" running on your UNIX host. It will listen the socket port and once a digitizer signal arrives, save the signal to a FIFO (first-in-first-out) file. The last component is a simple ArcInfo AML (Arc Macro Language) program "pcstat.aml" which allows a GIS user specify the digitizer type and where the ArcInfo "digitize" command should look for the digitizer signal. 
Back to Table of Contents



Download and Installation

For DNR GIS users, the WINDIG is located in /am/mrthps2/digitize. Use ftp program comes with your Exceed (X-window emulation software) to download the "DigiConn.exe" in binary mode to your PC. "DigiConn.exe" is an executable program for Windows95/NT. It requires microsoft foundation class 4.0 dynamic linking library (MFC40.DLL) to run. If your PC does not have MFC40.DLL, I have included a copy in the same directory as the DigiConn.exe exists. You should copy it to C:/Windows/system directory on your PC. Most PCs have got MFC40.DLL already.

"DigiConn.exe" is a client in the package. The server component is the software named "digi_server". You do not need to do anything for the server component. It is installed by system administration.

The thrid part, an AML program "pcstat.aml" and "dig.menu", has been installed also as an ArcInfo utility in system level atool directory. Again you do not do anything for this part either.

If you are installing the software package for non-DNR GIS system, the complete source code, documentation, and executables can be download from:

ftp://forsys.cfr.washington.edu/pub/wadnr/windig11.exe

The file is self-extracting executable. After WINDIG is unzipped on PC, you should move the server and the AML / MENU components to your UNIX host and install them there.

Follow these installation instructions:

1. It is suggested that you install the server program "digi_server" in /usr/local/bin. Make sure the server program can find "tclsh" on your system by modifying the path in the first line of the server program.

2. Ask your system administrator to designate a TCP/IP socket port for WINDIG and start the server program as a deamon on your host. The default socket port is 2000. If you decide to change the port, edit the "digi_server" program. All client programs have to use the same socket port number to establish communication with the server.

3. Check UNIX system dependency part in the server program. It is documented in the program header in detail.

4. Lastly, install the ArcInfo aml and menu as an ArcInfo utility in system level atool directory for your custom site. There is a system dependency inside "pcstat.aml". For those users who have not upgraded to ArcInfo 7.1.1, you need to replace %USER% in the code with [extract .. [ pathname $USER ] ... ] to get a user's ID on your host.

Back to Table of Contents



Usage

Before you run any program, check your hardwares. Make sure digitizer is connected to the serial port of your PC properly and your netwok connection is OK. Configure your digitizer if it is necessary. (For example, configure your Calcomp DrawingBoard III digitizer to emulate Calcomp 9500 digitizer.)

Now log on the system via X-emulation and start ArcInfo. Run "PCSTAT" Atool command. You will be asked to identify your digitizer model from a short list. After you have done the selection, switch back to Windows95 environment and start "DigiConn.exe" program. The first thing to do is to configure the client program by clicking the configuration icon. The configuration icon is located on the bottom of the graphic user interface of the program and it looks like a digitizer pad.

There are serveral parameters need to be specified:

1. IP address of your host (Do not use the host name);
2. Socket port number (2000 for DNR GIS users);
3. Your User ID on the host;
4. Communication parameters for your digitizer, that includes serial port, baud rate, data bits, stop bits, and parity.

Once these parameters are specified, they will be saved in Windows95 registry so that they do not to be specified again by the user.
 

After the configuration, click the green light icon to connect the server. The two display areas on the "DigiConn" main GUI will report the serial port and network connection status to you. After communication is successfully established, you can switch back to ArcInfo session on host and start digitizing.

The server program will also report any changes on communication status to you on host.

Since the server program is running as a deamon on host, you could alternatively run client from PC first and then start ArcInfo on host.

If you run into any errors, plesase check FAQ portion of this help document.

Back to Table of Contents



Frequently Asked Questions and Support

Before you report any problems, check the FAQ list below. Your questions may have been answered here. If you have any other problems, questions, and/or suggestions not answered by FAQ, please send an e-mail to me at hui.jin@wadnr.gov.

1. What is Tcl/Tk?
2. Where can I get Tcl/Tk and how to install it?
3. How to add more digitizer type?
4. What does the error message X mean and what should I do to correct the problem?
5. What is MFC40.DLL? Why do I need it to run "DigiConn"?
6. Can I use this product under Microsoft Windows3.11 operating system?
7. I ran ArcInfo "digtest" command and the digitizer did not work correctly. What is wrong?
8. How can I test the hardware connection between my PC and digitizer?
 

Back to Table of Contents
 

1. What is Tcl.Tk?

Tcl/Tk is a scripting language invented by Dr. John Ousterhout. You can get a full picture of Tcl/Tk by visiting SunScript business unit of Sun Microsystems.

Back to FAQ
 

2. Where can I get Tcl/Tk and how to install it?

Tcl/Tk can be download from official download site of SunScript. Installation instructions should come with each download package for various platforms.

Back to FAQ
 

3. How to add more digitizer type?

By editing "dig.menu" file. Refer to ArcInfo help utility "arcdoc" (ArcInfo 7.11) on how to write/modify the ArcInfo menu.

Back to FAQ
 

4. What does the error message X mean and what should I do to correct the problem?
 

Failed to create communication thread Report to author.
Windows sockets initialization failed Report to author.
Can't find the server Problematic TCP/IP configuration; Re-configure.
DNS server is not working. Contact your sysadmin.
Failed to create socket Report to author.
Failed to connect to the server Server is not running on host. Launch server program.
Failed to send data Server has been shut down. Launch server program
Failed to open specified serial port Possible hardware failure. See FAQ 8.
The specified user is not logged on the host.  Verify user_id and log on host first
Failed to receive response from server Lost network connection. Contact your sysadmin.
Back to FAQ
 

5. What is MFC40.DLL? Why do I need it to run "DigiConn"?

MFC40.DLL is the Microsoft Foundation Class version 4.0 Dynamic Linking Library. It contains the libraries for developing many applications. DigConn Program uses MFC40.DLL so that the DigiConn can be very small and easy to maintain.

Back to FAQ
 

6. Can I use WINDIG under Microsoft Windows3.11 operating system?

When you are digitizing and use X-emulation software to view your ArcInfo display, you are multi-tasking. Window3.11 is not a multi-tasking operating system, unfortunately. You can upgrade to either Windows95 or WindowsNT operating system to use WINDIG.

Back to FAQ
 

7. I ran ArcInfo "digtest" command and the digitizer did not work correctly. What is wrong?

ArcInfo's digform directory contains conversion files for each digitizer models. Some of the conversion files have conversion string dealing with hardware initialization / shutdown sequences. DigiConn is a software solution for digitizer. It does not need the initialization and shutdown sequence conversion. Ask your system administration to modify the proper digform file (or make a new one) so that no initialization / shutdown sequence conversion string is contained in the digform file. "digtest" should work fine after this is done.

Back to FAQ
 

8. How can I test the hardware connection between my PC and digitizer?

There is an accessory in Windows95/NT called HyperTerminal. You can use HyperTerminal to test the hardware connection between your PC and digitizer. Steps of test the connection are described below:

1. Run HyperTerminal program from Accessory folder;
2. Double click Hypertrm icon to launch a new connection;
3. Name your new connection and go to File->Properties;
4. In New Connection Properties window, choose "Direct to comX" in entry field titled "Connect using:";
5. Press "configure" button directly below the entry field to configure your com port X;
6. Save your settings for the new connection;
7. Turn on your digitizer and push some buttons. You should see a string displayed in the HyperTerminal window. If you do not see the string, your hardware connection has some problems.
 

Back to FAQ

Back to Table of Contents


Acknowledgements

My thanks first goes to Dr. John Ousterhout for his excellent tool Tcl programming language. My thanks also go to many of my colleagues who encouraged and helped me in the development of this product, including Jack Cullen, Charlie Hanlin, Christian Fisher.  Lastly, my dear wife Jing who freed me up from many distracting tasks at work and at home.

I also want to thank Bob Mcgaugghey, Cooperative for Forest Systems Engineering at University of Washington, who has generously provided ftp and web hosting for Windig software.
 

Back to Table of Contents


Copyrights

The WINDIG is copyrighted under GNU General Public License. Please read the full copyright documentation if you have any questions about copyrights.

Back to Table of Contents

End of Document.