Skip to content

ArgumentException for WbGlobeCoordinate with precision = null #106

Description

@j-bbr

During processing of a recent wikidata dump I noticed that WbGlobeCoordinate throws an ArgumentException if the precision field is null. Here is the relevant portion from an example entity (Berlin TV Tower) from the dump where that occurs:

"P625": [
            {
                "mainsnak": {
                    "snaktype": "value",
                    "property": "P625",
                    "datavalue": {
                        "value": {
                            "latitude": 52.520833333333,
                            "longitude": 13.409444444444,
                            "altitude": null,
                            "precision": null,
                            "globe": "http:\/\/www.wikidata.org\/entity\/Q2"
                        },
                        "type": "globecoordinate"
                    },
                    "datatype": "globe-coordinate"
                },
                "type": "statement",
                "id": "q151356$2200165A-750E-42AB-BC62-4F23EF25F202",
                "rank": "normal"
            }
        ]

Maybe the precision field could be made nullable in WbGlobeCoordinate?

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions