Skip to content

[Bug] v.out.ogr export points w/ missing category twice #6563

@wangzcl

Description

@wangzcl

Describe the bug

When a point has a category of -2147483647, it is skipped in v.out.ogr if the -c flag is not provided. Otherwise, it will be exported twice.

To reproduce

Generate 3 points. The second one has a category of -2147483647 while others are 2.

printf "P 1 1
0 0
1 1
P 1 1
1 0
1 -2147483647
P 1 1
2 0
1 3
" | v.in.ascii -n input=- output=pts format=standard --overwrite

v.info map=pts
v.category input=pts option=print

v.out.ogr input=pts output="pts.gpkg" format=GPKG --overwrite -c

This will export 4 points. If -c is not provided, only 2 points will be exported.

Expected behavior

Export points with missing cat only once.

System description

  • Operating System: Ubuntu 24.04

  • GRASS version: 8.4.1

  • details about further software components
    version=8.4.1
    date=2025
    revision=exported
    build_date=2025-07-21
    build_platform=x86_64-pc-linux-gnu
    build_off_t_size=8
    libgis_revision=8.4.1
    libgis_date=2025-07-21T15:11:31+00:00
    proj=9.4.1
    gdal=3.11.3
    geos=3.12.2
    sqlite=3.45.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingvectorRelated to vector data processing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions