Skip to content

Helper to split data into limited OSM user/preferences "tags" #32

@tordans

Description

@tordans

Context

I have a couple of things that I would like to nudge forward related to shared settings between editors. I wrote about this here https://github.com/tordans/editor-settings-schema

This idea is stuck ATM due to the technical limitations that the user/preferences endpoint has in terms of character limits.

The PR openstreetmap/openstreetmap-website#6399 would resolve this, but so far there was no indication that this might get merged.

There are a couples of apps that could use this data store to share data, some are listed in openstreetmap/openstreetmap-website#6297

Idea

The idea now is, not to wait for the changes to the API but instead work around it with a standard to split the data into the smaller segments that we now have. Ideally, this would happen in a library like this so users can use the same logic easily. But it needs to be simple enough to be re-build in Swift etc. for other apps.

In https://github.com/tordans/editor-settings-schema?tab=readme-ov-file#osm-api my idea was use the API in a array-like manner. However that can still cause errors of too long strings (in both cases, the longer limits as well as today).

So a different idea is to JSON-stringify the string and then split it ab 200 chars (bytes?) and then put it together again to parse it.
We could go further and zip the data or something like that but this will make it harder for other languages to re-implement the logic.


Any ides on this?
And is this something that could happen in this project? Or should I create a separate packages for it?

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