Here API - How to filter attributes in tiles

49 views Asked by At

I am using HERE api to get information about truck restrictions in tiles. The problem is the very large size of the response when given a large number of tiles. I would like to be able to filter unnecessary data from the response. I use this request to get tiles attributes to Here Attributes API,

https://smap.hereapi.com/v8/maps/attributes?in=tile:409099,409100&layers=TRUCK_RESTR_FC1,TRUCK_RESTR_FC1&attributes=DATE_TIMES;WEIGHT_RESTRICTION;HEIGHT_RESTRICTION;LENGTH_RESTRICTION;WIDTH_RESTRICTION;HAZARDOUS_MATERIAL_TYPE&filter=DATE_TIMES != null&meta=0&apiKey=apiKey

But the filter expression is not respokted because data is returned:

{
    "Tiles": [
        {
            "Rows": []
        },
        {
            "Rows": [
                {
                    "DATE_TIMES": null,
                    "WEIGHT_RESTRICTION": null,
                    "HEIGHT_RESTRICTION": "420",
                    "LENGTH_RESTRICTION": null,
                    "WIDTH_RESTRICTION": null,
                    "HAZARDOUS_MATERIAL_TYPE": null
                },
                {
                    "DATE_TIMES": null,
                    "WEIGHT_RESTRICTION": null,
                    "HEIGHT_RESTRICTION": "420",
                    "LENGTH_RESTRICTION": null,
                    "WIDTH_RESTRICTION": null,
                    "HAZARDOUS_MATERIAL_TYPE": null
                },
                ...
            ]
        }
    ]
}

Is it possible to filter by tile attributes? The filter expression only works for geometries attributes, not for selected tiles layers attributes.

1

There are 1 answers

1
igomez On

currently, the filter expression in this API is designed to work with geometry attributes, and it may not apply to selected tile layers' attributes as you've described.

To address this concern, I recommend an alternative approach. You may consider handling the filtering process on your end after receiving the response. This way, you can programmatically process the data and extract the specific attributes you require.

If you have specific criteria for filtering the tile attributes, please provide them, and I'd be happy to assist further in creating a custom solution.