Shapefile Display & Query via the Internet

Well, the age of java has dawned on the UCT GIS web pages at last.  This is both good, and bad.  On the good side, I get to fool around with java and you get to display and even query some of the datasets available at the UCT GIS facility.  On the bad side, I get to shoot myself in the foot with java, the Infernal Java Machine gets to shoot both of us in the CPU repeatedly, and you can't export the displays to get your own subsets of the data on view.  Unless you use a screen capture.  In which case its a picture, not geospatial data anymore.  If you are unclear what the difference is, click over to ESRI's web page for their 'What is a GIS' special.

I found the unspeakably cool JShape java applet by following a posting on comp.infosystem.gis by Shiuh-Lin Lee.  The home page of the author, and thus JShape is
http://shiuhlin.ml.org.


Warning

Hey, its java we're getting into, so a few 'caveat browser's are called for:

  1. Its java.  You need java enabled on your web browser.  I use Netscape Communicator 4.03 (or better).
  2. Its java.  You will experience some delay as the java class information is downloaded to your machine (at least the first time), compiled and started.
  3. Its java.  There is often a delay (30 - 60 seconds) between the download of shape data and the beginning of a screen draw. Hang in there (pardon the pun :).
  4. Its java.  Prepare to have your browser hung.  Sometimes repeatedly as the Gods of Packet Loss waylay a hapless line of java class information.  My own sessions involve connecting to one of the pages, watching jshape hang at 45%, and then restarting Netscape and all going well.
  5. Its java.  Reloading a page has unexpected side effects (not refreshing the display window etc) - go to a different page, then come back and the java applet should reload.  Or at any rate, thats how it works for me.
  6. Its java.  I will be less help than a soup ladle in a dam burst when it comes to troubleshooting.  Feel free to send me any problems you might be experiencing, but I'll probably ignore most of them as being beyond my expertise.  You could go and check out the JShape authors home page, if you are curious/desperate enough
  7. Read the help - either the bit reproduced below, or just type 'help' and hit the execute button once the java applet has loaded.  You can change colors, thickness, zooms and selections online.  Make your own thematic maps!  Be the first on your block etc etc etc

JShape Help & Tips

Well, I could have made this a link that spawned a new copy of your browser, but felt it should be up to you to do that.  Besides, both copies will probably stop responding when the java machine blows up on you :).  The text below is copied directly from the Jshape 1.0 text file, and Copyright 1997 by Shiuh-Lin Lee.



 
 
JShape action buttons 

  There are several action buttons in JShape panel allows users to manipulate 
the spatial data. 

  1. [Normal] : Do Nothing, clear [ZoomIn], [Pan] and [Identify] modes. 

  2. [UnZoom] : Display the map in the full extent view. 

  3. [ZoomIn] : Zoom in the map. 

  4. [ZoomOut] : Zoom out the map. 

  5. [Pan] : Pan the map. 

  6. [Identify] : Identify the attribute information on the current focused 
       layer. The identified attribute information is shown in the status 
       window. The focused layer can be changed through the legend window by 
       clicking the interested layer you want. 

  7. [Clear] : Clear the selected features and the status window buffer. 

  8. [Execute] : Execute the online command entered in the command window. 
       Next section will explain this in the details. 

  9. [Query] : Query the attribute information on the current focused layer 
       with the query criterion entered in the command window. 
       The focused layer can be changed through the legend window by clicking 
       the interested layer you want. 
       JShape uses the partial string match method to search the attribute 
       information. 
       For Example : 
         There are three attribute records : 
             Park 
             Arc 
             nomatch 
         If the query criterion is "ar", only "Park" and "Arc" will be matched.

JShape online commands 

  Users can enter the online command in JShape command window, and then press 
[Execute] button to execute the online command. The following commands are 
currently supported by JShape. 

  1. help : Help command. 

  2. count : Report the number of features on the current focused layer. 

  3. extent : Report the map extent information. 

  4. fcolor= : Change the foreground color of the features on the current 
       focused layer. For examples : fcolor=red or fcolor=FF00FF 

  5. bcolor= : Change the background color of the features on the current 
       focused layer. For examples : bcolor=red or bcolor=FF00FF 

  6. size= : Change the symbol size of the features on the current focused 
       layer. For example : size=5 

  7. scolor= : Change the selection color of the features on the current 
       focused layer. For examples : scolor=red or scolor=FF00FF 
       *** Note *** 
         JShape allows multiple selection colors co-existing on the same 
       focused layer. With the different selection colors and the different 
       query criteria, WWW end users can achieve the thematic map effects. 

       For Example : On a road layer, users can do the following things : 

         (a) [Execute] : scolor=red 
         (b) [Query] : highway 101 
             The selected "highway 101" features are displayed in red. 
         (c) [Execute] : scolor=brown 
         (d) [Query] : highway 5 
             The selected "highway 5" features are displayed in brown, and 
             the selected "highway 101" features are still displayed in red.


Right, enough of the whingeing and fine print.  This is a pretty darn cool applet for something that is free, and so, without further ado, use the following links to see some of our data online:
 
South African Coastline
Simple, fastest to load, no real useful attribute (its a coastline, what do you expect?)
South African Provinces
You can also use the 'Query' and 'Identify' widgets to select/display province names.
Scanned Orthophoto
Umm.  Of some farming territory somewhere.  Extreme caution advised - its a whacking great 650 Kb jpg image in use here.
Peninsula Theme - landuse, roads, railways and towns
Pretty darn impressive.  Also likely to take a while to load.  Beware.
 
If you have any data of your own that you would like displayed here of relevance to this site (you don't have to be from UCT at this stage), contact me, perhaps we can arrange something.


Home