nitin patil a écrit :
Dear ferret users,
Did any one knows how to give a border to
India country if we have to plot only India.
if possible can we border states also?
Hi,
I have done this recently using kml files distributed
by the "Global Administrative Areas" website.
Please follow the different steps:
1) From http://www.gadm.org
Go in the Download section, select the country
and choose "Google Earth .kmz"
After the download, you can have a look to the kmz file
with googleearth of course.
Unzip the kmz file. You should obtain a kml file.
2) Convert the kml file to a text with
3 columns lon,lat,number (number is the
index representing the area) with the python
script attached.
3) Use the ferret plot.jnl script to validate and
save the polygons as a netcdf file.
Here is an example with India with the first
2 administratives levels.
$ unzip IND_adm1.kmz
$ ./convert_kml.py IND_adm1.kml > IND_adm1.dat
$ ferret
yes? go plot.jnl IND_adm1.dat IND_adm1.nc
Note: that when I try to do the same with IND_adm0.dat,
ferret restarts my X11 server !
The problem occurs at line
repeat/name=n/range=1:`numb[i=@max]` ( def sym n=`n` ; let lon1=if
numb eq `n` then lon ; let lat1=if numb eq `n` then lat ;
polygon/line/fill/o/nolab/lev=(1,200,1)/pal=thirty_by_levels.spk
lon1,lat1,`n` ; PPL SHASET RESET )
But the method is still ok, just do not not blindly
use polygon command but rather plot/vs.
There may be a problem anyway.
Happy ferreting
Patrick