[GRASS-dev] [GRASS GIS] #3407: v.in.ogr fails to import ESRI Shapefile with empty attribute table cells

GRASS GIS trac at osgeo.org
Wed Aug 23 10:05:51 PDT 2017


#3407: v.in.ogr fails to import ESRI Shapefile with empty attribute table cells
----------------------+-------------------------
  Reporter:  mikatt   |      Owner:  grass-dev@…
      Type:  defect   |     Status:  new
  Priority:  normal   |  Milestone:
 Component:  Default  |    Version:  7.2.1
Resolution:           |   Keywords:
       CPU:  x86-64   |   Platform:  Linux
----------------------+-------------------------

Comment (by rouault):

 > This is a GDAL/OGR issue.

 Actually it is a feature / per design. See
 https://svn.osgeo.org/gdal/branches/2.2/gdal/MIGRATION_GUIDE.TXT about RFC
 67 : ttps://trac.osgeo.org/gdal/wiki/rfc67_nullfieldvalues

 > v.in.ogr has been fixed in r71431,2 (trunk, relbr72) to account for the
 new behaviour of GDAL 2.2, supporting older versions of GDAL.

 The fix is not ideal as it considers an empty string as NULL. I'd suggest
 instead using OGR_F_IsFieldSetAndNotNull() when GDAL_VERSION_NUM >=
 2020000 instead of OGR_F_IsFieldSet()

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3407#comment:2>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list