need help (regional boundary)

Alessandro Raolil raolil at LE.ISAC.CNR.IT
Fri Jul 7 04:44:12 EDT 2006


Thanks a lot Mac, i'll try to apply your code as soon as possible, but i
need to convert my data to e00 format...how can i do?
And another question is: for each region, i've 3000-4000 boundary
points...this is a problem?

Regards,
Alessandro

> Hi Alessandro.
>
>
> We have such a program as you require.  It is a "C" Program that takes the
> lat and long of boundary points and encodes them in a binary file which
> you
> then attach by set mpdset  and control through  mpt commands in the
> script.
>
> Here is the program attached with a separate instruction file. The
> makemaporig.c is the C code that must be compiled before use.  In the
> program before compiling you set the : #define MPTID 24  in the program to
> #define MPTID ??  where ?? = the number you want to use to specify the
> background number in the mpt command.  Note do not use 1 or 2 as these are
> used by GrADS for coasts and national boundaries.
>
> Good luck.
>
> Mac MacLeod
>
> M.A.(Mac) MacLeod
> President and General Manager,
> Scotia Weather Services Inc.
> 192 Wyse Road, Suite 8,
> Dartmouth, Nova Scotia, B3A 1M9
> Tele: 902-468-3866
> Cell: 902-225-5747
> Fax: 902-461-1768
> E-mail: mmacleod at scotiaweather.com
> visit us at: www.scotiaweather.com
>
> ----- Original Message -----
> From: "Alessandro Raolil" <raolil at LE.ISAC.CNR.IT>
> To: <GRADSUSR at LIST.CINECA.IT>
> Sent: Thursday, July 06, 2006 4:18 PM
> Subject: Re: need help (regional boundary)
>
>
>> Thanks a lot for your response, but i've already implemented by myself a
>> script many similar. My problem is that the script is too slow to draw
>> all
>> italian regional boundary ; so i need a script that produce a binary
>> file,
>> like "hires", faster and optimized, like the one proposed by Francis in
>> his previous mail.
>>
>> Regards,
>> Alessandro
>>
>> > Hello Alessandro,
>> >
>> > Here is a simple script snippet that you can put in a
>> > grads script that will draw a boundary using a lonlat
>> > coordinate pairs from an ascii file. It is not elegant
>> > code, but it works.
>> > The lonlatfile format is one lon/lat coordinate pair
>> > on each line. Maxpts is the total number of coordinate
>> > points. If you  want a closed boundary, make the last
>> > coordinate pair in the ascii file the same as the
>> > first coordinate pair.
>> > ------------------------------------------------
>> > *Read lon lat coords of boundary points,calculate xy
>> > coords and plot points
>> >
>> > count = 1
>> > while (count<=maxpts)
>> >   llpoint= sublin(read(lonlatfile),2)
>> >
>> >   ln = subwrd(llpoint,1)
>> >
>> >   lt = subwrd(llpoint,2)
>> >
>> >   'q w2xy 'ln' 'lt''
>> >
>> >   x1=subwrd(result,3)
>> >   y1=subwrd(result,6)
>> >
>> > if count=1
>> >   oldx=x1
>> >   oldy=y1
>> > else
>> >   'draw line 'oldx' 'oldy' 'x1' 'y1''
>> > endif
>> >   oldx=x1
>> >   oldy=y1
>> >   count=count+1
>> > endwhile
>> >
>> > --------------------------------------------------
>> > This might work for your purposes.
>> >
>> > Regards,
>> > Joe Marlow
>> > Tohono O'odham Community College
>> > jmarlow at tocc.cc.az.us
>> > jemz57 at yahoo.com
>> >
>> >
>> > --- Alessandro Raolil <raolil at LE.ISAC.CNR.IT> wrote:
>> >
>> >> Hi Francis,
>> >> i have the same problem of Vikram, but for italian
>> >> regions. Can you send
>> >> me the correct code? i have all the lon/lat
>> >> coordinates in ascii format.
>> >> Thanks
>> >> Alessandro
>> >>
>> >
>> >
>> > __________________________________________________
>> > Do You Yahoo!?
>> > Tired of spam?  Yahoo! Mail has the best spam protection around
>> > http://mail.yahoo.com
>> >
>> >
>>
>



More information about the gradsusr mailing list