[ncl-talk] About shapefiles

isakhar sakhar isakhar isakhar.inside13 at gmail.com
Thu Jun 30 06:19:17 MDT 2016


Dear mother Mary

I still face the error even I change the name of location for the cities as
below;

majorCities = (/ (/ "Cristo Rei", "Cristo Rei "     /), \
              (/ "Metinaro",  "Metinaro  "     /), \
              (/ "Vera Cruz", "Vera Cruz"     /), \
              (/ "Nain Feto", "Nain Feto"     /), \
              (/  "Dom Aleixo","Dom Aleixo"/) /)

I also added the printVarSummary but still face the error. I dont exactly
which variable I should use because I have tried to some variables in line
296 but still not working. Sorry for asking alot.

Soares

On Fri, Jun 24, 2016 at 11:58 PM, Mary Haley <haley at ucar.edu> wrote:

> 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/20160630/cfc40065/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shapefiles_5.ncl
Type: application/octet-stream
Size: 15504 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160630/cfc40065/attachment.obj 


More information about the ncl-talk mailing list