[ncl-talk] About shapefiles

Mary Haley haley at ucar.edu
Fri Jun 24 08:58:47 MDT 2016


Soares,

The problem is simply that are you are trying to look for cities called
"Dili" and "Hera" in the TLS_adm2.shp file, but these names don't appear in
the NAME_2 variable.

This is why Dennis and I were trying to tell you that "print" and
"printVarSummary" can be very helpful.

If you print the "citiesShapes->NAME_2" variable with:

print(citiesShapes->NAME_2)

You would see that neither "Dili" or "Hera" are in the file, but "Dili
Barat" and "Dili Timur" are.

You will need to adjust your code to look for the correct names of the
cities.  This is where "ncl_filedump" can help you.

You can examine the contents of the TLS_adm2.shp shapefile from the UNIX
command line with:

ncl_filedump TLS_adm2.shp

You will then see the following variables of type "string":

      string ISO ( num_features )

      string NAME_0 ( num_features )

      string NAME_1 ( num_features )

      string NAME_2 ( num_features )

      string HASC_2 ( num_features )

      string CCA_2 ( num_features )

      string TYPE_2 ( num_features )

      string ENGTYPE_2 ( num_features )

      string NL_NAME_2 ( num_features )

      string VARNAME_2 ( num_features )

You can now examine the contents of each of these variables, also using
ncl_filedump:

ncl_filedump -v NAME_2 TLS_adm2.shp
ncl_filedump -v ENGTYPE_2 TLS_adm2.shp
ncl_filedump -v VARNAME_2 TLS_adm2.shp
etc.

This will help you see which variables on the shapefile might be the most
useful to you, and then the exact city name to search for. You can then
make this change in your shapefiles_5.ncl script.

--Mary



On Fri, Jun 24, 2016 at 2:36 AM, isakhar sakhar isakhar <
isakhar.inside13 at gmail.com> wrote:

> Dear Mrs.Mary
>
> I could not put my files into ftp server of NCL, so I share it with
> dropbox.
>
>
> https://www.dropbox.com/s/iie1snwo2m663dn/soares.tar.gz?dl=0
>
>
> Thank you,
> Soares
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160624/6e14555c/attachment.html 


More information about the ncl-talk mailing list