Version 19 of tkWorld

Updated 2002-02-01 21:43:59

See Geographic mapping the Tcl way for more details. RS: I proposed rules there that I myself didn't sctrictly follow ;-) more so in Mapping Colorado than in this midnight project, that was driven by the fact that I finally had coastline data.

Get TkWorld (a zoomable, scrollable world map on a canvas, based on data from http://dss.ucar.edu/datasets/ds780.0/ ) as TclKit (39kb) from http://www.digital-smarties.com/pub/tkworld.bin , or mailto:[email protected] for the 111KB source (single file with all data)

Vince How does one zoom? There are no controls and all the keypresses and clicks I've tried (WinTk 8.4a4) don't do anything.

RS Plus and minus keys on the keyboard (sorry, it was late ;-)


rmax offers a list of Tcl'ers with coordinates at http://www.suse.de/~max/TclersLocations , and here's a little scraper (and displayer) for that:

 proc drawTclers w {
    foreach guy [fetchTclers] {
        foreach {name lat lon} $guy { break }
        set lon2 [expr {-$lon-$lon-1.5}]
        set lat2 [expr {-$lat-$lat-1.5}]
        $w create oval $lon2 $lat2 [expr {$lon2+3}] [expr {$lat2+3}]\
            -fill white -tag $name
    }
 }
 proc fetchTclers {} {
    set socket [socket www.suse.de 80]
    puts $socket "GET /~max/TclersLocations"
    puts $socket ""
    flush $socket
    set tclers ""
    while { ![eof $socket] && [gets $socket line] != -1} {
        set line [string trim $line]
        if {
            ![string match $line "#*"] &&
            [info complete $line] &&
            [llength $line] == 3
        } then {
            lappend tclers $line
        }
    }
    close $socket
    set tclers
 }

but here's the list as of 2002-02-01 (feel free to add):

 {Steve Landers} -32.064 -115.875
 {Reinhard Max} 49.453 -11.078
 {Larry Virden} 39.9677 82.8240
 {Cameron Laird} 29.5 95.2

To add your data into the master list, send a mail to "max at suse.de" with "TclersLocations" in the Subject and an entry like those above in the first line of the body. Please be patient if your entry doesn't show up immediately. It has been processed, but is only visible after the next rsync to the server and they are only done once in a few hours.

How does one (accurately) find out one's geo-location?

With a gazetteer like http://www.nima.mil/gns/html/ (MFP).

But that gives me degrees/minutes/seconds... (jcw, mathematician :)

Here's a one line converter. dmstodd 40 26 26 79 59 46 gives me 40.4405555556 79.9961111111, and I would report 40.441 -79.996 since I'm in the western hemisphere (NW quartersphere?) (MFP).

 proc dmstodd {d1 m1 s1 d2 m2 s2} {
     list [expr $d1+($m1+$s1/60.)/60] [expr $d2+($m2+$s2/60.)/60]
 }





Category Application