[ncl-talk] Import shapefile into NCL 6.2

G.Monte at isac.cnr.it G.Monte at isac.cnr.it
Fri Mar 26 06:34:41 MDT 2021


I imported *.shp shapefile and the codes works properly now.

Thank you very much for your help.
Giulio Monte

> KMZ is a shape format, but it is different than the official ESRI
> shapefile
> format.  The official format has *.shp* suffix, not *.kmz*, and the
> shapefile also has at least two companion files with alternate suffixes.
> Please see the introduction at the top of NCL's shapefile page:
>
>     https://www.ncl.ucar.edu/Applications/shapefiles.shtml
>
> KMZ can be handled by NCL with quite a lot of tricky programming.  Your
> easiest solution would be to go back to gadm.org or some other source, and
> download shapefile format, not KMZ.  I hope this helps.
>
> If anyone else has a KMZ or KML reader function for NCL, please mention
> it.  This would be a good addition to NCL.
>
>
> On Thu, Mar 25, 2021 at 10:49 AM G.Monte--- via ncl-talk <
> ncl-talk at mailman.ucar.edu> wrote:
>
>> Dear NCL users,
>>
>> I would like to import a shapefile into my NCL code, in order to have
>> the
>> regional (and possibly provincial) suddivision of Italy.
>>
>> First, I tried with the KMZ level-2 "gadm36_ITA_2.kmz" available in
>> www.gadm.org. Once I imported this file into my code, set lnres=True
>> with
>> its options and typed:
>>
>> id = gsn_add_shapefile_polylines(wks,map,"gadm36_ITA_2.kmz",lnres)
>>
>> I get this error message:
>>
>> warning:_NclOpenFile: Can not open file <gadm36_ITA_2.kmz>; file format
>> not supported or file is corrupted
>> warning:isfilevar: undefined file returning missing value
>>
>> What does it mean properly? It's the first time I have ever tried this,
>> so
>> I could get wrong easily.
>>
>> Thanks in advance,
>> Giulio Monte
>>
>




More information about the ncl-talk mailing list