<div dir="ltr"><div><div><div><div><div><div>Fabien,<br><br></div>The issue turns out to be that the fields reported as type &quot;none&quot; are actually Integer64 fields. NCL utilizes gdal/ogr to support shapefiles, and support was introduced in ogr v2.0 for integer64 types (<a href="https://trac.osgeo.org/gdal/wiki/rfc31_ogr_64">https://trac.osgeo.org/gdal/wiki/rfc31_ogr_64</a>). Prior to that, is appears that there was some sort of automated mapping to a type that could accommodate the actual data, i.e., to either an integer or double. I speculate that NCL6.3.0 was built against a prior version of ogr.<br><br></div>I am implementing a fix in NCL, which will make it into a 6.4.1 release. In the meantime, a work-around is to use the &quot;ogr2ogr&quot; command-line utility from <a href="http://gdal.org">gdal.org</a> to convert Integer64 to integer or double:<br><br></div>    ogr2ogr -mapFieldType integer64=integer dstShapefile.shp srcShapefile.shp  # note dst/src ordering<br><br></div>I will send you in a separate email a copy of the France_adm2 shapefile that has been converted.<br><br></div>Hope that helps...<br></div>Rick<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 25, 2017 at 4:23 PM, Fabien Paulot <span dir="ltr">&lt;<a href="mailto:fabien.paulot@noaa.gov" target="_blank">fabien.paulot@noaa.gov</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi Rick,<div><br></div><div>thanks for the very quick reply.</div><div>The shape file is too big to be sent by email but you can download it from GADM</div><div><a href="http://www.gadm.org/country" target="_blank">http://www.gadm.org/country</a> (<wbr>select shapefile as file format).</div><div>I know this is a problem for France_adm2.shp</div><div>Thanks</div><span class="HOEnZb"><font color="#888888"><div>Fabien</div></font></span><div><div class="h5"><div><br></div><div><br><div><blockquote type="cite"><div>On Apr 25, 2017, at 6:03 PM, Rick Brownrigg &lt;<a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</a>&gt; wrote:</div><br class="m_8237668428590690426Apple-interchange-newline"><div><div dir="ltr"><div><div>Hi Fabien,<br><br></div>This is a bit odd. Out of a collection of about a dozen shapefiles I had on hand, none of them displayed the issue for an integer field. However, I found one instance where a double field shows up as type &quot;none&quot; on 6.4.0, and is thus unreadable, yet is fine under 6.3.0.  I will look into it right away. I don&#39;t suppose you could send me your shapefile as an additional test case?<br><br></div>Rick<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 25, 2017 at 3:00 PM, Fabien Paulot - NOAA Affiliate <span dir="ltr">&lt;<a href="mailto:fabien.paulot@noaa.gov" target="_blank">fabien.paulot@noaa.gov</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hello,<br><br></div>it seems integers are not properly recognized in ncl 6.4.0 and cannot be read.<br></div>This used to work fine<br><br></div>Here is the output of ncl_filedump on the same shapefile with these two versions. Note how the ID_1 and ID_2 field change<br><br></div><div>Any idea what&#39;s going on.<br><br></div><div>Thanks a lot <br></div><div>Fabien<br></div><div><br></div>ncl_filedump /archive/Fabien.Paulot/DATA/Sh<wbr>apefiles/France/FRA_adm2.shp  <wbr>                              <wbr>                              <wbr>                              <wbr>                              <wbr>        Copyright (C) 1995-2015 - All Rights Reserved<br> University Corporation for Atmospheric Research<br> NCAR Command Language Version 6.3.0<br> The use of this software is governed by a License Agreement.<br> See <a href="http://www.ncl.ucar.edu/" target="_blank">http://www.ncl.ucar.edu/</a> for more details.<br><br>Variable: f<br>Type: file<br>filename:    FRA_adm2<br>path:    /archive/Fabien.Paulot/DATA/Sh<wbr>apefiles/France/FRA_adm2.shp<br>   file global attributes:<br>      layer_name : FRA_adm2<br>      geometry_type : polygon<br>      geom_segIndex : 0<br>      geom_numSegs : 1<br>      segs_xyzIndex : 0<br>      segs_numPnts : 1<br>   dimensions:<br>      geometry = 2<br>      segments = 2<br>      num_features = 96  // unlimited<br>      num_segments = 477<br>      num_points = 248568<br>   variables:<br>      integer geometry ( num_features, geometry )<br><br>      integer segments ( num_segments, segments )<br><br>      double x ( num_points )<br><br>      double y ( num_points )<br><br>      integer ID_0 ( num_features )<br><br>      string ISO ( num_features )<br><br>      string NAME_0 ( num_features )<br><br>      integer ID_1 ( num_features )<br><br>      string NAME_1 ( num_features )<br><br>      integer ID_2 ( num_features )<br><br>      string NAME_2 ( num_features )<br><br>      string HASC_2 ( num_features )<br><br>      integer CCN_2 ( num_features )<br><br>      string CCA_2 ( num_features )<br><br>      string TYPE_2 ( num_features )<br><br>      string ENGTYPE_2 ( num_features )<br><br>      string NL_NAME_2 ( num_features )<br><br>      string VARNAME_2 ( num_features )<br><br><br> Copyright (C) 1995-2017 - All Rights Reserved<br> University Corporation for Atmospheric Research<br> NCAR Command Language Version 6.4.0<br> The use of this software is governed by a License Agreement.<br> See <a href="http://www.ncl.ucar.edu/" target="_blank">http://www.ncl.ucar.edu/</a> for more details.<br><br>Variable: f<br>Type: file<br>filename:    FRA_adm2<br>path:    /archive/Fabien.Paulot/DATA/Sh<wbr>apefiles/France/FRA_adm2.shp<br>   file global attributes:<br>      layer_name : FRA_adm2<br>      geometry_type : polygon<br>      geom_segIndex : 0<br>      geom_numSegs : 1<br>      segs_xyzIndex : 0<br>      segs_numPnts : 1<br>   dimensions:<br>      geometry = 2<br>      segments = 2<br>      num_features = 96  // unlimited<br>      num_segments = 477<br>      num_points = 248568<br>   variables:<br>      integer geometry ( num_features, geometry )<br><br>      integer segments ( num_segments, segments )<br><br>      double x ( num_points )<br><br>      double y ( num_points )<br><br>      none ID_0 ( num_features )<br><br>      string ISO ( num_features )<br><br>      string NAME_0 ( num_features )<br><br>      none ID_1 ( num_features )<br><br>      string NAME_1 ( num_features )<br><br>      none ID_2 ( num_features )<br><br>      string NAME_2 ( num_features )<br><br>      string HASC_2 ( num_features )<br><br>      none CCN_2 ( num_features )<br><br>      string CCA_2 ( num_features )<br><br>      string TYPE_2 ( num_features )<br><br>      string ENGTYPE_2 ( num_features )<br><br>      string NL_NAME_2 ( num_features )<br><br>      string VARNAME_2 ( num_features )<br></div>
<br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailma<wbr>n/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</div></blockquote></div><br></div></div></div></div></blockquote></div><br></div>