nbspgislibmap

nbspgoesr tutorial

Preliminaries

The tools described here are

which are available by installing the Nbsp package. The first three are C programs, while the last one is a shell script, which uses nbspgoesrgis together with the map2img program from the mapserver package.

An alternative to installing the Nbsp package it to install the library packages nbspgislib and nbspgislibmap. These install

The first three are from nbspgislib, and the last one from nbspgislibmap. Although the names are different, nbspglgoesrmap (from nbspgislibmap) and nbspgoesrmap (from nbsp) are the same program.

In what follows below we assume the installation of nbspgislib and nbspgislibmap as just mentioned.

In the examples below we will use the input files

The first is a file received by Nbsp and the second is downloaded from the ASWS public repository. We will use the shorthands <tire13> and <or_abi> to denote their names (without the extension).

Quick examples

1) To create a png image from the <tire13> file:

   nbspglgoesrmap <tire13>.goesr

will create the file (without the map outlines),

   <tire13>.png

2) To edit/refine the map file used by map2img, call

   nbspglgoesrmap -D <tire13>.goesr

This will produce the file

   <tire13>.map

This can be used with map2img, but first the asc data file (<tire13>.asc) used in the map file must be generated. This is where nbspgoesrgis comes in,

   nbspgoesrgis -a <tire13>.asc <tire13>.goesr

Then

   map2img -m <tire13>.map -o <tire13>.png

3) There are two ways to help/guide the possible values of the extent and size parameters in the mapfile (<tire13>.map). One is to look at the first entries of the asc file itself, or execute

   nbspgoesr -i <tire13>.goesr

This will output the default values used in the default map file emitted with the -D option above.

4) All the above examples can be used with an <or_abi> file, excpet that the [-r] option must be added in the cmd line (this is to inform the nbspgislib library the type of file). Thus,

   nbspglgoesrmap -r <or_abi>.nc

will create (without the map outlines)

   <or_abi>.png

(It will probably take a a couple of minutes).

5) Similarly,

   nbspglgoesr -r -D <or_abi>.nc
   nbspgoesrgis -r -a <or_abi>.asc <or_abi>.nc

will generate the default map file and the asc file

   <or_abi>.map
   <or_abi>.asc

respectively. The map file can be edited (for example to change the extent and size parameters) and then fed to map2img

   map2img -m <map1> -o <output1>
   map2img -m <map2> -o <output2>

all using the same <or_abi>.asc file (with different extent and size parameter in each copy of the map file).