[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

19990315: Changing defaults menu in Nsat



>From: address@hidden (James Murakami)
>Organization: .
>Keywords: 199903160020.RAA22662

>Hi:
>
>How can I change the various default parameters in Nsat?
>That is, I want to alter things like map overlay resolution
>and line thickness (under "tool" menu option) permanently.
>Otherwise, any changes I make during a session on Nsat reverts
>back to the "factory specs" upon exiting the program.
>
>I would normally ask our Dept. programmer, but he's
>very busy at present. However, I'll change this myself if
>you can point the way.
>
>Thanks.
>
>James Murakami
>
>Staff Meteorologist/Student Affairs
>Department of Atmospheric Sciences
>University of California, Los Angeles
>405 Hilgard Ave.
>Los Angeles, CA  90095-1565
>
>
>   e-mail:  address@hidden
>telephone:  310-825-2418
>      Fax:  310-206-5219
>~
>

James,
The default map resolution is handled in $NAWIPS/nprogs/source/nsat/gmpk.c

        /*
         * If mapfile is "default", choose a map file based on the image scale.
         */
        if ( strcmp ( name, "default" ) == 0 ) {

            /*
             * NIDS products - county map in one color,
             * hi-res map in another
             */
            if ( imsorc == 7 && imtype > 15 ) {
                strcpy(name, mapfil[3]);
                gsmfil(name, &iret, strlen(name));
                strcpy(map, "10//1");
                gg_map(map, &iret, strlen(map));
                strcpy(name, mapfil[2]);
            }
            /*
             * any product w/ resolution <=4km, use hi-res
             */
            else if ( xpxres <= 4.0 && imsorc != 7 )
                strcpy(name, mapfil[2]);
            else
                strcpy(name, mapfil[1]);

In the above code, the various maps files in "mapfil" are defined at the
top of the proceedure. For sat images, when the product has resolution
higher than 4km, the hipowo.cia file is used. Lower res images (eg WV 8km)
use the mepowo). The NIDS county map is drawn inside the if() block,
the state map overlay for both sat and nids is accomplished in the gg_map
call following the block. The map line types are appended in the gg_map
calls. The inital line types are set in nsat.c:
        /* initialize line width and line color for map drawing  */

        mapData.color = 1;              /*      map color       */
        mapData.width = 2;              /*      map width       */
        mapData.style = 11;             /*      map style       */

        llData.color = 2;               /* lat/lon color        */
        llData.width = 1;               /* lat/lon width        */
        llData.style = 11;              /* lat/lon style        */


Steve Chiswell