0

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 Answer 1

0

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for reply. Currently in my solution data filtering is done by a browser side program(I don't use any backend as a proxy for data filtering). The problem is that the browser downloads a very large data set ~30Mb and that's not good. The only criterion is to be able to filter from the list of Rows those entries that contain the value null in the provided layer attribute.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.