[GRASS-dev] v.in.ogr and v.import do not import all features in gpkg file
Markus Metz
markus.metz.giswork at gmail.com
Tue Oct 9 10:41:48 PDT 2018
On Tue, Oct 9, 2018 at 2:11 PM Veronica Andreo <veroandreo at gmail.com> wrote:
>
> A follow up:
>
> If I convert the gpkg to shapefile and import into GRASS, then all points
are imported:
>
> v.import input=central.shp layer=central output=central --overwrite
> Check if OGR layer <central> contains polygons...
> Creating attribute table for layer <central>...
> Importing 30 features (OGR layer <central>)...
> -----------------------------------------------------
> Building topology for vector map <central at testing>...
> Registering primitives...
> Input <central.shp> successfully imported without reprojection
>
> v.db.select -c central | wc -l
> 30
>
> What could be the problem with gpkg and how to test further??
The problem is that the bounding box included in the gpkg does not cover
all points: these missing 2 points are outside the bbox embedded in the
gpkg. As a safety measure, v.in.ogr applies a spatial filter using the
input layer's bbox to exclude corrupt features (previously observed in some
shapefiles). This spatial filter is passed directly to OGR and as a
consequence, OGR provides only 28 and not 30 points to v.in.ogr.
I am not sure what to do about this. Disable this safety check again?
Markus M
>
> El lun., 8 oct. 2018 a las 21:24, Veronica Andreo (<veroandreo at gmail.com>)
escribió:
>>
>> Hello devs
>>
>> I found a quite striking issue when importing a simple vector file. It
is a gpkg file with 30 points and only one field as attribute. When I
import it into GRASS, either with v.in.ogr or v.import, I only get 28
points imported. No idea why. Meanwhile, ogrinfo -al reports 30 points,
same as QGIS
>>
>> v.in.ogr input=central.gpkg layer=central output=central
>> Check if OGR layer <central> contains polygons...
>> WARNING: Vector map <central> already exists and will be overwritten
>> Creating attribute table for layer <central>...
>> Importing 28 features (OGR layer <central>)...
>> -----------------------------------------------------
>> Building topology for vector map <central at testing>...
>> Registering primitives...
>>
>> v.db.select -c central | wc -l
>> 28
>>
>> I attach the file.
>>
>> Thanks much in advance
>> Vero
>>
>> ps: I use trunk r73492
>
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20181009/d5008728/attachment.html>
More information about the grass-dev
mailing list