[ncl-talk] Where are the functions processing the string information in a CGM file?

Mary Haley haley at ucar.edu
Thu Sep 24 10:02:25 MDT 2015


Hi Gin Lin,

It's possible that these text strings were drawn with stroked fonts, and
hence they won't show up as actual text strings in your CGM.

I don't know how these strings were created, but if they were drawn using
the "medium" or "high" quality fonts, then they will be stroked.  If they
were drawn using "low" quality, then the characters will be output as
strings in the metafile.

>From the images you sent me, they do not look like low quality fonts, so my
guess is that they are stroked fonts, and hence you won't be able to search
for the actual string in the metafile.

--Mary


On Thu, Sep 24, 2015 at 3:15 AM, <Gin.Lin at iisigroup.com> wrote:

> Hi, Mary.
>
> Thanks for your reply.
>
> I think you are right, the files are actually NCGM,
>
> I found out there is a switch-case which looks like checking the input
> file is CGM or NCGM in our program.
>
> Both of this two files are judged as NCGM.
>
>
>
> I tried to use ctrans today, and I got the text files translated from the
> binary files.
>
> The attachment is the header of the original file which can be viewed
> correctly in AWIPS and the new file which cannot.
>
> I know they look like the same. I think the problem may not be the
> difference of their header.
>
>
>
> I tried to search the strings such as "JMA", "CROSS", "PRESSURE" in the
> text file,
>
> but they can't be found.
>
> So I'm still confused at how Idt and our AWIPS program show it on the
> picture.
>
> Can you give me some advice?
>
>
>
> Thank you.
>
> Gin Lin.
>
>
> -----ncl-talk-bounces at ucar.edu 撰寫:-----
> 收件人: Gin.Lin at iisigroup.com
> 寄件人: Mary Haley
> 傳送自: ncl-talk-bounces at ucar.edu
> 日期: 09/24/2015 10:40上午
> 副本抄送: "ncl-talk at ucar.edu" <ncl-talk at ucar.edu>, charlie.chang at iisigroup.com,
> bobo.wang at iisigroup.com
> 主旨: Re: [ncl-talk] Where are the functions processing the string
> information in a CGM file?
>
>
> Gin Lin,
>
> Idt is a very old program, and the original developer is not part of our
> team any more.
>
> However, I'm wondering if part of your issue is that idt is for viewing
> NCGM files, and not CGM files. An NCGM file is NCAR's special CGM format. I
> would be surprised if other programs were actually able to view NCGM files.
>
> Did you try using "ncgm2cgm" to convert the NCGM to a CGM file?  You can
> also look at the ncgm2cgm.c and cgm2ncgm.c programs to see the code that
> converts from one format to another.  This might help you find the source
> of the problem.
>
> I've attached the two codes here.
>
> Finally, you may want to read our "CGM, Graphicap, and Fontcap Supplement"
> document, which contains a section on the "NCAR Computer Graphics Metafile".
>
> http://www.ncarg.ucar.edu/supplements/cgm_supp/cgm_supp.html
>
> --Mary
>
>
> On Tue, Sep 22, 2015 at 9:57 PM, <Gin.Lin at iisigroup.com> wrote:
>
>> Dear all:
>>
>> First let me introduce our situation.
>>
>> I am one member in CWB in Taiwan, 20 years ago someone write a program
>> for AWIPS,
>>
>> so we can view the CGM file by using AWIPS.
>>
>> Recently, the format of the CGM files we get is changed, and this program
>> cannot show the string information in the new CGM files.
>>
>> You can see the attachments, the color one is what it looks like in idt,
>>
>> and the green one is what it looks like in AWIPS,
>>
>> and the messages marked by read lines in the idt picture disappeared in
>> the AWIPS picture.
>>
>> We want to edit this program to fix it.
>>
>>
>>
>> I checked our program for AWIPS, but I can't find where is the function
>> which print out the string information.
>>
>> I think it may not belong to the TEXT element of class 4.
>>
>> The files we have are all binary, so I can't read them.
>>
>> I also tried to read the source code of idt but I can't understand it.
>> Forgive me.
>>
>>
>>
>> So, my questions are:
>>
>> 1. Where are the functions processing this string information in a CGM
>> file?
>>
>> or more briefly, how idt print out this information on the picture?
>>
>> 2. Where are the strings in a CGM file?
>>
>> Do they belong to the class 4 TEXT element?
>>
>> Or they are actually another element?
>>
>>
>>
>> Thank you.
>>
>> Gin Lin
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
> [附加檔案 "cgm2ncgm.c" 由 Gin Lin/iisigroup 移除]
> [附加檔案 "ncgm2cgm.c" 由 Gin Lin/iisigroup 移除]
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150924/48019281/attachment.html 


More information about the ncl-talk mailing list