| Happy Spring from the Mile High City, I apologize for the delay in getting this issue out since the last one I have been out of town four or five times, including one trip out of the country. Such is the life of the busy consultant. At the beginning of the year I became an ESRI Authorized Consultant, which is a type of Business Partner. Being a business partner gives me resources to better assist those of you who are ESRI users. Also related to ESRI, I am now a Beta tester for ARC/INFO 8.0. This gives me the ability to advise you on steps you might wish to take in preparation for its release, as well as steps that you might wish to avoid in anticipation of its release! A few months ago I became the sole owner of a piece of software called MAPComposer. This is a specialized tool for assisting in map making and map editing. I am pleased to say that I have already licensed and installed my first client with this Arcplot productivity tool. Development is underway to integrate it into Arcedit as well. I wish to thank those people who sent me material for my news-letter. Please do not be discouraged if you do not see it in here. I will try to include it in future issues. Finally, I wish to acknowledge all of you who have passed my newsletter along to your colleagues, have referred my services to your friends, and have called me to talk about ways in which I can assist you. Keep it coming! Daniel |
I cant be from Denver and not say anything about Columbine High School. Of all the things I could say, this is the one thing I have to say: Guns by themselves may not kill people, to paraphrase the saying. But people with guns kill a whole lot more effectively, than people without guns! On average, 15 children are killed by guns in the US every day. Get it? What happened in Littleton happens in the US every single day! |
Porting ARC/INFO Applications from UNIX to Windows NT - Part 2In the January 1999 issue of my newsletter I began addressing issues relating to the migration of ARC/INFO applications to Windows NT. Specifically, I explained how you can make your applications function better by setting various user and application environment parameters. These are "nitpicky" details that nevertheless can make your applications function more easily in the dynamic world of PC networks. In this issue I will address topics that are closer to a programmers heart: how to deal with the "loss" of UNIX tools in the NT world. Even for folks who never were great big fans of UNIX, there are certain aspects of UNIX that are hard to live without in this new, brave (Microsoft) world of ours.
UNIX commands: where are you now that I need you? .cp r, rm r, du sk, and other such UNIX commands were commonly embedded into ARC/INFO applications in the past. Now, in the emerging Windows NT operating environment, we feel a sudden sense of loss when our applications first encounter these commands in our code and stop cold. There are four main approaches to solving this problem. First, and easiest, is to seek AML functions that fulfill the same functions as these UNIX commands. However, not all commands can be replaced with AML. Therefore, the second approach is to obtain NT executables of the missing UNIX commands. Third, is to use DOS functionality still available in NT from the command line. And the fourth approach, which is my least favorite, is to attempt to use NTs own functionality from the command line, inside AML.
AML functions to replace UNIX commands The following UNIX commands can be replaced by AML functions that perform in a similar or identical way. rm: [delete -file], rm -r: [delete -directory], cp: [copy -file], cp -r: [copy -directory], mv: [rename -file], mv -r: [rename -directory]. A quick search and replace can resolve many "UNIX? What UNIX?" type of errors in your applications.
UNIX tools for Windows NT Believe it or not, you can use much of UNIXs command in Windows NT, if you get the versions of the commands that have been compiled for NT. I am not talking about using a PC version of UNIX, like LINUX, but rather using UNIX commands from the command line. Like the good old days, some would say. Some command sets are available as freeware, and some need to be purchased. With each of these, once you install the software, you have access to a suite of commands from the command line (i.e. a DOS shell window). Since ARC/INFO operates from such a shell window, your familiar &sys command will access these UNIX commands just as it always has. Pretty cool. Below is a partial list of the available options.
Free Software Foundation (GNU) The Free Software Foundation, a non-profit organization, makes available NT executables for UNIX tools, free of charge, through several GNU distribution Web sites. Being one of those free-for-the-people, UNIX-roots-like experience, you may need to dig around a little bit, but by golly, GNU has a lot to offer. Try www.gnu.org/software/software.html for information on what is available there.
Cygnus Solutions Corporation The Cygnus Solutions Corporation has compiled UNIX commands for NT from the GNU foundation, called them Cygwin, and has placed them in an easy to reach single source at their Web site: sourceware.cygnus.com/cygwin. This seems as good a compilation as any.
Reed Kotler Corporation The Reed Kotler corporation has also placed a UNIX command toolkit at their Web site, called RKTools, which can be downloaded free of charge from www.reedkotler.com/toolset.htm. As far as I can tell this is a very complete set of tools.
Mortice Kern Systems (MKS) Inc. The MKS corporation sells a software package called MKS Toolkit, which is similar to UNIX toolkits described above. Last I checked you get a very complete set of UNIX tools for your money, including some of your favorite programming languages, such as perl, awk, and even vi for Windows. It is available for trial download at www.mks.com/solution/tk.
DOS commands from the command line Sometimes a command you need is available from the DOS command line, such as the attrib command, that can substitute for the chmod UNIX command. To access DOS commands, you can use the &sys command, followed by the DOS command itself, or you can use &sys command. The command command is a DOS command whose arguments are names of other DOS commands to be run. Thus you can string several DOS commands into a &data &end AML block, as in the following example: &data command
Calling on Windows NT functions This is probably the deepest of the deep, and I havent personally gone there. This is the option that exists for calling directly on Windows NT functions, such sending the desktop commands necessary for rearranging icons, retrieving the name of the user currently logged in, or retrieving various information regarding the status of various windows. If you know how to do this well, I would sure like to hear about it!
Attaining UNIX-like window focus-policy its heaven! Fed up with having to click on the Arcedit or Arcplot command window in order to type in a command, then clicking on the graphics window to see the graphics and interact with them, and back and forth? ESRI suggests using the Always on top option available from the upper-right button on the graphics window, one session at a time. This is not a happenin solution, let me tell you. What you need is Tweak UI. Tweak UI is a subset of the Windows NT Powertools suite, available free from Microsoft. Find it listed in www.microsoft.com/windows/downloads/winntw.asp. Once installed, its control panel will be available through an icon in the NT Control Panel. There are many nifty tools that come with Tweak UI, but the one you want is Activation follows mouse (X-mouse). This will allow your mouse to set the window focus just by passing the mouse over the window (no clicking), just like in UNIX. Beware that while it is activated in this fashion, you will experience minor inconveniences in other GUI components, such as the Bookmarks pull-down in Netscape, or Dialog Designer fill-in fields in ArcView. This is easy to remedy, by toggling the feature off.
Help from ESRI For more information on UNIX to NT conversion, search the ARC/INFO Help file for Using UNIX AML applications in Windows NT. The only way Ive found to reach this topic is to press the Contents tab in the search window, then successively double-click on Getting started and Using ARC/INFO on NT, until you reach the above topic.
MAPComposer for ArcplotI am pleased to announce that I now own the sole copyright, trademark, and distribution rights for a piece of software called MAPComposer. This software, written to work with Arcplot, is a productivity tool for creating and editing maps in ARC/INFO. In its current version, MAPComposer leaves most of the creativity and expertise of creating and editing maps up to the user, unlike ArcTools or some ARC/INFO-based cartographic tools. Instead, it provides an easy to use framework for creating and editing maps. Years of use of MAPComposer under "battle" conditions have proven than map editing time can be cut by as much as 50%! In the works is also a tool for editing map features used for cartographic production in a WYSIWYG fashion. .MAPComposer is not yet being broadly marketed. However, if you produce a lot of different maps, or are presented with a lot of map edits on a regular basis, or need to produce a map atlas, and are interested to know if MAPComposer can help, please contact me. I will be glad to demonstrate what it can do.
New clients, new projectsIn the first part of this year I added two more names to my client list: EI Technologies, LLC of Aurora, CO, and Equilon Enterprises, LLC of Houston, TX. EI Technologies (www.eitek.com) is a full service GIS consulting, implementation, and data conversion firm, specializing in local government agencies. Equilon Enterprises (www.equilon.com) is a joint venture of Texaco and Shell, and is therefore one of the larger petroleum companies around. In recent months I have completed three interesting ArcView programming jobs. The first, a public-access kiosk for an Assessors Office, was interesting because I had to hide all of ArcViews standard functionality, including all menus, buttons, and tools, and disable the ability of the user to resize or close the ArcView window. This was achieved by overlaying Dialog Designer forms over the rest of ArcView, and locking them down there. The second project involved automating the generation of Crystal Reports reports from ArcView. This property management application helped the user transfer map graphics originating in shapefiles from ArcView, and data tables originating in Access, directly into pre-formatted reports. This helped my client realize benefits from Crystal Reports which are only partially available out of the box. The third application was a standalone ArcView extension for moving bar charts used in a View legend, so that they do not obscure the points they symbolize. If you have ever tried using these chart types for a theme legend, you will know what a blessing this is for my client.
GIS in Israel
I also got to join the annual Israel ESRI/ERDAS User Group picnic and bike ride. A mountain bike ride in the Jerusalem foothills included some cave crawling and concluded with lunch at the bottom of an ancient limestone water cistern. While in Israel, I volunteered to teach a high school geography class in Tel Aviv all about GIS. I had ArcView on my laptop, and borrowed a projector from Systematics, the ESRI distributors. I found that many students had a good knowledge of computers and the Internet from home, but that facilities at schools were lacking. Still, I left the teacher with a demo GIS CD, the kids with a good impression, and myself with the knowledge that I had helped spread the "word."
All trademarks, trade names, and registered names used in this article are the properties of their recognized and legal owners. Copyright © 1999 Daniel Elroi. |
![]()