Skip to content

OGRFeature::SetGeometry does not check the Geometry type #11147

@dbaston

Description

@dbaston

What is the bug?

Since 1999, the docs for OGRFeature::SetGeometry and friends have stated that the method may return OGRERR_NONE if successful, or OGRERR_FAILURE if the index is invalid, or OGRERR_UNSUPPORTED_GEOMETRY_TYPE if the geometry type is illegal for the OGRFeatureDefn (checking not implemented).

These methods should either be updated to perform the type checking, or the docs should be updated to remove OGRERR_UNSUPPORTED_GEOMETRY_TYPE as a possible return value.

Steps to reproduce the issue

none

Versions and provenance

1.1.1 to 3.10

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationIssues and contributions to the documentation content

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions