[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 09:57:21 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 mmetz):
Replying to [ticket:3407 mikatt]:
> GRASS 7.2.1 (on Linux Mint 18) produces an error when trying to read in
ESRI shapefiles that have empty cells. This used to work fine until
recently, and I have no problems with GRASS 7.2.0 on Windows 7.
What are the GDAL/OGR versions?
>
> Here is a minimal example including messages:
>
> [...]
Thanks for the example, I could reproduce the error.
>
> Have there been substantial changes to v.in.ogr or could this be a
RGDAL/OGR issue?
>
This is a GDAL/OGR issue. As of GDAL 2.2, `OGR_F_IsFieldSet()` apparently
returns true even if the field is empty, and `OGR_F_GetFieldAsString()`
returns a zero-length string (not NULL) for an empty field.
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.
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3407#comment:1>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list