Skip to content

Write Dimension Field When Encoding #132

Description

@mawi510

Problem

The encoder only writes the dimension field if dim != 2, otherwise, no dimension is written when encoded. While this works fine for the JS decoder (because it forces dim = 2 when decoding), this can lead to decoding issues when decoding outside of the JS decoder. I recently ran into this issue and upon searching this and the pygeobuf repo, I posted a similar explanation of the issue, including:

  1. Decoding in the Python Implementation of Geobuf: Pygeobuf
  2. Decoding from PostGIS

Proposed Solution

When encoding, allow dimensions to be an argument that a user can insert, otherwise, default to 2 rather than not writing the dimension field. This way all encoded data defaults to a 2D space (unless otherwise noted), which makes the geobuf data easier to decode outside the JS decoder.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions