Skip to content

Arrays of different size and with null values based on requested stations #56

@basislagerservices

Description

@basislagerservices

I'm requesting temperature data for multiple stations at once and noticed that values are sometimes returned as an array of different size.
For requests for a single stations, I usually get an array with one value, but for some combinations I get arrays with 1 or 2 null values.

Example:

echo "**************** FIRST *****************"
curl -s 'https://dataset.api.hub.geosphere.at/v1/station/current/tawes-v1-10min?parameters=TLAM&station_ids=11266&output_format=geojson' | python -m json.tool
echo "**************** SECOND *****************"
curl -s 'https://dataset.api.hub.geosphere.at/v1/station/current/tawes-v1-10min?parameters=TLAM&station_ids=11384&output_format=geojson' | python -m json.tool
echo "**************** BOTH *****************"
curl -s 'https://dataset.api.hub.geosphere.at/v1/station/current/tawes-v1-10min?parameters=TLAM&station_ids=11266,11384&output_format=geojson' | python -m json.tool

The result:

**************** FIRST *****************
{
    "media_type": "application/json",
    "type": "FeatureCollection",
    "version": "v1",
    "timestamps": [
        "2025-06-21T12:10+00:00"
    ],
    "features": [
        {
            "type": "Feature",
            "geometry": {
                "type": "Point",
                "coordinates": [
                    11.706666666666665,
                    47.49944444444444
                ]
            },
            "properties": {
                "parameters": {
                    "TLAM": {
                        "name": "Lufttempertur arithmetisches Mittel",
                        "unit": "\u00b0C",
                        "data": [
                            26.2
                        ]
                    }
                },
                "station": "11266"
            }
        }
    ]
}
**************** SECOND *****************
{
    "media_type": "application/json",
    "type": "FeatureCollection",
    "version": "v1",
    "timestamps": [
        "2025-05-22T13:20+00:00"
    ],
    "features": [
        {
            "type": "Feature",
            "geometry": {
                "type": "Point",
                "coordinates": [
                    15.833333333333334,
                    47.623333333333335
                ]
            },
            "properties": {
                "parameters": {
                    "TLAM": {
                        "name": "Lufttempertur arithmetisches Mittel",
                        "unit": "\u00b0C",
                        "data": [
                            -25.2
                        ]
                    }
                },
                "station": "11384"
            }
        }
    ]
}
**************** BOTH *****************
{
    "media_type": "application/json",
    "type": "FeatureCollection",
    "version": "v1",
    "timestamps": [
        "2025-05-22T13:20+00:00",
        "2025-06-21T12:10+00:00"
    ],
    "features": [
        {
            "type": "Feature",
            "geometry": {
                "type": "Point",
                "coordinates": [
                    11.706666666666665,
                    47.49944444444444
                ]
            },
            "properties": {
                "parameters": {
                    "TLAM": {
                        "name": "Lufttempertur arithmetisches Mittel",
                        "unit": "\u00b0C",
                        "data": [
                            null,
                            26.2
                        ]
                    }
                },
                "station": "11266"
            }
        },
        {
            "type": "Feature",
            "geometry": {
                "type": "Point",
                "coordinates": [
                    15.833333333333334,
                    47.623333333333335
                ]
            },
            "properties": {
                "parameters": {
                    "TLAM": {
                        "name": "Lufttempertur arithmetisches Mittel",
                        "unit": "\u00b0C",
                        "data": [
                            -25.2,
                            null
                        ]
                    }
                },
                "station": "11384"
            }
        }
    ]
}

It might be relevant that this happens with 11384, which shows a wrong temperature measurement.

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