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

20010625: VGF format



>From: Robert Mullenax <address@hidden>
>Organization: UCAR/Unidata
>Keywords: 200106251541.f5PFfg128983

>
> I have been looking for documentation on the VGF format and cannot find
>any.  We would like
>to create some other files in this format to overlay over GEMPAK products.
>Could you provide
>us with some documentation or point us in the right direction?
>
>Thanks,
>Robert
>
>
>
>Robert Mullenax
>Weather Systems Administrator
>Universal Weather and Aviation
>


Robert,

The VGF file writing routines are in $GEMPAK/source/cgemlib/cvg.

The easiest way to create a vgf file is to use the standard vg driver
with any gplt drawing commands. That is, if you can use the gemlib
and gplt interface for drawing your graphics, then the drvice
driver will do all the work for any output format, including vgf.

If you want a more hands on look, the routine cvgcrall.c contains the
necessary commands to create the primatives. You can link the testvgf
routine (you need to modify the tlink actions in 
$GEMPAK/source/cgemlib/cvg/Makefile to specify a C source instead of
fortran as follows:

tlink : test$(GDIR).c
        $(COMPILE.c) test$(GDIR).c
        $(LINK.f) test$(GDIR).o -o test$(GDIR) $(GEMLIB) $(APPL) $(SYSLIB) 
$(CGEMLIB) $(GEMLIB)
        $(INSTALL) test$(GDIR) $(GEMEXE)
        $(RM) *.o test$(GDIR)

The first 2 lines need test$(GDIR).c and  $(COMPILE.c), the third need
the addition of $(CGEMLIB).

You can then type "make tlink". Then run $GEMEXE/testcvg.

Create a georeferenced line like:

% testcvg

> Select a command: 11  (CVG_WRITEF)

> Enter the VG file to open and write the element to:
  test.vgf

> Select an element class or type EXIT:
        1 = FRONTS      4 = SYMBOLS     10 = TRACKS 
        2 = WATCHES     5 = TEXT        11 = SIGMETS
        3 = LINES       6 = WINDS       12 = CIRCLE

3
Enter the type of line:
        Regular Line      1
        Special Line     20
1
Line attributes:
Enter the line type:
1
Enter the line type flag:
1
Enter the line width size multiplier:
1
Enter the line width flag:
1
Enter the # of points along the line (0-500):
2
Enter 2 coordinate pairs in MAP coordinate:
35 -100 50 -75
Closed? 0 = No 1 = Yes 
0
Filled? 0 = No 1 = Yes 
0
Smoothed? 0 = No 1 = Light 2 = Heavy 
0
Enter the major color:
6
Enter the minor color:
4
Enter the group type (>=0):
1
Enter the group number (>=0):
1

CVG_WRITEF: iret = 0

 [CVG 0] /tmp/test4.vgf

The VG record was created successfully

> exit



You can then use gpmap to display the line.

Steve Chiswell
Unidata User Support