Skip to content

AGS are stored as integers and missing leading zeros #1193

Open
@JonasGilg

Description

@JonasGilg

Bug description

A lot of places are using the AGS to store information related to regions. In code integers are used to represent these ids, like here:

This is wrong, as leading zeros are vanishing. The leading zeros are part of the AGS. Valid AGS can only have lengths of 2, 3, 5 and 8. The first two digits represent the federal state starting from 01 (Schleswig-Holstein) and ending at 16 (Thuringia).

For the first nine federal states this has led to many errors, when working with district data, as public datasets always contain the leading zeros, but exported data of memilio is missing them.

Version

Any

To reproduce

Relevant log output

Add any relevant information, e.g. used compiler, screenshots.

Checklist

  • Attached labels, especially loc:: or model:: labels.
  • Linked to project

Metadata

Metadata

Assignees

No one assigned

    Labels

    class::bugBugs found in the softwareloc::data handlingThis issue concerns any kind of data handling.prio::moderateThe priority of this task is moderate.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions