need help (regional boundary)

Alessandro Raolil raolil at LE.ISAC.CNR.IT
Thu Jul 6 12:18:40 EDT 2006


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