[ncl-talk] Help in reading a shapefile non-spatial attribute with NCL

Dennis Shea shea at ucar.edu
Mon Apr 15 13:27:10 MDT 2019


I just tried with* NCL 6.3.0 *and *NCL 6.5.0  *on my MAC




*%>ncl NCAR Command Language Version 6.3.0*
and
*  NCAR Command Language Version 6.5.0*

ncl 0> *f = addfile("TR012L1_ISTANBUL_**UA2012_Boundary.shp","r"*)
ncl 1> print(f)
ncl 2> area = f->AREA_KM2
ncl 3> print(area)

Variable: area
Type: double
Total Size: 8 bytes
            1 values
Number of Dimensions: 1
Dimensions and sizes:    [num_features | 1]
Coordinates:
Number Of Attributes: 0
(0)    *15013.4*

On Fri, Apr 12, 2019 at 8:59 AM Orestis Speyer <ospeyer at meteo.noa.gr> wrote:

> Hi everyone,
>
>
>
> I want to extract an attribute (as defined in the gis world) from a
> shapefile to use it for subsequent calculations.
>
> This attribute is non-spatial and it is named AREA_KM2.
>
> When I use the standard NCL syntax for variables, i.e.
>
>
>
> surface = f->AREA_KM2
>
> I get
>
> variable (AREA_KM2) is not in file (f)
>
>
>
> Is the shapefile non-spatial attribute treated differently?
>
> I am looking at the NCL examples but I could use some help.
>
>
>
> Cheers to all,
>
> Orestis Speyer
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190415/73d56901/attachment.html>


More information about the ncl-talk mailing list