tkWorld

Summary

obsoleted by TclWorld

TkWorld is a zoomable, scrollable world map on a canvas, based on data from dss.ucar.edu/datasets/ds780.0 (url is 404 on Aug 31, 2011) as Tclkit (39kb) from digital-smarties.com (url is 404 on Aug 31, 2011), or mailto:[email protected] for the 111KB source (single file with all data).

If you are surprised that this is about maps, you might have been looking for the tkWorld Desktop.

See Also

CIA World Fact Database
TclWorld Gazetteer
has lat/lons for ~200 cities and places.
Defining Tclworld
DNSstuff.com
has a nice lookup by IP number. Look for the "NetGeo IP Lookup".

Description

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

tkWorld 0.2 (without the data) now available. But it will have to change name - there was a (possibly dead) project of that name and even a package at Debian. Watch this place for updates. RS

Misc

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 2004-01-28 (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
{Rolf Ade}        48.8 -9.2
{Richard Suchenwirth} 47.70 -9.13
{Dan Kuchler}     44.21 88.42
{Steven Gibson}   33.967 -118.017
{Michael Jacobson} 39.245 76.791
{Kevin Kenny}     42.825 73.888
{Jean-Claude Wippler} 52.033 -5.167
{Brett Schwarz}   47.483 -121.783
{Ulrich Schoebel} 50.683 -6.217
{David Zolli (kroc)} 46.15 1.15
{Pat Thoyts}      51.534 2.423
{Donal Fellows}   53.4679 2.2344
{Miguel Sofer}   -34.613  58.470
{Salvatore Sanfilippo} 36.9035 -14.8222
{Peter Spjuth}    57.6863 -11.9959
{Michael Schlenker} 53.155 8.235
{Pascal Scheffers} 52.020435 -5.097055

SS: xplanet users may want it in this format:

-32.064 115.875 "Steve Landers" color=green
49.453 11.078 "Reinhard Max" color=green
39.9677 -82.8240 "Larry Virden" color=green
29.5 -95.2 "Cameron Laird" color=green
48.8 9.2 "Rolf Ade" color=green
47.70 9.13 "Richard Suchenwirth" color=green
44.21 -88.42 "Dan Kuchler" color=green
33.967 -118.017 "Steven Gibson" color=green
39.245 -76.791 "Michael Jacobson" color=green
42.825 -73.888 "Kevin Kenny" color=green
52.033 5.167 "Jean-Claude Wippler" color=green
47.483 -121.783 "Brett Schwarz" color=green
50.683 6.217 "Ulrich Schoebel" color=green
46.15 -1.15 "David Zolli (kroc)" color=green
51.534 2.423 "Pat Thoyts" color=green
53.4679 -2.2344 "Donal Fellows" color=green
-34.613 -58.470 "Miguel Sofer" color=green
36.9035 14.8222 "Salvatore Sanfilippo" color=green
57.6863 11.9959 "Peter Spjuth" color=green
53.155  8.325 "Michael Schlenker" color=green

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]
}

Here is a locator that gives both:

http://www.getty.edu/research/tools/vocabulary/tgn/index.html

PS 27Jun2005: Or you can use the google maps service: http://maps.google.com/maps?ll=50.0,9.5&t=k You can switch to 'Map' mode and try to see if it knows your street address. If it doesn't, use your geography skills to scroll through the map, possibly assisted by looking at map data from [L1 ], which has at least most of the western world. To find the coordinates to use, click on 'link to this page' when you've found your location and then copy the ...&ll=52.020435,5.097055&... element from the URL. The second argument to ll must be negated, so that 5,09... becomes -5,09 and negative numbers become positive numbers. My guess is that some Americans at Google didn't like to see negative numbers for North America...


DKF - The above code is not at all sensitive to firewalls; even the http package is better. So...

package require http
proc fetchTclers {} {
    set tok [http::geturl http://www.suse.de/~max/TclersLocations]
    set tclers {}
    foreach line [split [http::data $tok] \n] {
        set line [string trim $line]
        if {
             ![string match $line "#*"] &&
             [info complete $line] &&
             [llength $line] == 3
        } then {
             lappend tclers $line
        }
    }
    http::cleanup $tok
    return $tclers
}