|
geomap_awips − package to access NWS/AWIPS map data with Tcl/Tkgeomap |
|
2 |
package require geomap_awips ?2? geomap::awips::county::read shapefile region geomap::awips::county::regexp exp ?nocase? geomap::awips::state::read shapefile |
|
The geomap_awips package provides procedures that read and manage data from the U.S. National Weather Service map database at http://www.nws.noaa.gov/geodata. It is distributed with tkgm_util, a set of utilities to use with tkgeomap. |
|
Loading geomap_awips requires the following applications and libraries: |
|
tcl/tk |
Scripting language from http://dev.scriptics.com, version 8.3 or later. |
|
tkgeomap |
|
Tcl/Tk extension to Tcl/TK, from http://www.tkgeomap.org |
|
shptobin |
|
Application to transform shapefile data to a form readable in tkgeomap. It is part of tkgm_util. |
|
dbfdump |
|
Application to retrieve shapefile database information. It is part of shapelib, from http://gdal.velocet.ca/projects/shapelib. |
|
geomap::awips::county::read shapefile ?region options? |
|
This procedure reads county outlines from the National Weather Service "AWIPS Counties" shapefile. shapeFile identifies the shapefile downloaded from the NWS site. It actually consists of three files named shapeFile.dbf, shapeFile.shp, and shapeFile.shx. If present, region options requests that only counties in the specified region be loaded. The following region specifiers are recognized: |
|
-all |
Loads all counties. This is the default. |
|
-states stateList |
|
Loads counties in the specified states. stateList must be a list of two-letter state abbreviations. |
|
-bounds {north east south west} |
|
Loads counties whose centers are in the given latitude-longitude box. |
|
The read procedure will give each county it loads a unique identifier of form cXXX, where XXX is an integer. This identifier will refer to the following information: |
|
geomap::awips::county::name(cXXX) |
|
Array element giving the name of county. |
|
geomap::awips::county::state(cXXX) |
|
Array element giving the state in which the county is located, given as a two letter abbreviation. |
|
geomap::awips::county::fips(cXXX) |
|
Array element giving the fips code for the county. |
|
geomap::awips::county::cXXX |
|
A linearray created with the geomap::lnarr command (see the tclgeomap (n) man page) containing boundary for the county. |
|
geomap::awips::county::center::cXXX |
|
A place created with the geomap::place command (see the tclgeomap (n) man page) giving coordinates of a place inside the county, giving a rough idea of its location. |
|
geomap::awips::county::counties |
|
List of identifiers for loaded counties. |
|
Return value is the number of counties loaded. |
|
geomap::awips::county::regexp exp ?nocase? |
|
Searches the geomap::awips::county namespace for counties whose names match regular expression pattern exp. Return value is a list of county identifiers of form cXXX. If nocase option is present and has a Boolean value of true, then the search is case insenstive. |
|
geomap::awips::state::read shapefile |
|
Loads state outlines from the NWS/AWIPS "U.S. States and Territories" shapefile. shapefile identifies the shapefile downloaded from the NWS/AWIPS site. It should consist of files shapefile.dbf, shapefile.shp, shapefile.shx. Each state will be identified by its two letter abbreviation ID, which will refer to the following information: |
|
geomap::awips::state::ID |
|
A linearray created with the geomap::lnarr command (see the tclgeomap (n) man page) containing state boundary. |
|
geomap::awips::state::name(ID) |
|
Array element giving the full name of the state. |
|
geomap::awips::state::center::ID |
|
A place created with the geomap::place command (see the tclgeomap (n) man page) giving coordinates of a place inside the state, giving a rough idea of its location. |
|
geomap::awips::state::states |
|
List of identifiers for loaded states. |
|
Return value is the number of states loaded. |
|
awips.tcl |
|
Gordon Carrie < user0 at address tkgeomap.org > |